Current section

Files

Jump to
noizu_github lib api structs dependabot_repository_access_details.ex
Raw

lib/api/structs/dependabot_repository_access_details.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.DependabotRepositoryAccessDetails do
@moduledoc false
defstruct [
:accessible_repositories,
:default_level
]
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__{
accessible_repositories:
Enum.map(
Map.get(json, :accessible_repositories) || [],
&Noizu.Github.NullableSimpleRepository.from_json(&1)
),
default_level: Map.get(json, :default_level)
}
end
def from_json(other, _headers), do: other
end