Current section

Files

Jump to
noizu_github lib api structs runner_groups_org.ex
Raw

lib/api/structs/runner_groups_org.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.RunnerGroupsOrg do
@moduledoc false
defstruct [
:allows_public_repositories,
:default,
:hosted_runners_url,
:id,
:inherited,
:inherited_allows_public_repositories,
:name,
:network_configuration_id,
:restricted_to_workflows,
:runners_url,
:selected_repositories_url,
:selected_workflows,
:visibility,
:workflow_restrictions_read_only
]
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__{
allows_public_repositories: Map.get(json, :allows_public_repositories),
default: Map.get(json, :default),
hosted_runners_url: Map.get(json, :hosted_runners_url),
id: Map.get(json, :id),
inherited: Map.get(json, :inherited),
inherited_allows_public_repositories: Map.get(json, :inherited_allows_public_repositories),
name: Map.get(json, :name),
network_configuration_id: Map.get(json, :network_configuration_id),
restricted_to_workflows: Map.get(json, :restricted_to_workflows),
runners_url: Map.get(json, :runners_url),
selected_repositories_url: Map.get(json, :selected_repositories_url),
selected_workflows: Map.get(json, :selected_workflows),
visibility: Map.get(json, :visibility),
workflow_restrictions_read_only: Map.get(json, :workflow_restrictions_read_only)
}
end
def from_json(other, _headers), do: other
end