# 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.CodeScanningAnalysis do @moduledoc false defstruct [ :analysis_key, :category, :commit_sha, :created_at, :deletable, :environment, :error, :id, :ref, :results_count, :rules_count, :sarif_id, :tool, :url, :warning ] 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__{ analysis_key: Map.get(json, :analysis_key), category: Map.get(json, :category), commit_sha: Map.get(json, :commit_sha), created_at: Map.get(json, :created_at), deletable: Map.get(json, :deletable), environment: Map.get(json, :environment), error: Map.get(json, :error), id: Map.get(json, :id), ref: Map.get(json, :ref), results_count: Map.get(json, :results_count), rules_count: Map.get(json, :rules_count), sarif_id: Map.get(json, :sarif_id), tool: Noizu.Github.CodeScanningAnalysisTool.from_json(Map.get(json, :tool)), url: Map.get(json, :url), warning: Map.get(json, :warning) } end def from_json(other, _headers), do: other end