# 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.Deployment do @moduledoc false defstruct [ :created_at, :creator, :description, :environment, :id, :node_id, :original_environment, :payload, :performed_via_github_app, :production_environment, :ref, :repository_url, :sha, :statuses_url, :task, :transient_environment, :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__{ created_at: Map.get(json, :created_at), creator: Noizu.Github.NullableSimpleUser.from_json(Map.get(json, :creator)), description: Map.get(json, :description), environment: Map.get(json, :environment), id: Map.get(json, :id), node_id: Map.get(json, :node_id), original_environment: Map.get(json, :original_environment), payload: Map.get(json, :payload), performed_via_github_app: Noizu.Github.NullableIntegration.from_json(Map.get(json, :performed_via_github_app)), production_environment: Map.get(json, :production_environment), ref: Map.get(json, :ref), repository_url: Map.get(json, :repository_url), sha: Map.get(json, :sha), statuses_url: Map.get(json, :statuses_url), task: Map.get(json, :task), transient_environment: Map.get(json, :transient_environment), updated_at: Map.get(json, :updated_at), url: Map.get(json, :url) } end def from_json(other, _headers), do: other end