# 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.SimpleCheckSuite do @moduledoc false defstruct [ :after, :app, :before, :conclusion, :created_at, :head_branch, :head_sha, :id, :node_id, :pull_requests, :repository, :status, :updated_at, :url ] 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__{ after: Map.get(json, :after), app: Noizu.Github.Integration.from_json(Map.get(json, :app)), before: Map.get(json, :before), conclusion: Map.get(json, :conclusion), created_at: Map.get(json, :created_at), head_branch: Map.get(json, :head_branch), head_sha: Map.get(json, :head_sha), id: Map.get(json, :id), node_id: Map.get(json, :node_id), pull_requests: Enum.map( Map.get(json, :pull_requests) || [], &Noizu.Github.PullRequestMinimal.from_json(&1) ), repository: Noizu.Github.MinimalRepository.from_json(Map.get(json, :repository)), status: Map.get(json, :status), updated_at: Map.get(json, :updated_at), url: Map.get(json, :url) } end def from_json(other, _headers), do: other end