// Code generated by sidekick. DO NOT EDIT.
//
// Copyright 2026 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
//
//     https://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.

import Foundation
import GoogleCloudWkt

/// Common Vulnerability Scoring System version 3.
/// For details, see https://www.first.org/cvss/specification-document
public struct CVSSv3: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// The base score is a function of the base metric scores.
  /// https://www.first.org/cvss/specification-document#Base-Metrics
  public var baseScore: Swift.Float = Swift.Float()

  /// The Exploitability sub-score equation is derived from the Base
  /// Exploitability metrics.
  /// https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics
  public var exploitabilityScore: Swift.Float = Swift.Float()

  /// The Impact sub-score equation is derived from the Base Impact metrics.
  public var impactScore: Swift.Float = Swift.Float()

  /// This metric reflects the context by which vulnerability exploitation is
  /// possible.
  public var attackVector: CVSSv3.AttackVector = CVSSv3.AttackVector()

  /// This metric describes the conditions beyond the attacker's control that
  /// must exist in order to exploit the vulnerability.
  public var attackComplexity: CVSSv3.AttackComplexity = CVSSv3.AttackComplexity()

  /// This metric describes the level of privileges an attacker must possess
  /// before successfully exploiting the vulnerability.
  public var privilegesRequired: CVSSv3.PrivilegesRequired = CVSSv3.PrivilegesRequired()

  /// This metric captures the requirement for a human user, other than the
  /// attacker, to participate in the successful compromise of the vulnerable
  /// component.
  public var userInteraction: CVSSv3.UserInteraction = CVSSv3.UserInteraction()

  /// The Scope metric captures whether a vulnerability in one vulnerable
  /// component impacts resources in components beyond its security scope.
  public var scope: CVSSv3.Scope = CVSSv3.Scope()

  /// This metric measures the impact to the confidentiality of the information
  /// resources managed by a software component due to a successfully exploited
  /// vulnerability.
  public var confidentialityImpact: CVSSv3.Impact = CVSSv3.Impact()

  /// This metric measures the impact to integrity of a successfully exploited
  /// vulnerability.
  public var integrityImpact: CVSSv3.Impact = CVSSv3.Impact()

  /// This metric measures the impact to the availability of the impacted
  /// component resulting from a successfully exploited vulnerability.
  public var availabilityImpact: CVSSv3.Impact = CVSSv3.Impact()

  /// Initialize a new instance of `CVSSv3`.
  public init() {}

  /// Use `config` to return a new instance of this object, with some fields updated.
  ///
  /// Commonly used to initialize the value, for example:
  ///
  /// ```
  /// let value = CVSSv3().with { $0.baseScore = ... }
  /// ```
  public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
    var copy = self
    try config(&copy)
    return copy
  }

  /// This metric reflects the context by which vulnerability exploitation is
  /// possible.
  public enum AttackVector: Codable, Equatable, Sendable {
    /// Invalid value.
    case unspecified
    /// The vulnerable component is bound to the network stack and the set of
    /// possible attackers extends beyond the other options listed below, up to
    /// and including the entire Internet.
    case network
    /// The vulnerable component is bound to the network stack, but the attack is
    /// limited at the protocol level to a logically adjacent topology.
    case adjacent
    /// The vulnerable component is not bound to the network stack and the
    /// attacker's path is via read/write/execute capabilities.
    case local
    /// The attack requires the attacker to physically touch or manipulate the
    /// vulnerable component.
    case physical
    /// Encodes an unknown integer value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownIntValue(Int)
    /// Encodes an unknown string value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownStringValue(String)

    public init() {
      self = .unspecified
    }

    /// Returns the integer value associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown string value, this returns `nil`.
    public var intValue: Int? {
      switch self {
      case .unspecified: return 0
      case .network: return 1
      case .adjacent: return 2
      case .local: return 3
      case .physical: return 4
      case .unknownIntValue(let v): return v
      case .unknownStringValue: return nil
      }
    }

    /// Returns the string value (or name) associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown integer value, this returns `nil`.
    public var stringValue: Swift.String? {
      switch self {
      case .unspecified: return "ATTACK_VECTOR_UNSPECIFIED"
      case .network: return "ATTACK_VECTOR_NETWORK"
      case .adjacent: return "ATTACK_VECTOR_ADJACENT"
      case .local: return "ATTACK_VECTOR_LOCAL"
      case .physical: return "ATTACK_VECTOR_PHYSICAL"
      case .unknownIntValue: return nil
      case .unknownStringValue(let v): return v
      }
    }

    /// Initialize from a string value.
    ///
    /// If the value is unknown, this initializes to [`unknownStringValue`](doc:AttackVector/unknownStringValue(_:)).
    public init(stringValue: Swift.String) {
      switch stringValue {
      case "ATTACK_VECTOR_UNSPECIFIED": self = .unspecified
      case "ATTACK_VECTOR_NETWORK": self = .network
      case "ATTACK_VECTOR_ADJACENT": self = .adjacent
      case "ATTACK_VECTOR_LOCAL": self = .local
      case "ATTACK_VECTOR_PHYSICAL": self = .physical
      default: self = .unknownStringValue(stringValue)
      }
    }

    /// Initialize from an integer value.
    ///
    /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AttackVector/unknownIntValue(_:)).
    public init(intValue: Int) {
      switch intValue {
      case 0: self = .unspecified
      case 1: self = .network
      case 2: self = .adjacent
      case 3: self = .local
      case 4: self = .physical
      default: self = .unknownIntValue(intValue)
      }
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.singleValueContainer()
      if let v = try? container.decode(Int.self) {
        self.init(intValue: v)
        return
      }
      if let s = try? container.decode(String.self) {
        if let v = Int(s) {
          self.init(intValue: v)
        } else {
          self.init(stringValue: s)
        }
        return
      }
      throw DecodingError.dataCorruptedError(
        in: container, debugDescription: "Expected enum value, must be integer or string.")
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.singleValueContainer()
      switch self {
      case .unspecified: return try container.encode(0)
      case .network: return try container.encode(1)
      case .adjacent: return try container.encode(2)
      case .local: return try container.encode(3)
      case .physical: return try container.encode(4)
      case .unknownIntValue(let v): return try container.encode(v)
      case .unknownStringValue(let v): return try container.encode(v)
      }
    }
  }

  /// This metric describes the conditions beyond the attacker's control that
  /// must exist in order to exploit the vulnerability.
  public enum AttackComplexity: Codable, Equatable, Sendable {
    /// Invalid value.
    case unspecified
    /// Specialized access conditions or extenuating circumstances do not exist.
    /// An attacker can expect repeatable success when attacking the vulnerable
    /// component.
    case low
    /// A successful attack depends on conditions beyond the attacker's control.
    /// That is, a successful attack cannot be accomplished at will, but requires
    /// the attacker to invest in some measurable amount of effort in preparation
    /// or execution against the vulnerable component before a successful attack
    /// can be expected.
    case high
    /// Encodes an unknown integer value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownIntValue(Int)
    /// Encodes an unknown string value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownStringValue(String)

    public init() {
      self = .unspecified
    }

    /// Returns the integer value associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown string value, this returns `nil`.
    public var intValue: Int? {
      switch self {
      case .unspecified: return 0
      case .low: return 1
      case .high: return 2
      case .unknownIntValue(let v): return v
      case .unknownStringValue: return nil
      }
    }

    /// Returns the string value (or name) associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown integer value, this returns `nil`.
    public var stringValue: Swift.String? {
      switch self {
      case .unspecified: return "ATTACK_COMPLEXITY_UNSPECIFIED"
      case .low: return "ATTACK_COMPLEXITY_LOW"
      case .high: return "ATTACK_COMPLEXITY_HIGH"
      case .unknownIntValue: return nil
      case .unknownStringValue(let v): return v
      }
    }

    /// Initialize from a string value.
    ///
    /// If the value is unknown, this initializes to [`unknownStringValue`](doc:AttackComplexity/unknownStringValue(_:)).
    public init(stringValue: Swift.String) {
      switch stringValue {
      case "ATTACK_COMPLEXITY_UNSPECIFIED": self = .unspecified
      case "ATTACK_COMPLEXITY_LOW": self = .low
      case "ATTACK_COMPLEXITY_HIGH": self = .high
      default: self = .unknownStringValue(stringValue)
      }
    }

    /// Initialize from an integer value.
    ///
    /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AttackComplexity/unknownIntValue(_:)).
    public init(intValue: Int) {
      switch intValue {
      case 0: self = .unspecified
      case 1: self = .low
      case 2: self = .high
      default: self = .unknownIntValue(intValue)
      }
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.singleValueContainer()
      if let v = try? container.decode(Int.self) {
        self.init(intValue: v)
        return
      }
      if let s = try? container.decode(String.self) {
        if let v = Int(s) {
          self.init(intValue: v)
        } else {
          self.init(stringValue: s)
        }
        return
      }
      throw DecodingError.dataCorruptedError(
        in: container, debugDescription: "Expected enum value, must be integer or string.")
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.singleValueContainer()
      switch self {
      case .unspecified: return try container.encode(0)
      case .low: return try container.encode(1)
      case .high: return try container.encode(2)
      case .unknownIntValue(let v): return try container.encode(v)
      case .unknownStringValue(let v): return try container.encode(v)
      }
    }
  }

  /// This metric describes the level of privileges an attacker must possess
  /// before successfully exploiting the vulnerability.
  public enum PrivilegesRequired: Codable, Equatable, Sendable {
    /// Invalid value.
    case unspecified
    /// The attacker is unauthorized prior to attack, and therefore does not
    /// require any access to settings or files of the vulnerable system to
    /// carry out an attack.
    case `none`
    /// The attacker requires privileges that provide basic user capabilities
    /// that could normally affect only settings and files owned by a user.
    /// Alternatively, an attacker with Low privileges has the ability to access
    /// only non-sensitive resources.
    case low
    /// The attacker requires privileges that provide significant (e.g.,
    /// administrative) control over the vulnerable component allowing access to
    /// component-wide settings and files.
    case high
    /// Encodes an unknown integer value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownIntValue(Int)
    /// Encodes an unknown string value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownStringValue(String)

    public init() {
      self = .unspecified
    }

    /// Returns the integer value associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown string value, this returns `nil`.
    public var intValue: Int? {
      switch self {
      case .unspecified: return 0
      case .`none`: return 1
      case .low: return 2
      case .high: return 3
      case .unknownIntValue(let v): return v
      case .unknownStringValue: return nil
      }
    }

    /// Returns the string value (or name) associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown integer value, this returns `nil`.
    public var stringValue: Swift.String? {
      switch self {
      case .unspecified: return "PRIVILEGES_REQUIRED_UNSPECIFIED"
      case .`none`: return "PRIVILEGES_REQUIRED_NONE"
      case .low: return "PRIVILEGES_REQUIRED_LOW"
      case .high: return "PRIVILEGES_REQUIRED_HIGH"
      case .unknownIntValue: return nil
      case .unknownStringValue(let v): return v
      }
    }

    /// Initialize from a string value.
    ///
    /// If the value is unknown, this initializes to [`unknownStringValue`](doc:PrivilegesRequired/unknownStringValue(_:)).
    public init(stringValue: Swift.String) {
      switch stringValue {
      case "PRIVILEGES_REQUIRED_UNSPECIFIED": self = .unspecified
      case "PRIVILEGES_REQUIRED_NONE": self = .`none`
      case "PRIVILEGES_REQUIRED_LOW": self = .low
      case "PRIVILEGES_REQUIRED_HIGH": self = .high
      default: self = .unknownStringValue(stringValue)
      }
    }

    /// Initialize from an integer value.
    ///
    /// If the value is unknown, this initializes to [`unknownIntValue`](doc:PrivilegesRequired/unknownIntValue(_:)).
    public init(intValue: Int) {
      switch intValue {
      case 0: self = .unspecified
      case 1: self = .`none`
      case 2: self = .low
      case 3: self = .high
      default: self = .unknownIntValue(intValue)
      }
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.singleValueContainer()
      if let v = try? container.decode(Int.self) {
        self.init(intValue: v)
        return
      }
      if let s = try? container.decode(String.self) {
        if let v = Int(s) {
          self.init(intValue: v)
        } else {
          self.init(stringValue: s)
        }
        return
      }
      throw DecodingError.dataCorruptedError(
        in: container, debugDescription: "Expected enum value, must be integer or string.")
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.singleValueContainer()
      switch self {
      case .unspecified: return try container.encode(0)
      case .`none`: return try container.encode(1)
      case .low: return try container.encode(2)
      case .high: return try container.encode(3)
      case .unknownIntValue(let v): return try container.encode(v)
      case .unknownStringValue(let v): return try container.encode(v)
      }
    }
  }

  /// This metric captures the requirement for a human user, other than the
  /// attacker, to participate in the successful compromise of the vulnerable
  /// component.
  public enum UserInteraction: Codable, Equatable, Sendable {
    /// Invalid value.
    case unspecified
    /// The vulnerable system can be exploited without interaction from any user.
    case `none`
    /// Successful exploitation of this vulnerability requires a user to take
    /// some action before the vulnerability can be exploited.
    case `required`
    /// Encodes an unknown integer value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownIntValue(Int)
    /// Encodes an unknown string value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownStringValue(String)

    public init() {
      self = .unspecified
    }

    /// Returns the integer value associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown string value, this returns `nil`.
    public var intValue: Int? {
      switch self {
      case .unspecified: return 0
      case .`none`: return 1
      case .`required`: return 2
      case .unknownIntValue(let v): return v
      case .unknownStringValue: return nil
      }
    }

    /// Returns the string value (or name) associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown integer value, this returns `nil`.
    public var stringValue: Swift.String? {
      switch self {
      case .unspecified: return "USER_INTERACTION_UNSPECIFIED"
      case .`none`: return "USER_INTERACTION_NONE"
      case .`required`: return "USER_INTERACTION_REQUIRED"
      case .unknownIntValue: return nil
      case .unknownStringValue(let v): return v
      }
    }

    /// Initialize from a string value.
    ///
    /// If the value is unknown, this initializes to [`unknownStringValue`](doc:UserInteraction/unknownStringValue(_:)).
    public init(stringValue: Swift.String) {
      switch stringValue {
      case "USER_INTERACTION_UNSPECIFIED": self = .unspecified
      case "USER_INTERACTION_NONE": self = .`none`
      case "USER_INTERACTION_REQUIRED": self = .`required`
      default: self = .unknownStringValue(stringValue)
      }
    }

    /// Initialize from an integer value.
    ///
    /// If the value is unknown, this initializes to [`unknownIntValue`](doc:UserInteraction/unknownIntValue(_:)).
    public init(intValue: Int) {
      switch intValue {
      case 0: self = .unspecified
      case 1: self = .`none`
      case 2: self = .`required`
      default: self = .unknownIntValue(intValue)
      }
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.singleValueContainer()
      if let v = try? container.decode(Int.self) {
        self.init(intValue: v)
        return
      }
      if let s = try? container.decode(String.self) {
        if let v = Int(s) {
          self.init(intValue: v)
        } else {
          self.init(stringValue: s)
        }
        return
      }
      throw DecodingError.dataCorruptedError(
        in: container, debugDescription: "Expected enum value, must be integer or string.")
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.singleValueContainer()
      switch self {
      case .unspecified: return try container.encode(0)
      case .`none`: return try container.encode(1)
      case .`required`: return try container.encode(2)
      case .unknownIntValue(let v): return try container.encode(v)
      case .unknownStringValue(let v): return try container.encode(v)
      }
    }
  }

  /// The Scope metric captures whether a vulnerability in one vulnerable
  /// component impacts resources in components beyond its security scope.
  public enum Scope: Codable, Equatable, Sendable {
    /// Invalid value.
    case unspecified
    /// An exploited vulnerability can only affect resources managed by the same
    /// security authority.
    case unchanged
    /// An exploited vulnerability can affect resources beyond the security scope
    /// managed by the security authority of the vulnerable component.
    case changed
    /// Encodes an unknown integer value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownIntValue(Int)
    /// Encodes an unknown string value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownStringValue(String)

    public init() {
      self = .unspecified
    }

    /// Returns the integer value associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown string value, this returns `nil`.
    public var intValue: Int? {
      switch self {
      case .unspecified: return 0
      case .unchanged: return 1
      case .changed: return 2
      case .unknownIntValue(let v): return v
      case .unknownStringValue: return nil
      }
    }

    /// Returns the string value (or name) associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown integer value, this returns `nil`.
    public var stringValue: Swift.String? {
      switch self {
      case .unspecified: return "SCOPE_UNSPECIFIED"
      case .unchanged: return "SCOPE_UNCHANGED"
      case .changed: return "SCOPE_CHANGED"
      case .unknownIntValue: return nil
      case .unknownStringValue(let v): return v
      }
    }

    /// Initialize from a string value.
    ///
    /// If the value is unknown, this initializes to [`unknownStringValue`](doc:Scope/unknownStringValue(_:)).
    public init(stringValue: Swift.String) {
      switch stringValue {
      case "SCOPE_UNSPECIFIED": self = .unspecified
      case "SCOPE_UNCHANGED": self = .unchanged
      case "SCOPE_CHANGED": self = .changed
      default: self = .unknownStringValue(stringValue)
      }
    }

    /// Initialize from an integer value.
    ///
    /// If the value is unknown, this initializes to [`unknownIntValue`](doc:Scope/unknownIntValue(_:)).
    public init(intValue: Int) {
      switch intValue {
      case 0: self = .unspecified
      case 1: self = .unchanged
      case 2: self = .changed
      default: self = .unknownIntValue(intValue)
      }
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.singleValueContainer()
      if let v = try? container.decode(Int.self) {
        self.init(intValue: v)
        return
      }
      if let s = try? container.decode(String.self) {
        if let v = Int(s) {
          self.init(intValue: v)
        } else {
          self.init(stringValue: s)
        }
        return
      }
      throw DecodingError.dataCorruptedError(
        in: container, debugDescription: "Expected enum value, must be integer or string.")
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.singleValueContainer()
      switch self {
      case .unspecified: return try container.encode(0)
      case .unchanged: return try container.encode(1)
      case .changed: return try container.encode(2)
      case .unknownIntValue(let v): return try container.encode(v)
      case .unknownStringValue(let v): return try container.encode(v)
      }
    }
  }

  /// The Impact metrics capture the effects of a successfully exploited
  /// vulnerability on the component that suffers the worst outcome that is most
  /// directly and predictably associated with the attack.
  public enum Impact: Codable, Equatable, Sendable {
    /// Invalid value.
    case unspecified
    /// High impact.
    case high
    /// Low impact.
    case low
    /// No impact.
    case `none`
    /// Encodes an unknown integer value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownIntValue(Int)
    /// Encodes an unknown string value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownStringValue(String)

    public init() {
      self = .unspecified
    }

    /// Returns the integer value associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown string value, this returns `nil`.
    public var intValue: Int? {
      switch self {
      case .unspecified: return 0
      case .high: return 1
      case .low: return 2
      case .`none`: return 3
      case .unknownIntValue(let v): return v
      case .unknownStringValue: return nil
      }
    }

    /// Returns the string value (or name) associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown integer value, this returns `nil`.
    public var stringValue: Swift.String? {
      switch self {
      case .unspecified: return "IMPACT_UNSPECIFIED"
      case .high: return "IMPACT_HIGH"
      case .low: return "IMPACT_LOW"
      case .`none`: return "IMPACT_NONE"
      case .unknownIntValue: return nil
      case .unknownStringValue(let v): return v
      }
    }

    /// Initialize from a string value.
    ///
    /// If the value is unknown, this initializes to [`unknownStringValue`](doc:Impact/unknownStringValue(_:)).
    public init(stringValue: Swift.String) {
      switch stringValue {
      case "IMPACT_UNSPECIFIED": self = .unspecified
      case "IMPACT_HIGH": self = .high
      case "IMPACT_LOW": self = .low
      case "IMPACT_NONE": self = .`none`
      default: self = .unknownStringValue(stringValue)
      }
    }

    /// Initialize from an integer value.
    ///
    /// If the value is unknown, this initializes to [`unknownIntValue`](doc:Impact/unknownIntValue(_:)).
    public init(intValue: Int) {
      switch intValue {
      case 0: self = .unspecified
      case 1: self = .high
      case 2: self = .low
      case 3: self = .`none`
      default: self = .unknownIntValue(intValue)
      }
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.singleValueContainer()
      if let v = try? container.decode(Int.self) {
        self.init(intValue: v)
        return
      }
      if let s = try? container.decode(String.self) {
        if let v = Int(s) {
          self.init(intValue: v)
        } else {
          self.init(stringValue: s)
        }
        return
      }
      throw DecodingError.dataCorruptedError(
        in: container, debugDescription: "Expected enum value, must be integer or string.")
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.singleValueContainer()
      switch self {
      case .unspecified: return try container.encode(0)
      case .high: return try container.encode(1)
      case .low: return try container.encode(2)
      case .`none`: return try container.encode(3)
      case .unknownIntValue(let v): return try container.encode(v)
      case .unknownStringValue(let v): return try container.encode(v)
      }
    }
  }

  public static var _anyTypeUrl: Swift.String {
    return "type.googleapis.com/google.cloud.osconfig.v1.CVSSv3"
  }
  public init(fromAny any: GoogleCloudWkt.`Any`) throws {
    self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
  }
  public func _pack() throws -> GoogleCloudWkt.Struct {
    return try GoogleCloudWkt._slowAnySerialize(message: self)
  }
}
