lib/google_api/container_analysis/v1/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.V1.Model.Note do
  @moduledoc """
  A type of analysis that can be done for a resource.

  ## Attributes

  *   `attestation` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.AttestationNote.t`, *default:* `nil`) - A note describing an attestation role.
  *   `build` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.BuildNote.t`, *default:* `nil`) - A note describing build provenance for a verifiable build.
  *   `compliance` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ComplianceNote.t`, *default:* `nil`) - A note describing a compliance check.
  *   `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.
  *   `deployment` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.DeploymentNote.t`, *default:* `nil`) - A note describing something that can be deployed.
  *   `discovery` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.DiscoveryNote.t`, *default:* `nil`) - A note describing the initial analysis of a resource.
  *   `dsseAttestation` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.DSSEAttestationNote.t`, *default:* `nil`) - A note describing a dsse attestation note.
  *   `expirationTime` (*type:* `DateTime.t`, *default:* `nil`) - Time of expiration for this note. Empty if note does not expire.
  *   `image` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ImageNote.t`, *default:* `nil`) - A note describing a base image.
  *   `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.V1.Model.PackageNote.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.V1.Model.RelatedUrl.t)`, *default:* `nil`) - URLs associated with this note.
  *   `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this note.
  *   `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.
  *   `upgrade` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.UpgradeNote.t`, *default:* `nil`) - A note describing available package upgrades.
  *   `vulnerability` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote.t`, *default:* `nil`) - A note describing a package vulnerability.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :attestation => GoogleApi.ContainerAnalysis.V1.Model.AttestationNote.t() | nil,
          :build => GoogleApi.ContainerAnalysis.V1.Model.BuildNote.t() | nil,
          :compliance => GoogleApi.ContainerAnalysis.V1.Model.ComplianceNote.t() | nil,
          :createTime => DateTime.t() | nil,
          :deployment => GoogleApi.ContainerAnalysis.V1.Model.DeploymentNote.t() | nil,
          :discovery => GoogleApi.ContainerAnalysis.V1.Model.DiscoveryNote.t() | nil,
          :dsseAttestation => GoogleApi.ContainerAnalysis.V1.Model.DSSEAttestationNote.t() | nil,
          :expirationTime => DateTime.t() | nil,
          :image => GoogleApi.ContainerAnalysis.V1.Model.ImageNote.t() | nil,
          :kind => String.t() | nil,
          :longDescription => String.t() | nil,
          :name => String.t() | nil,
          :package => GoogleApi.ContainerAnalysis.V1.Model.PackageNote.t() | nil,
          :relatedNoteNames => list(String.t()) | nil,
          :relatedUrl => list(GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t()) | nil,
          :shortDescription => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :upgrade => GoogleApi.ContainerAnalysis.V1.Model.UpgradeNote.t() | nil,
          :vulnerability => GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote.t() | nil
        }

  field(:attestation, as: GoogleApi.ContainerAnalysis.V1.Model.AttestationNote)
  field(:build, as: GoogleApi.ContainerAnalysis.V1.Model.BuildNote)
  field(:compliance, as: GoogleApi.ContainerAnalysis.V1.Model.ComplianceNote)
  field(:createTime, as: DateTime)
  field(:deployment, as: GoogleApi.ContainerAnalysis.V1.Model.DeploymentNote)
  field(:discovery, as: GoogleApi.ContainerAnalysis.V1.Model.DiscoveryNote)
  field(:dsseAttestation, as: GoogleApi.ContainerAnalysis.V1.Model.DSSEAttestationNote)
  field(:expirationTime, as: DateTime)
  field(:image, as: GoogleApi.ContainerAnalysis.V1.Model.ImageNote)
  field(:kind)
  field(:longDescription)
  field(:name)
  field(:package, as: GoogleApi.ContainerAnalysis.V1.Model.PackageNote)
  field(:relatedNoteNames, type: :list)
  field(:relatedUrl, as: GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl, type: :list)
  field(:shortDescription)
  field(:updateTime, as: DateTime)
  field(:upgrade, as: GoogleApi.ContainerAnalysis.V1.Model.UpgradeNote)
  field(:vulnerability, as: GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote)
end

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

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