# 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.WebhooksSecurityAdvisory do @moduledoc false defstruct [ :cvss, :cvss_severities, :cwes, :description, :ghsa_id, :identifiers, :published_at, :references, :severity, :summary, :updated_at, :vulnerabilities, :withdrawn_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__{ cvss: Map.get(json, :cvss), cvss_severities: Noizu.Github.CvssSeverities.from_json(Map.get(json, :cvss_severities)), cwes: Map.get(json, :cwes), description: Map.get(json, :description), ghsa_id: Map.get(json, :ghsa_id), identifiers: Map.get(json, :identifiers), published_at: Map.get(json, :published_at), references: Map.get(json, :references), severity: Map.get(json, :severity), summary: Map.get(json, :summary), updated_at: Map.get(json, :updated_at), vulnerabilities: Map.get(json, :vulnerabilities), withdrawn_at: Map.get(json, :withdrawn_at) } end def from_json(other, _headers), do: other end