lib/google_api/container_analysis/v1/model/cvss.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.CVSS do
  @moduledoc """
  Common Vulnerability Scoring System. For details, see https://www.first.org/cvss/specification-document This is a message we will try to use for storing multiple versions of CVSS. The intention is that as new versions of CVSS scores get added, we will be able to modify this message rather than adding new protos for each new version of the score.

  ## Attributes

  *   `attackComplexity` (*type:* `String.t`, *default:* `nil`) - 
  *   `attackVector` (*type:* `String.t`, *default:* `nil`) - Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments.
  *   `authentication` (*type:* `String.t`, *default:* `nil`) - 
  *   `availabilityImpact` (*type:* `String.t`, *default:* `nil`) - 
  *   `baseScore` (*type:* `number()`, *default:* `nil`) - The base score is a function of the base metric scores.
  *   `confidentialityImpact` (*type:* `String.t`, *default:* `nil`) - 
  *   `exploitabilityScore` (*type:* `number()`, *default:* `nil`) - 
  *   `impactScore` (*type:* `number()`, *default:* `nil`) - 
  *   `integrityImpact` (*type:* `String.t`, *default:* `nil`) - 
  *   `privilegesRequired` (*type:* `String.t`, *default:* `nil`) - 
  *   `scope` (*type:* `String.t`, *default:* `nil`) - 
  *   `userInteraction` (*type:* `String.t`, *default:* `nil`) - 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :attackComplexity => String.t() | nil,
          :attackVector => String.t() | nil,
          :authentication => String.t() | nil,
          :availabilityImpact => String.t() | nil,
          :baseScore => number() | nil,
          :confidentialityImpact => String.t() | nil,
          :exploitabilityScore => number() | nil,
          :impactScore => number() | nil,
          :integrityImpact => String.t() | nil,
          :privilegesRequired => String.t() | nil,
          :scope => String.t() | nil,
          :userInteraction => String.t() | nil
        }

  field(:attackComplexity)
  field(:attackVector)
  field(:authentication)
  field(:availabilityImpact)
  field(:baseScore)
  field(:confidentialityImpact)
  field(:exploitabilityScore)
  field(:impactScore)
  field(:integrityImpact)
  field(:privilegesRequired)
  field(:scope)
  field(:userInteraction)
end

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

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