// 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.

#if PublicAdvertisedPrefixes
  import Foundation
  import GoogleCloudWkt

  /// A public advertised prefix represents an aggregated IP prefix or netblock
  /// which customers bring to cloud. The IP prefix is a single unit of route
  /// advertisement and is announced globally to the internet.
  public struct PublicAdvertisedPrefix: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Output only. [Output Only] The version of BYOIP API.
    public var byoipApiVersion: PublicAdvertisedPrefix.ByoipApiVersion? = nil

    /// Output only. [Output Only] Creation timestamp inRFC3339
    /// text format.
    public var creationTimestamp: Swift.String? = nil

    /// An optional description of this resource. Provide this property when you
    /// create the resource.
    public var description: Swift.String? = nil

    /// The address to be used for reverse DNS verification.
    public var dnsVerificationIp: Swift.String? = nil

    /// Fingerprint of this resource. A hash of the contents stored in this object.
    /// This field is used in optimistic locking. This field will be ignored when
    /// inserting a new PublicAdvertisedPrefix. An up-to-date
    /// fingerprint must be provided in order to update thePublicAdvertisedPrefix, otherwise the request will fail with
    /// error 412 conditionNotMet.
    ///
    /// To see the latest fingerprint, make a get() request to
    /// retrieve a PublicAdvertisedPrefix.
    public var fingerprint: Foundation.Data? = nil

    /// Output only. [Output Only] The unique identifier for the resource type. The server
    /// generates this identifier.
    public var id: Swift.UInt64? = nil

    /// The address range, in CIDR format, represented by this public advertised
    /// prefix.
    public var ipCidrRange: Swift.String? = nil

    /// The internet access type for IPv6 Public Advertised Prefixes.
    public var ipv6AccessType: PublicAdvertisedPrefix.Ipv6AccessType? = nil

    /// Output only. [Output Only] Type of the resource. Alwayscompute#publicAdvertisedPrefix for public advertised prefixes.
    public var kind: Swift.String? = nil

    /// Name of the resource. Provided by the client when the resource is created.
    /// The name must be 1-63 characters long, and comply withRFC1035.
    /// Specifically, the name must be 1-63 characters long and match the regular
    /// expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
    /// character must be a lowercase letter, and all following characters must
    /// be a dash, lowercase letter, or digit, except the last character, which
    /// cannot be a dash.
    public var name: Swift.String? = nil

    /// Specifies how child public delegated prefix will be scoped. It could
    /// be one of following values:
    ///
    ///
    ///      - `REGIONAL`: The public delegated prefix is regional only. The
    ///      provisioning will take a few minutes.
    ///      - `GLOBAL`: The public delegated prefix is global only. The
    ///      provisioning will take ~4 weeks.
    ///      - `GLOBAL_AND_REGIONAL` [output only]: The public delegated prefixes is
    ///       BYOIP V1 legacy prefix. This is output only value and no longer
    ///       supported in BYOIP V2.
    public var pdpScope: PublicAdvertisedPrefix.PdpScope? = nil

    /// Output only. [Output Only] The list of public delegated prefixes that exist for this
    /// public advertised prefix.
    public var publicDelegatedPrefixs: [PublicAdvertisedPrefixPublicDelegatedPrefix] = []

    /// Output only. [Output Only] Server-defined URL for the resource.
    public var selfLink: Swift.String? = nil

    /// [Output Only] The shared secret to be used for reverse DNS verification.
    public var sharedSecret: Swift.String? = nil

    /// The status of the public advertised prefix. Possible values include:
    ///
    ///
    ///      - `INITIAL`: RPKI validation is complete.
    ///      - `PTR_CONFIGURED`: User has configured the PTR.
    ///      - `VALIDATED`: Reverse DNS lookup is successful.
    ///      - `REVERSE_DNS_LOOKUP_FAILED`: Reverse DNS lookup failed.
    ///      - `PREFIX_CONFIGURATION_IN_PROGRESS`: The prefix is being
    ///      configured.
    ///      - `PREFIX_CONFIGURATION_COMPLETE`: The prefix is fully configured.
    ///      - `PREFIX_REMOVAL_IN_PROGRESS`: The prefix is being removed.
    public var status: PublicAdvertisedPrefix.Status? = nil

    /// Initialize a new instance of `PublicAdvertisedPrefix`.
    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 = PublicAdvertisedPrefix().with { $0.byoipApiVersion = ... }
    /// ```
    public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
      var copy = self
      try config(&copy)
      return copy
    }

    private enum CodingKeys: Swift.String, CodingKey {
      case byoipApiVersion = "byoipApiVersion"
      case creationTimestamp = "creationTimestamp"
      case description = "description"
      case dnsVerificationIp = "dnsVerificationIp"
      case fingerprint = "fingerprint"
      case id = "id"
      case ipCidrRange = "ipCidrRange"
      case ipv6AccessType = "ipv6AccessType"
      case kind = "kind"
      case name = "name"
      case pdpScope = "pdpScope"
      case publicDelegatedPrefixs = "publicDelegatedPrefixs"
      case selfLink = "selfLink"
      case sharedSecret = "sharedSecret"
      case status = "status"
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.container(keyedBy: CodingKeys.self)
      self.byoipApiVersion = try container.decodeIfPresent(
        PublicAdvertisedPrefix.ByoipApiVersion.self, forKey: .byoipApiVersion)
      self.creationTimestamp = try container.decodeIfPresent(
        Swift.String.self, forKey: .creationTimestamp)
      self.description = try container.decodeIfPresent(Swift.String.self, forKey: .description)
      self.dnsVerificationIp = try container.decodeIfPresent(
        Swift.String.self, forKey: .dnsVerificationIp)
      if let s = try container.decodeIfPresent(Swift.String.self, forKey: .fingerprint) {
        guard let v = GoogleCloudWkt._DiscoveryBase64.decode(s) else {
          throw DecodingError.dataCorrupted(
            DecodingError.Context(
              codingPath: decoder.codingPath, debugDescription: "Expected url-safe encoded value")
          )
        }
        self.fingerprint = v
      }
      self.id = try container.decodeIfPresent(Swift.UInt64.self, forKey: .id)
      self.ipCidrRange = try container.decodeIfPresent(Swift.String.self, forKey: .ipCidrRange)
      self.ipv6AccessType = try container.decodeIfPresent(
        PublicAdvertisedPrefix.Ipv6AccessType.self, forKey: .ipv6AccessType)
      self.kind = try container.decodeIfPresent(Swift.String.self, forKey: .kind)
      self.name = try container.decodeIfPresent(Swift.String.self, forKey: .name)
      self.pdpScope = try container.decodeIfPresent(
        PublicAdvertisedPrefix.PdpScope.self, forKey: .pdpScope)
      self.publicDelegatedPrefixs = try container.decode(
        [PublicAdvertisedPrefixPublicDelegatedPrefix].self, forKey: .publicDelegatedPrefixs)
      self.selfLink = try container.decodeIfPresent(Swift.String.self, forKey: .selfLink)
      self.sharedSecret = try container.decodeIfPresent(Swift.String.self, forKey: .sharedSecret)
      self.status = try container.decodeIfPresent(
        PublicAdvertisedPrefix.Status.self, forKey: .status)
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.container(keyedBy: CodingKeys.self)
      try container.encode(self.byoipApiVersion, forKey: .byoipApiVersion)
      try container.encode(self.creationTimestamp, forKey: .creationTimestamp)
      try container.encode(self.description, forKey: .description)
      try container.encode(self.dnsVerificationIp, forKey: .dnsVerificationIp)
      if let v = fingerprint {
        try container.encode(
          GoogleCloudWkt._DiscoveryBase64.encode(v), forKey: .fingerprint
        )
      }
      try container.encode(self.id, forKey: .id)
      try container.encode(self.ipCidrRange, forKey: .ipCidrRange)
      try container.encode(self.ipv6AccessType, forKey: .ipv6AccessType)
      try container.encode(self.kind, forKey: .kind)
      try container.encode(self.name, forKey: .name)
      try container.encode(self.pdpScope, forKey: .pdpScope)
      try container.encode(self.publicDelegatedPrefixs, forKey: .publicDelegatedPrefixs)
      try container.encode(self.selfLink, forKey: .selfLink)
      try container.encode(self.sharedSecret, forKey: .sharedSecret)
      try container.encode(self.status, forKey: .status)
    }

    /// The enumerated type for the [byoipApiVersion][google.cloud.compute.v1.PublicAdvertisedPrefix.byoipApiVersion] field.
    ///
    /// [google.cloud.compute.v1.PublicAdvertisedPrefix.byoipApiVersion]: <doc:PublicAdvertisedPrefix/ByoipApiVersion>
    public enum ByoipApiVersion: Codable, Equatable, Sendable {
      /// This public advertised prefix can be used to create both regional and
      /// global public delegated prefixes. It usually takes 4 weeks to create or
      /// delete a public delegated prefix. The BGP status cannot be changed.
      case v1
      /// This public advertised prefix can only be used to create regional public
      /// delegated prefixes. Public delegated prefix creation and deletion takes
      /// minutes and the BGP status can be modified.
      case v2
      /// 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 = .v1
      }

      /// 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 .v1: return 0
        case .v2: return 1
        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 .v1: return "V1"
        case .v2: return "V2"
        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:ByoipApiVersion/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "V1": self = .v1
        case "V2": self = .v2
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:ByoipApiVersion/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .v1
        case 1: self = .v2
        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 .v1: return try container.encode(0)
        case .v2: return try container.encode(1)
        case .unknownIntValue(let v): return try container.encode(v)
        case .unknownStringValue(let v): return try container.encode(v)
        }
      }
    }

    /// The enumerated type for the [ipv6AccessType][google.cloud.compute.v1.PublicAdvertisedPrefix.ipv6AccessType] field.
    ///
    /// [google.cloud.compute.v1.PublicAdvertisedPrefix.ipv6AccessType]: <doc:PublicAdvertisedPrefix/Ipv6AccessType>
    public enum Ipv6AccessType: Codable, Equatable, Sendable {
      /// Default IPv6 access type. The prefix will be announced to the internet.
      /// All children Public Delegated Prefixes will have IPv6 access type as
      /// EXTERNAL.
      case external
      /// The prefix will not be announced to the internet. Prefix will be used
      /// privately within Cloud. All children Public Delegated Prefixes
      /// will have IPv6 access type as INTERNAL.
      case `internal`
      /// 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 = .external
      }

      /// 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 .external: return 0
        case .`internal`: return 1
        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 .external: return "EXTERNAL"
        case .`internal`: return "INTERNAL"
        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:Ipv6AccessType/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "EXTERNAL": self = .external
        case "INTERNAL": self = .`internal`
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:Ipv6AccessType/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .external
        case 1: self = .`internal`
        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 .external: return try container.encode(0)
        case .`internal`: return try container.encode(1)
        case .unknownIntValue(let v): return try container.encode(v)
        case .unknownStringValue(let v): return try container.encode(v)
        }
      }
    }

    /// The enumerated type for the [pdpScope][google.cloud.compute.v1.PublicAdvertisedPrefix.pdpScope] field.
    ///
    /// [google.cloud.compute.v1.PublicAdvertisedPrefix.pdpScope]: <doc:PublicAdvertisedPrefix/PdpScope>
    public enum PdpScope: Codable, Equatable, Sendable {
      /// The public delegated prefix is global only. The provisioning will take ~4
      /// weeks.
      case global
      /// The public delegated prefixes is BYOIP V1 legacy prefix. This is output
      /// only value and no longer supported in BYOIP V2.
      case globalAndRegional
      /// The public delegated prefix is regional only. The provisioning will take
      /// a few minutes.
      case regional
      /// 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 = .global
      }

      /// 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 .global: return 0
        case .globalAndRegional: return 1
        case .regional: 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 .global: return "GLOBAL"
        case .globalAndRegional: return "GLOBAL_AND_REGIONAL"
        case .regional: return "REGIONAL"
        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:PdpScope/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "GLOBAL": self = .global
        case "GLOBAL_AND_REGIONAL": self = .globalAndRegional
        case "REGIONAL": self = .regional
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:PdpScope/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .global
        case 1: self = .globalAndRegional
        case 2: self = .regional
        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 .global: return try container.encode(0)
        case .globalAndRegional: return try container.encode(1)
        case .regional: return try container.encode(2)
        case .unknownIntValue(let v): return try container.encode(v)
        case .unknownStringValue(let v): return try container.encode(v)
        }
      }
    }

    /// The enumerated type for the [status][google.cloud.compute.v1.PublicAdvertisedPrefix.status] field.
    ///
    /// [google.cloud.compute.v1.PublicAdvertisedPrefix.status]: <doc:PublicAdvertisedPrefix/Status>
    public enum Status: Codable, Equatable, Sendable {
      /// The prefix is announced to Internet.
      case announcedToInternet
      /// RPKI validation is complete.
      case initial
      /// The prefix is fully configured.
      case prefixConfigurationComplete
      /// The prefix is being configured.
      case prefixConfigurationInProgress
      /// The prefix is being removed.
      case prefixRemovalInProgress
      /// User has configured the PTR.
      case ptrConfigured
      /// The prefix is currently withdrawn but ready to be announced.
      case readyToAnnounce
      /// Reverse DNS lookup failed.
      case reverseDnsLookupFailed
      /// Reverse DNS lookup is successful.
      case validated
      /// 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 = .announcedToInternet
      }

      /// 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 .announcedToInternet: return 0
        case .initial: return 1
        case .prefixConfigurationComplete: return 2
        case .prefixConfigurationInProgress: return 3
        case .prefixRemovalInProgress: return 4
        case .ptrConfigured: return 5
        case .readyToAnnounce: return 6
        case .reverseDnsLookupFailed: return 7
        case .validated: return 8
        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 .announcedToInternet: return "ANNOUNCED_TO_INTERNET"
        case .initial: return "INITIAL"
        case .prefixConfigurationComplete: return "PREFIX_CONFIGURATION_COMPLETE"
        case .prefixConfigurationInProgress: return "PREFIX_CONFIGURATION_IN_PROGRESS"
        case .prefixRemovalInProgress: return "PREFIX_REMOVAL_IN_PROGRESS"
        case .ptrConfigured: return "PTR_CONFIGURED"
        case .readyToAnnounce: return "READY_TO_ANNOUNCE"
        case .reverseDnsLookupFailed: return "REVERSE_DNS_LOOKUP_FAILED"
        case .validated: return "VALIDATED"
        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:Status/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "ANNOUNCED_TO_INTERNET": self = .announcedToInternet
        case "INITIAL": self = .initial
        case "PREFIX_CONFIGURATION_COMPLETE": self = .prefixConfigurationComplete
        case "PREFIX_CONFIGURATION_IN_PROGRESS": self = .prefixConfigurationInProgress
        case "PREFIX_REMOVAL_IN_PROGRESS": self = .prefixRemovalInProgress
        case "PTR_CONFIGURED": self = .ptrConfigured
        case "READY_TO_ANNOUNCE": self = .readyToAnnounce
        case "REVERSE_DNS_LOOKUP_FAILED": self = .reverseDnsLookupFailed
        case "VALIDATED": self = .validated
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:Status/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .announcedToInternet
        case 1: self = .initial
        case 2: self = .prefixConfigurationComplete
        case 3: self = .prefixConfigurationInProgress
        case 4: self = .prefixRemovalInProgress
        case 5: self = .ptrConfigured
        case 6: self = .readyToAnnounce
        case 7: self = .reverseDnsLookupFailed
        case 8: self = .validated
        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 .announcedToInternet: return try container.encode(0)
        case .initial: return try container.encode(1)
        case .prefixConfigurationComplete: return try container.encode(2)
        case .prefixConfigurationInProgress: return try container.encode(3)
        case .prefixRemovalInProgress: return try container.encode(4)
        case .ptrConfigured: return try container.encode(5)
        case .readyToAnnounce: return try container.encode(6)
        case .reverseDnsLookupFailed: return try container.encode(7)
        case .validated: return try container.encode(8)
        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.compute.v1.PublicAdvertisedPrefix"
    }
    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)
    }
  }
#endif
