# 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.DependabotAlertWithRepository do @moduledoc false defstruct [ :assignees, :auto_dismissed_at, :created_at, :dependency, :dismissal_request, :dismissed_at, :dismissed_by, :dismissed_comment, :dismissed_reason, :fixed_at, :html_url, :number, :repository, :security_advisory, :security_vulnerability, :state, :updated_at, :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__{ assignees: Enum.map(Map.get(json, :assignees) || [], &Noizu.Github.SimpleUser.from_json(&1)), auto_dismissed_at: Map.get(json, :auto_dismissed_at), created_at: Map.get(json, :created_at), dependency: Map.get(json, :dependency), dismissal_request: Noizu.Github.DependabotAlertDismissalRequestSimple.from_json( Map.get(json, :dismissal_request) ), dismissed_at: Map.get(json, :dismissed_at), dismissed_by: Noizu.Github.NullableSimpleUser.from_json(Map.get(json, :dismissed_by)), dismissed_comment: Map.get(json, :dismissed_comment), dismissed_reason: Map.get(json, :dismissed_reason), fixed_at: Map.get(json, :fixed_at), html_url: Map.get(json, :html_url), number: Map.get(json, :number), repository: Noizu.Github.SimpleRepository.from_json(Map.get(json, :repository)), security_advisory: Noizu.Github.DependabotAlertSecurityAdvisory.from_json(Map.get(json, :security_advisory)), security_vulnerability: Noizu.Github.DependabotAlertSecurityVulnerability.from_json( Map.get(json, :security_vulnerability) ), state: Map.get(json, :state), updated_at: Map.get(json, :updated_at), url: Map.get(json, :url) } end def from_json(other, _headers), do: other end