# 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.OrganizationInvitation do @moduledoc false defstruct [ :created_at, :email, :failed_at, :failed_reason, :id, :invitation_source, :invitation_teams_url, :inviter, :login, :node_id, :role, :team_count ] 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), email: Map.get(json, :email), failed_at: Map.get(json, :failed_at), failed_reason: Map.get(json, :failed_reason), id: Map.get(json, :id), invitation_source: Map.get(json, :invitation_source), invitation_teams_url: Map.get(json, :invitation_teams_url), inviter: Noizu.Github.SimpleUser.from_json(Map.get(json, :inviter)), login: Map.get(json, :login), node_id: Map.get(json, :node_id), role: Map.get(json, :role), team_count: Map.get(json, :team_count) } end def from_json(other, _headers), do: other end