lib/google_api/container_analysis/v1beta1/model/note.ex

# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Note do
  @moduledoc """
  A type of analysis that can be done for a resource.

  ## Attributes

  *   `attestationAuthority` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Authority.t`, *default:* `nil`) - A note describing an attestation role.
  *   `baseImage` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Basis.t`, *default:* `nil`) - A note describing a base image.
  *   `build` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Build.t`, *default:* `nil`) - A note describing build provenance for a verifiable build.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this note was created. This field can be used as a filter in list requests.
  *   `deployable` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Deployable.t`, *default:* `nil`) - A note describing something that can be deployed.
  *   `discovery` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Discovery.t`, *default:* `nil`) - A note describing the initial analysis of a resource.
  *   `expirationTime` (*type:* `DateTime.t`, *default:* `nil`) - Time of expiration for this note. Empty if note does not expire.
  *   `intoto` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.InToto.t`, *default:* `nil`) - A note describing an in-toto link.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Output only. The type of analysis. This field can be used as a filter in list requests.
  *   `longDescription` (*type:* `String.t`, *default:* `nil`) - A detailed description of this note.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
  *   `package` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Package.t`, *default:* `nil`) - A note describing a package hosted by various package managers.
  *   `relatedNoteNames` (*type:* `list(String.t)`, *default:* `nil`) - Other notes related to this note.
  *   `relatedUrl` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t)`, *default:* `nil`) - URLs associated with this note.
  *   `sbom` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentNote.t`, *default:* `nil`) - A note describing a software bill of materials.
  *   `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this note.
  *   `spdxFile` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.FileNote.t`, *default:* `nil`) - A note describing an SPDX File.
  *   `spdxPackage` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.PackageInfoNote.t`, *default:* `nil`) - A note describing an SPDX Package.
  *   `spdxRelationship` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.RelationshipNote.t`, *default:* `nil`) - A note describing an SPDX File.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this note was last updated. This field can be used as a filter in list requests.
  *   `vulnerability` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Vulnerability.t`, *default:* `nil`) - A note describing a package vulnerability.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :attestationAuthority => GoogleApi.ContainerAnalysis.V1beta1.Model.Authority.t() | nil,
          :baseImage => GoogleApi.ContainerAnalysis.V1beta1.Model.Basis.t() | nil,
          :build => GoogleApi.ContainerAnalysis.V1beta1.Model.Build.t() | nil,
          :createTime => DateTime.t() | nil,
          :deployable => GoogleApi.ContainerAnalysis.V1beta1.Model.Deployable.t() | nil,
          :discovery => GoogleApi.ContainerAnalysis.V1beta1.Model.Discovery.t() | nil,
          :expirationTime => DateTime.t() | nil,
          :intoto => GoogleApi.ContainerAnalysis.V1beta1.Model.InToto.t() | nil,
          :kind => String.t() | nil,
          :longDescription => String.t() | nil,
          :name => String.t() | nil,
          :package => GoogleApi.ContainerAnalysis.V1beta1.Model.Package.t() | nil,
          :relatedNoteNames => list(String.t()) | nil,
          :relatedUrl => list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t()) | nil,
          :sbom => GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentNote.t() | nil,
          :shortDescription => String.t() | nil,
          :spdxFile => GoogleApi.ContainerAnalysis.V1beta1.Model.FileNote.t() | nil,
          :spdxPackage => GoogleApi.ContainerAnalysis.V1beta1.Model.PackageInfoNote.t() | nil,
          :spdxRelationship =>
            GoogleApi.ContainerAnalysis.V1beta1.Model.RelationshipNote.t() | nil,
          :updateTime => DateTime.t() | nil,
          :vulnerability => GoogleApi.ContainerAnalysis.V1beta1.Model.Vulnerability.t() | nil
        }

  field(:attestationAuthority, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Authority)
  field(:baseImage, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Basis)
  field(:build, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Build)
  field(:createTime, as: DateTime)
  field(:deployable, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Deployable)
  field(:discovery, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Discovery)
  field(:expirationTime, as: DateTime)
  field(:intoto, as: GoogleApi.ContainerAnalysis.V1beta1.Model.InToto)
  field(:kind)
  field(:longDescription)
  field(:name)
  field(:package, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Package)
  field(:relatedNoteNames, type: :list)
  field(:relatedUrl, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl, type: :list)
  field(:sbom, as: GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentNote)
  field(:shortDescription)
  field(:spdxFile, as: GoogleApi.ContainerAnalysis.V1beta1.Model.FileNote)
  field(:spdxPackage, as: GoogleApi.ContainerAnalysis.V1beta1.Model.PackageInfoNote)
  field(:spdxRelationship, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RelationshipNote)
  field(:updateTime, as: DateTime)
  field(:vulnerability, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Vulnerability)
end

defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Note do
  def decode(value, options) do
    GoogleApi.ContainerAnalysis.V1beta1.Model.Note.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Note do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end