Current section

Files

Jump to
noizu_github lib api structs webhook_sub_issues_sub_issue_added.ex
Raw

lib/api/structs/webhook_sub_issues_sub_issue_added.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.WebhookSubIssuesSubIssueAdded do
@moduledoc false
defstruct [
:action,
:installation,
:organization,
:parent_issue,
:parent_issue_id,
:repository,
:sender,
:sub_issue,
:sub_issue_id,
:sub_issue_repo
]
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__{
action: Map.get(json, :action),
installation: Noizu.Github.SimpleInstallation.from_json(Map.get(json, :installation)),
organization:
Noizu.Github.OrganizationSimpleWebhooks.from_json(Map.get(json, :organization)),
parent_issue: Noizu.Github.Issue.from_json(Map.get(json, :parent_issue)),
parent_issue_id: Map.get(json, :parent_issue_id),
repository: Noizu.Github.RepositoryWebhooks.from_json(Map.get(json, :repository)),
sender: Noizu.Github.SimpleUser.from_json(Map.get(json, :sender)),
sub_issue: Noizu.Github.Issue.from_json(Map.get(json, :sub_issue)),
sub_issue_id: Map.get(json, :sub_issue_id),
sub_issue_repo: Noizu.Github.Repository.from_json(Map.get(json, :sub_issue_repo))
}
end
def from_json(other, _headers), do: other
end