# 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.Codespace do @moduledoc false defstruct [ :billable_owner, :created_at, :devcontainer_path, :display_name, :environment_id, :git_status, :id, :idle_timeout_minutes, :idle_timeout_notice, :last_known_stop_notice, :last_used_at, :location, :machine, :machines_url, :name, :owner, :pending_operation, :pending_operation_disabled_reason, :prebuild, :publish_url, :pulls_url, :recent_folders, :repository, :retention_expires_at, :retention_period_minutes, :runtime_constraints, :start_url, :state, :stop_url, :updated_at, :url, :web_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__{ billable_owner: Noizu.Github.SimpleUser.from_json(Map.get(json, :billable_owner)), created_at: Map.get(json, :created_at), devcontainer_path: Map.get(json, :devcontainer_path), display_name: Map.get(json, :display_name), environment_id: Map.get(json, :environment_id), git_status: Map.get(json, :git_status), id: Map.get(json, :id), idle_timeout_minutes: Map.get(json, :idle_timeout_minutes), idle_timeout_notice: Map.get(json, :idle_timeout_notice), last_known_stop_notice: Map.get(json, :last_known_stop_notice), last_used_at: Map.get(json, :last_used_at), location: Map.get(json, :location), machine: Noizu.Github.NullableCodespaceMachine.from_json(Map.get(json, :machine)), machines_url: Map.get(json, :machines_url), name: Map.get(json, :name), owner: Noizu.Github.SimpleUser.from_json(Map.get(json, :owner)), pending_operation: Map.get(json, :pending_operation), pending_operation_disabled_reason: Map.get(json, :pending_operation_disabled_reason), prebuild: Map.get(json, :prebuild), publish_url: Map.get(json, :publish_url), pulls_url: Map.get(json, :pulls_url), recent_folders: Map.get(json, :recent_folders), repository: Noizu.Github.MinimalRepository.from_json(Map.get(json, :repository)), retention_expires_at: Map.get(json, :retention_expires_at), retention_period_minutes: Map.get(json, :retention_period_minutes), runtime_constraints: Map.get(json, :runtime_constraints), start_url: Map.get(json, :start_url), state: Map.get(json, :state), stop_url: Map.get(json, :stop_url), updated_at: Map.get(json, :updated_at), url: Map.get(json, :url), web_url: Map.get(json, :web_url) } end def from_json(other, _headers), do: other end