# 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.ProjectsV2Field do @moduledoc false defstruct [ :configuration, :created_at, :data_type, :id, :issue_field_id, :name, :node_id, :options, :project_url, :updated_at ] 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__{ configuration: Map.get(json, :configuration), created_at: Map.get(json, :created_at), data_type: Map.get(json, :data_type), id: Map.get(json, :id), issue_field_id: Map.get(json, :issue_field_id), name: Map.get(json, :name), node_id: Map.get(json, :node_id), options: Enum.map( Map.get(json, :options) || [], &Noizu.Github.ProjectsV2SingleSelectOptions.from_json(&1) ), project_url: Map.get(json, :project_url), updated_at: Map.get(json, :updated_at) } end def from_json(other, _headers), do: other end