Current section
Files
Jump to
Current section
Files
lib/api/structs/copilot_space.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.CopilotSpace do
@moduledoc false
defstruct [
:api_url,
:base_role,
:created_at,
:creator,
:description,
:general_instructions,
:html_url,
:id,
:name,
:number,
:owner,
:resources_attributes,
: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__{
api_url: Map.get(json, :api_url),
base_role: Map.get(json, :base_role),
created_at: Map.get(json, :created_at),
creator: Noizu.Github.SimpleUser.from_json(Map.get(json, :creator)),
description: Map.get(json, :description),
general_instructions: Map.get(json, :general_instructions),
html_url: Map.get(json, :html_url),
id: Map.get(json, :id),
name: Map.get(json, :name),
number: Map.get(json, :number),
owner: Map.get(json, :owner),
resources_attributes: Map.get(json, :resources_attributes),
updated_at: Map.get(json, :updated_at)
}
end
def from_json(other, _headers), do: other
end