lib/google_api/os_config/v1/model/vulnerability_report_vulnerability_item.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.OSConfig.V1.Model.VulnerabilityReportVulnerabilityItem do
  @moduledoc """
  OS inventory item that is affected by a vulnerability or fixed as a result of a vulnerability.

  ## Attributes

  *   `availableInventoryItemId` (*type:* `String.t`, *default:* `nil`) - Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. If there is no available fix, the field is empty. The `inventory_item` value specifies the latest `SoftwarePackage` available to the VM that fixes the vulnerability.
  *   `fixedCpeUri` (*type:* `String.t`, *default:* `nil`) - The recommended [CPE URI](https://cpe.mitre.org/specification/) update that contains a fix for this vulnerability.
  *   `installedInventoryItemId` (*type:* `String.t`, *default:* `nil`) - Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. This field displays the inventory items affected by this vulnerability. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. For some operating systems, this field might be empty.
  *   `upstreamFix` (*type:* `String.t`, *default:* `nil`) - The upstream OS patch, packages or KB that fixes the vulnerability.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :availableInventoryItemId => String.t() | nil,
          :fixedCpeUri => String.t() | nil,
          :installedInventoryItemId => String.t() | nil,
          :upstreamFix => String.t() | nil
        }

  field(:availableInventoryItemId)
  field(:fixedCpeUri)
  field(:installedInventoryItemId)
  field(:upstreamFix)
end

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

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