# 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.Page do @moduledoc false defstruct [ :build_type, :cname, :custom_404, :html_url, :https_certificate, :https_enforced, :pending_domain_unverified_at, :protected_domain_state, :public, :source, :status, :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__{ build_type: Map.get(json, :build_type), cname: Map.get(json, :cname), custom_404: Map.get(json, :custom_404), html_url: Map.get(json, :html_url), https_certificate: Noizu.Github.PagesHttpsCertificate.from_json(Map.get(json, :https_certificate)), https_enforced: Map.get(json, :https_enforced), pending_domain_unverified_at: Map.get(json, :pending_domain_unverified_at), protected_domain_state: Map.get(json, :protected_domain_state), public: Map.get(json, :public), source: Noizu.Github.PagesSourceHash.from_json(Map.get(json, :source)), status: Map.get(json, :status), url: Map.get(json, :url) } end def from_json(other, _headers), do: other end