# Generated by `mix github.gen` from docs/github-api/api.github.com.json. # Do not edit by hand; re-run the task instead. defmodule Noizu.Github.Import do @moduledoc false defstruct [ :authors_count, :authors_url, :commit_count, :error_message, :failed_step, :has_large_files, :html_url, :import_percent, :large_files_count, :large_files_size, :message, :project_choices, :push_percent, :repository_url, :status, :status_text, :svc_root, :svn_root, :tfvc_project, :url, :use_lfs, :vcs, :vcs_url ] def from_json(json, headers \\ []) def from_json(nil, _headers), do: nil def from_json(list, headers) when is_list(list) do Enum.map(list, &from_json(&1, headers)) end def from_json(json, _headers) when is_map(json) do %__MODULE__{ authors_count: Map.get(json, :authors_count), authors_url: Map.get(json, :authors_url), commit_count: Map.get(json, :commit_count), error_message: Map.get(json, :error_message), failed_step: Map.get(json, :failed_step), has_large_files: Map.get(json, :has_large_files), html_url: Map.get(json, :html_url), import_percent: Map.get(json, :import_percent), large_files_count: Map.get(json, :large_files_count), large_files_size: Map.get(json, :large_files_size), message: Map.get(json, :message), project_choices: Map.get(json, :project_choices), push_percent: Map.get(json, :push_percent), repository_url: Map.get(json, :repository_url), status: Map.get(json, :status), status_text: Map.get(json, :status_text), svc_root: Map.get(json, :svc_root), svn_root: Map.get(json, :svn_root), tfvc_project: Map.get(json, :tfvc_project), url: Map.get(json, :url), use_lfs: Map.get(json, :use_lfs), vcs: Map.get(json, :vcs), vcs_url: Map.get(json, :vcs_url) } end def from_json(other, _headers), do: other end