Current section

Files

Jump to
noizu_github lib api structs nullable_integration.ex
Raw

lib/api/structs/nullable_integration.ex

# 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.NullableIntegration do
@moduledoc false
defstruct [
:client_id,
:created_at,
:description,
:events,
:external_url,
:html_url,
:id,
:installations_count,
:name,
:node_id,
:owner,
:permissions,
:slug,
:updated_at
]
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__{
client_id: Map.get(json, :client_id),
created_at: Map.get(json, :created_at),
description: Map.get(json, :description),
events: Map.get(json, :events),
external_url: Map.get(json, :external_url),
html_url: Map.get(json, :html_url),
id: Map.get(json, :id),
installations_count: Map.get(json, :installations_count),
name: Map.get(json, :name),
node_id: Map.get(json, :node_id),
owner: Map.get(json, :owner),
permissions: Map.get(json, :permissions),
slug: Map.get(json, :slug),
updated_at: Map.get(json, :updated_at)
}
end
def from_json(other, _headers), do: other
end