# 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.ReviewComment do @moduledoc false defstruct [ :_links, :author_association, :body, :body_html, :body_text, :commit_id, :created_at, :diff_hunk, :html_url, :id, :in_reply_to_id, :line, :node_id, :original_commit_id, :original_line, :original_position, :original_start_line, :path, :position, :pull_request_review_id, :pull_request_url, :reactions, :side, :start_line, :start_side, :subject_type, :updated_at, :url, :user ] 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__{ _links: Map.get(json, :_links), author_association: Map.get(json, :author_association), body: Map.get(json, :body), body_html: Map.get(json, :body_html), body_text: Map.get(json, :body_text), commit_id: Map.get(json, :commit_id), created_at: Map.get(json, :created_at), diff_hunk: Map.get(json, :diff_hunk), html_url: Map.get(json, :html_url), id: Map.get(json, :id), in_reply_to_id: Map.get(json, :in_reply_to_id), line: Map.get(json, :line), node_id: Map.get(json, :node_id), original_commit_id: Map.get(json, :original_commit_id), original_line: Map.get(json, :original_line), original_position: Map.get(json, :original_position), original_start_line: Map.get(json, :original_start_line), path: Map.get(json, :path), position: Map.get(json, :position), pull_request_review_id: Map.get(json, :pull_request_review_id), pull_request_url: Map.get(json, :pull_request_url), reactions: Noizu.Github.ReactionRollup.from_json(Map.get(json, :reactions)), side: Map.get(json, :side), start_line: Map.get(json, :start_line), start_side: Map.get(json, :start_side), subject_type: Map.get(json, :subject_type), updated_at: Map.get(json, :updated_at), url: Map.get(json, :url), user: Noizu.Github.NullableSimpleUser.from_json(Map.get(json, :user)) } end def from_json(other, _headers), do: other end