lib/google_api/on_demand_scanning/v1/model/occurrence.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.OnDemandScanning.V1.Model.Occurrence do
  @moduledoc """
  An instance of an analysis type that has been found on a resource.

  ## Attributes

  *   `attestation` (*type:* `GoogleApi.OnDemandScanning.V1.Model.AttestationOccurrence.t`, *default:* `nil`) - Describes an attestation of an artifact.
  *   `build` (*type:* `GoogleApi.OnDemandScanning.V1.Model.BuildOccurrence.t`, *default:* `nil`) - Describes a verifiable build.
  *   `compliance` (*type:* `GoogleApi.OnDemandScanning.V1.Model.ComplianceOccurrence.t`, *default:* `nil`) - Describes a compliance violation on a linked resource.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this occurrence was created.
  *   `deployment` (*type:* `GoogleApi.OnDemandScanning.V1.Model.DeploymentOccurrence.t`, *default:* `nil`) - Describes the deployment of an artifact on a runtime.
  *   `discovery` (*type:* `GoogleApi.OnDemandScanning.V1.Model.DiscoveryOccurrence.t`, *default:* `nil`) - Describes when a resource was discovered.
  *   `dsseAttestation` (*type:* `GoogleApi.OnDemandScanning.V1.Model.DSSEAttestationOccurrence.t`, *default:* `nil`) - Describes an attestation of an artifact using dsse.
  *   `envelope` (*type:* `GoogleApi.OnDemandScanning.V1.Model.Envelope.t`, *default:* `nil`) - https://github.com/secure-systems-lab/dsse
  *   `image` (*type:* `GoogleApi.OnDemandScanning.V1.Model.ImageOccurrence.t`, *default:* `nil`) - Describes how this resource derives from the basis in the associated note.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
  *   `noteName` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. The analysis note associated with this occurrence, in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used as a filter in list requests.
  *   `package` (*type:* `GoogleApi.OnDemandScanning.V1.Model.PackageOccurrence.t`, *default:* `nil`) - Describes the installation of a package on the linked resource.
  *   `remediation` (*type:* `String.t`, *default:* `nil`) - A description of actions that can be taken to remedy the note.
  *   `resourceUri` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. A URI that represents the resource for which the occurrence applies. For example, `https://gcr.io/project/image@sha256:123abc` for a Docker image.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this occurrence was last updated.
  *   `upgrade` (*type:* `GoogleApi.OnDemandScanning.V1.Model.UpgradeOccurrence.t`, *default:* `nil`) - Describes an available package upgrade on the linked resource.
  *   `vulnerability` (*type:* `GoogleApi.OnDemandScanning.V1.Model.VulnerabilityOccurrence.t`, *default:* `nil`) - Describes a security vulnerability.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :attestation => GoogleApi.OnDemandScanning.V1.Model.AttestationOccurrence.t() | nil,
          :build => GoogleApi.OnDemandScanning.V1.Model.BuildOccurrence.t() | nil,
          :compliance => GoogleApi.OnDemandScanning.V1.Model.ComplianceOccurrence.t() | nil,
          :createTime => DateTime.t() | nil,
          :deployment => GoogleApi.OnDemandScanning.V1.Model.DeploymentOccurrence.t() | nil,
          :discovery => GoogleApi.OnDemandScanning.V1.Model.DiscoveryOccurrence.t() | nil,
          :dsseAttestation =>
            GoogleApi.OnDemandScanning.V1.Model.DSSEAttestationOccurrence.t() | nil,
          :envelope => GoogleApi.OnDemandScanning.V1.Model.Envelope.t() | nil,
          :image => GoogleApi.OnDemandScanning.V1.Model.ImageOccurrence.t() | nil,
          :kind => String.t() | nil,
          :name => String.t() | nil,
          :noteName => String.t() | nil,
          :package => GoogleApi.OnDemandScanning.V1.Model.PackageOccurrence.t() | nil,
          :remediation => String.t() | nil,
          :resourceUri => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :upgrade => GoogleApi.OnDemandScanning.V1.Model.UpgradeOccurrence.t() | nil,
          :vulnerability => GoogleApi.OnDemandScanning.V1.Model.VulnerabilityOccurrence.t() | nil
        }

  field(:attestation, as: GoogleApi.OnDemandScanning.V1.Model.AttestationOccurrence)
  field(:build, as: GoogleApi.OnDemandScanning.V1.Model.BuildOccurrence)
  field(:compliance, as: GoogleApi.OnDemandScanning.V1.Model.ComplianceOccurrence)
  field(:createTime, as: DateTime)
  field(:deployment, as: GoogleApi.OnDemandScanning.V1.Model.DeploymentOccurrence)
  field(:discovery, as: GoogleApi.OnDemandScanning.V1.Model.DiscoveryOccurrence)
  field(:dsseAttestation, as: GoogleApi.OnDemandScanning.V1.Model.DSSEAttestationOccurrence)
  field(:envelope, as: GoogleApi.OnDemandScanning.V1.Model.Envelope)
  field(:image, as: GoogleApi.OnDemandScanning.V1.Model.ImageOccurrence)
  field(:kind)
  field(:name)
  field(:noteName)
  field(:package, as: GoogleApi.OnDemandScanning.V1.Model.PackageOccurrence)
  field(:remediation)
  field(:resourceUri)
  field(:updateTime, as: DateTime)
  field(:upgrade, as: GoogleApi.OnDemandScanning.V1.Model.UpgradeOccurrence)
  field(:vulnerability, as: GoogleApi.OnDemandScanning.V1.Model.VulnerabilityOccurrence)
end

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

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