// 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 NetworkProfiles
  import Foundation
  import GoogleCloudWkt

  public struct NetworkProfileNetworkFeatures: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Specifies what address purposes are supported. If empty, all address
    /// purposes are supported.
    public var addressPurposes: [NetworkProfileNetworkFeatures.AddressPurposes] = []

    /// Specifies whether address creation is allowed.
    public var allowAddressCreation: NetworkProfileNetworkFeatures.AllowAddressCreation? = nil

    /// Specifies whether alias IP ranges (and secondary address ranges) are
    /// allowed.
    public var allowAliasIpRanges: NetworkProfileNetworkFeatures.AllowAliasIpRanges? = nil

    /// Specifies whether auto mode subnet creation is allowed.
    public var allowAutoModeSubnet: NetworkProfileNetworkFeatures.AllowAutoModeSubnet? = nil

    /// Specifies whether firewalls for Class D address ranges are supported.
    public var allowClassDfirewalls: NetworkProfileNetworkFeatures.AllowClassDfirewalls? = nil

    /// Specifies whether cloud NAT creation is allowed.
    public var allowCloudNat: NetworkProfileNetworkFeatures.AllowCloudNat? = nil

    /// Specifies whether cloud router creation is allowed.
    public var allowCloudRouter: NetworkProfileNetworkFeatures.AllowCloudRouter? = nil

    /// Specifies whether default NIC attachment is allowed.
    public var allowDefaultNicAttachment: NetworkProfileNetworkFeatures.AllowDefaultNicAttachment? =
      nil

    /// Specifies whether VMs are allowed to have external IP access on network
    /// interfaces connected to this VPC.
    public var allowExternalIpAccess: NetworkProfileNetworkFeatures.AllowExternalIpAccess? = nil

    /// Specifies whether firewall policy can be attached to the network.
    public var allowFirewallPolicy: NetworkProfileNetworkFeatures.AllowFirewallPolicy? = nil

    /// Specifies whether Cloud Interconnect creation is allowed.
    public var allowInterconnect: NetworkProfileNetworkFeatures.AllowInterconnect? = nil

    /// Specifies whether IP forwarding is allowed.
    public var allowIpForwarding: NetworkProfileNetworkFeatures.AllowIpForwarding? = nil

    /// Specifies whether cloud load balancing is allowed.
    public var allowLoadBalancing: NetworkProfileNetworkFeatures.AllowLoadBalancing? = nil

    /// Specifies whether multi-nic in the same network is allowed.
    public var allowMultiNicInSameNetwork:
      NetworkProfileNetworkFeatures.AllowMultiNicInSameNetwork? = nil

    /// Specifies whether multi-nic in the same subnetwork is allowed.
    public var allowMultiNicInSameSubnetwork:
      NetworkProfileNetworkFeatures.AllowMultiNicInSameSubnetwork? = nil

    /// Specifies whether multicast is allowed.
    public var allowMulticast: NetworkProfileNetworkFeatures.AllowMulticast? = nil

    /// Specifies whether NCC is allowed.
    public var allowNcc: NetworkProfileNetworkFeatures.AllowNcc? = nil

    /// Specifies whether VM network migration is allowed.
    public var allowNetworkMigration: NetworkProfileNetworkFeatures.AllowNetworkMigration? = nil

    /// Specifies whether Packet Mirroring 1.0 is supported.
    public var allowPacketMirroring: NetworkProfileNetworkFeatures.AllowPacketMirroring? = nil

    /// Specifies whether private Google access is allowed.
    public var allowPrivateGoogleAccess: NetworkProfileNetworkFeatures.AllowPrivateGoogleAccess? =
      nil

    /// Specifies whether PSC creation is allowed.
    public var allowPsc: NetworkProfileNetworkFeatures.AllowPsc? = nil

    /// Specifies whether unicast within the same network is allowed.
    public var allowSameNetworkUnicast: NetworkProfileNetworkFeatures.AllowSameNetworkUnicast? = nil

    /// Specifies whether static route creation is allowed.
    public var allowStaticRoutes: NetworkProfileNetworkFeatures.AllowStaticRoutes? = nil

    /// Specifies whether sub interfaces are allowed.
    public var allowSubInterfaces: NetworkProfileNetworkFeatures.AllowSubInterfaces? = nil

    /// Specifies whether subnetwork creation is allowed.
    public var allowSubnetworkCreation: NetworkProfileNetworkFeatures.AllowSubnetworkCreation? = nil

    /// Specifies whether VPC firewall rules can be created under the network.
    public var allowVpcFirewallRules: NetworkProfileNetworkFeatures.AllowVpcFirewallRules? = nil

    /// Specifies whether VPC peering is allowed.
    public var allowVpcPeering: NetworkProfileNetworkFeatures.AllowVpcPeering? = nil

    /// Specifies whether VPN creation is allowed.
    public var allowVpn: NetworkProfileNetworkFeatures.AllowVpn? = nil

    public var firewallPolicyTypes: [NetworkProfileNetworkFeatures.FirewallPolicyTypes] = []

    /// If set, limits the interface types that the network supports. If
    /// empty, all interface types are supported.
    public var interfaceTypes: [NetworkProfileNetworkFeatures.InterfaceTypes] = []

    /// Specifies which type of multicast is supported.
    public var multicast: NetworkProfileNetworkFeatures.Multicast? = nil

    /// Specifies a predefined internal IPv6 range for the network.
    public var predefinedNetworkInternalIpv6Range: Swift.String? = nil

    /// Predefined subnetwork ranges for the network.
    public var predefinedSubnetworkRanges:
      [NetworkProfileNetworkFeaturesPredefinedSubnetworkRange] = []

    /// Specifies which subnetwork purposes are supported.
    public var subnetPurposes: [NetworkProfileNetworkFeatures.SubnetPurposes] = []

    /// Specifies which subnetwork stack types are supported.
    public var subnetStackTypes: [NetworkProfileNetworkFeatures.SubnetStackTypes] = []

    /// Output only. Specifies which subnetwork purposes are supported.
    public var subnetworkPurposes: [NetworkProfileNetworkFeatures.SubnetworkPurposes] = []

    /// Output only. Specifies which subnetwork stack types are supported.
    public var subnetworkStackTypes: [NetworkProfileNetworkFeatures.SubnetworkStackTypes] = []

    /// Specifies which type of unicast is supported.
    public var unicast: NetworkProfileNetworkFeatures.Unicast? = nil

    /// Initialize a new instance of `NetworkProfileNetworkFeatures`.
    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 = NetworkProfileNetworkFeatures().with { $0.addressPurposes = ... }
    /// ```
    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 addressPurposes = "addressPurposes"
      case allowAddressCreation = "allowAddressCreation"
      case allowAliasIpRanges = "allowAliasIpRanges"
      case allowAutoModeSubnet = "allowAutoModeSubnet"
      case allowClassDfirewalls = "allowClassDFirewalls"
      case allowCloudNat = "allowCloudNat"
      case allowCloudRouter = "allowCloudRouter"
      case allowDefaultNicAttachment = "allowDefaultNicAttachment"
      case allowExternalIpAccess = "allowExternalIpAccess"
      case allowFirewallPolicy = "allowFirewallPolicy"
      case allowInterconnect = "allowInterconnect"
      case allowIpForwarding = "allowIpForwarding"
      case allowLoadBalancing = "allowLoadBalancing"
      case allowMultiNicInSameNetwork = "allowMultiNicInSameNetwork"
      case allowMultiNicInSameSubnetwork = "allowMultiNicInSameSubnetwork"
      case allowMulticast = "allowMulticast"
      case allowNcc = "allowNcc"
      case allowNetworkMigration = "allowNetworkMigration"
      case allowPacketMirroring = "allowPacketMirroring"
      case allowPrivateGoogleAccess = "allowPrivateGoogleAccess"
      case allowPsc = "allowPsc"
      case allowSameNetworkUnicast = "allowSameNetworkUnicast"
      case allowStaticRoutes = "allowStaticRoutes"
      case allowSubInterfaces = "allowSubInterfaces"
      case allowSubnetworkCreation = "allowSubnetworkCreation"
      case allowVpcFirewallRules = "allowVpcFirewallRules"
      case allowVpcPeering = "allowVpcPeering"
      case allowVpn = "allowVpn"
      case firewallPolicyTypes = "firewallPolicyTypes"
      case interfaceTypes = "interfaceTypes"
      case multicast = "multicast"
      case predefinedNetworkInternalIpv6Range = "predefinedNetworkInternalIpv6Range"
      case predefinedSubnetworkRanges = "predefinedSubnetworkRanges"
      case subnetPurposes = "subnetPurposes"
      case subnetStackTypes = "subnetStackTypes"
      case subnetworkPurposes = "subnetworkPurposes"
      case subnetworkStackTypes = "subnetworkStackTypes"
      case unicast = "unicast"
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.container(keyedBy: CodingKeys.self)
      self.addressPurposes = try container.decode(
        [NetworkProfileNetworkFeatures.AddressPurposes].self, forKey: .addressPurposes)
      self.allowAddressCreation = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowAddressCreation.self, forKey: .allowAddressCreation)
      self.allowAliasIpRanges = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowAliasIpRanges.self, forKey: .allowAliasIpRanges)
      self.allowAutoModeSubnet = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowAutoModeSubnet.self, forKey: .allowAutoModeSubnet)
      self.allowClassDfirewalls = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowClassDfirewalls.self, forKey: .allowClassDfirewalls)
      self.allowCloudNat = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowCloudNat.self, forKey: .allowCloudNat)
      self.allowCloudRouter = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowCloudRouter.self, forKey: .allowCloudRouter)
      self.allowDefaultNicAttachment = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowDefaultNicAttachment.self,
        forKey: .allowDefaultNicAttachment)
      self.allowExternalIpAccess = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowExternalIpAccess.self, forKey: .allowExternalIpAccess)
      self.allowFirewallPolicy = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowFirewallPolicy.self, forKey: .allowFirewallPolicy)
      self.allowInterconnect = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowInterconnect.self, forKey: .allowInterconnect)
      self.allowIpForwarding = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowIpForwarding.self, forKey: .allowIpForwarding)
      self.allowLoadBalancing = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowLoadBalancing.self, forKey: .allowLoadBalancing)
      self.allowMultiNicInSameNetwork = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowMultiNicInSameNetwork.self,
        forKey: .allowMultiNicInSameNetwork)
      self.allowMultiNicInSameSubnetwork = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowMultiNicInSameSubnetwork.self,
        forKey: .allowMultiNicInSameSubnetwork)
      self.allowMulticast = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowMulticast.self, forKey: .allowMulticast)
      self.allowNcc = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowNcc.self, forKey: .allowNcc)
      self.allowNetworkMigration = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowNetworkMigration.self, forKey: .allowNetworkMigration)
      self.allowPacketMirroring = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowPacketMirroring.self, forKey: .allowPacketMirroring)
      self.allowPrivateGoogleAccess = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowPrivateGoogleAccess.self,
        forKey: .allowPrivateGoogleAccess)
      self.allowPsc = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowPsc.self, forKey: .allowPsc)
      self.allowSameNetworkUnicast = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowSameNetworkUnicast.self, forKey: .allowSameNetworkUnicast
      )
      self.allowStaticRoutes = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowStaticRoutes.self, forKey: .allowStaticRoutes)
      self.allowSubInterfaces = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowSubInterfaces.self, forKey: .allowSubInterfaces)
      self.allowSubnetworkCreation = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowSubnetworkCreation.self, forKey: .allowSubnetworkCreation
      )
      self.allowVpcFirewallRules = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowVpcFirewallRules.self, forKey: .allowVpcFirewallRules)
      self.allowVpcPeering = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowVpcPeering.self, forKey: .allowVpcPeering)
      self.allowVpn = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.AllowVpn.self, forKey: .allowVpn)
      self.firewallPolicyTypes = try container.decode(
        [NetworkProfileNetworkFeatures.FirewallPolicyTypes].self, forKey: .firewallPolicyTypes)
      self.interfaceTypes = try container.decode(
        [NetworkProfileNetworkFeatures.InterfaceTypes].self, forKey: .interfaceTypes)
      self.multicast = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.Multicast.self, forKey: .multicast)
      self.predefinedNetworkInternalIpv6Range = try container.decodeIfPresent(
        Swift.String.self, forKey: .predefinedNetworkInternalIpv6Range)
      self.predefinedSubnetworkRanges = try container.decode(
        [NetworkProfileNetworkFeaturesPredefinedSubnetworkRange].self,
        forKey: .predefinedSubnetworkRanges)
      self.subnetPurposes = try container.decode(
        [NetworkProfileNetworkFeatures.SubnetPurposes].self, forKey: .subnetPurposes)
      self.subnetStackTypes = try container.decode(
        [NetworkProfileNetworkFeatures.SubnetStackTypes].self, forKey: .subnetStackTypes)
      self.subnetworkPurposes = try container.decode(
        [NetworkProfileNetworkFeatures.SubnetworkPurposes].self, forKey: .subnetworkPurposes)
      self.subnetworkStackTypes = try container.decode(
        [NetworkProfileNetworkFeatures.SubnetworkStackTypes].self, forKey: .subnetworkStackTypes)
      self.unicast = try container.decodeIfPresent(
        NetworkProfileNetworkFeatures.Unicast.self, forKey: .unicast)
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.container(keyedBy: CodingKeys.self)
      try container.encode(self.addressPurposes, forKey: .addressPurposes)
      try container.encode(self.allowAddressCreation, forKey: .allowAddressCreation)
      try container.encode(self.allowAliasIpRanges, forKey: .allowAliasIpRanges)
      try container.encode(self.allowAutoModeSubnet, forKey: .allowAutoModeSubnet)
      try container.encode(self.allowClassDfirewalls, forKey: .allowClassDfirewalls)
      try container.encode(self.allowCloudNat, forKey: .allowCloudNat)
      try container.encode(self.allowCloudRouter, forKey: .allowCloudRouter)
      try container.encode(self.allowDefaultNicAttachment, forKey: .allowDefaultNicAttachment)
      try container.encode(self.allowExternalIpAccess, forKey: .allowExternalIpAccess)
      try container.encode(self.allowFirewallPolicy, forKey: .allowFirewallPolicy)
      try container.encode(self.allowInterconnect, forKey: .allowInterconnect)
      try container.encode(self.allowIpForwarding, forKey: .allowIpForwarding)
      try container.encode(self.allowLoadBalancing, forKey: .allowLoadBalancing)
      try container.encode(self.allowMultiNicInSameNetwork, forKey: .allowMultiNicInSameNetwork)
      try container.encode(
        self.allowMultiNicInSameSubnetwork, forKey: .allowMultiNicInSameSubnetwork)
      try container.encode(self.allowMulticast, forKey: .allowMulticast)
      try container.encode(self.allowNcc, forKey: .allowNcc)
      try container.encode(self.allowNetworkMigration, forKey: .allowNetworkMigration)
      try container.encode(self.allowPacketMirroring, forKey: .allowPacketMirroring)
      try container.encode(self.allowPrivateGoogleAccess, forKey: .allowPrivateGoogleAccess)
      try container.encode(self.allowPsc, forKey: .allowPsc)
      try container.encode(self.allowSameNetworkUnicast, forKey: .allowSameNetworkUnicast)
      try container.encode(self.allowStaticRoutes, forKey: .allowStaticRoutes)
      try container.encode(self.allowSubInterfaces, forKey: .allowSubInterfaces)
      try container.encode(self.allowSubnetworkCreation, forKey: .allowSubnetworkCreation)
      try container.encode(self.allowVpcFirewallRules, forKey: .allowVpcFirewallRules)
      try container.encode(self.allowVpcPeering, forKey: .allowVpcPeering)
      try container.encode(self.allowVpn, forKey: .allowVpn)
      try container.encode(self.firewallPolicyTypes, forKey: .firewallPolicyTypes)
      try container.encode(self.interfaceTypes, forKey: .interfaceTypes)
      try container.encode(self.multicast, forKey: .multicast)
      try container.encode(
        self.predefinedNetworkInternalIpv6Range, forKey: .predefinedNetworkInternalIpv6Range)
      try container.encode(self.predefinedSubnetworkRanges, forKey: .predefinedSubnetworkRanges)
      try container.encode(self.subnetPurposes, forKey: .subnetPurposes)
      try container.encode(self.subnetStackTypes, forKey: .subnetStackTypes)
      try container.encode(self.subnetworkPurposes, forKey: .subnetworkPurposes)
      try container.encode(self.subnetworkStackTypes, forKey: .subnetworkStackTypes)
      try container.encode(self.unicast, forKey: .unicast)
    }

    /// The enumerated type for the [addressPurposes][google.cloud.compute.v1.NetworkProfileNetworkFeatures.addressPurposes] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.addressPurposes]: <doc:NetworkProfileNetworkFeatures/AddressPurposes>
    public enum AddressPurposes: Codable, Equatable, Sendable {
      /// DNS resolver address in the subnetwork.
      case dnsResolver
      /// VM internal/alias IP, Internal LB service IP, etc.
      case gceEndpoint
      /// A regional internal IP address range reserved for the VLAN attachment
      /// that is used in HA VPN over Cloud Interconnect. This regional
      /// internal IP address range must not overlap with any IP address range
      /// of subnet/route in the VPC network and its peering networks. After the
      /// VLAN attachment is created with the reserved IP address range, when
      /// creating a new VPN gateway, its interface IP address is allocated
      /// from the associated VLAN attachment's IP address range.
      case ipsecInterconnect
      /// External IP automatically reserved for Cloud NAT.
      case natAuto
      /// A private network IP address that can be used to configure Private
      /// Service Connect. This purpose can be specified only forGLOBAL addresses of Type INTERNAL
      case privateServiceConnect
      /// A regional internal IP address range reserved for Serverless.
      case serverless
      /// A private network IP address that can be shared by multiple Internal
      /// Load Balancer forwarding rules.
      case sharedLoadbalancerVip
      /// IP range for peer networks.
      case vpcPeering
      /// 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 = .dnsResolver
      }

      /// 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 .dnsResolver: return 0
        case .gceEndpoint: return 1
        case .ipsecInterconnect: return 2
        case .natAuto: return 3
        case .privateServiceConnect: return 4
        case .serverless: return 5
        case .sharedLoadbalancerVip: return 6
        case .vpcPeering: return 7
        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 .dnsResolver: return "DNS_RESOLVER"
        case .gceEndpoint: return "GCE_ENDPOINT"
        case .ipsecInterconnect: return "IPSEC_INTERCONNECT"
        case .natAuto: return "NAT_AUTO"
        case .privateServiceConnect: return "PRIVATE_SERVICE_CONNECT"
        case .serverless: return "SERVERLESS"
        case .sharedLoadbalancerVip: return "SHARED_LOADBALANCER_VIP"
        case .vpcPeering: return "VPC_PEERING"
        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:AddressPurposes/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "DNS_RESOLVER": self = .dnsResolver
        case "GCE_ENDPOINT": self = .gceEndpoint
        case "IPSEC_INTERCONNECT": self = .ipsecInterconnect
        case "NAT_AUTO": self = .natAuto
        case "PRIVATE_SERVICE_CONNECT": self = .privateServiceConnect
        case "SERVERLESS": self = .serverless
        case "SHARED_LOADBALANCER_VIP": self = .sharedLoadbalancerVip
        case "VPC_PEERING": self = .vpcPeering
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AddressPurposes/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .dnsResolver
        case 1: self = .gceEndpoint
        case 2: self = .ipsecInterconnect
        case 3: self = .natAuto
        case 4: self = .privateServiceConnect
        case 5: self = .serverless
        case 6: self = .sharedLoadbalancerVip
        case 7: self = .vpcPeering
        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 .dnsResolver: return try container.encode(0)
        case .gceEndpoint: return try container.encode(1)
        case .ipsecInterconnect: return try container.encode(2)
        case .natAuto: return try container.encode(3)
        case .privateServiceConnect: return try container.encode(4)
        case .serverless: return try container.encode(5)
        case .sharedLoadbalancerVip: return try container.encode(6)
        case .vpcPeering: return try container.encode(7)
        case .unknownIntValue(let v): return try container.encode(v)
        case .unknownStringValue(let v): return try container.encode(v)
        }
      }
    }

    /// The enumerated type for the [allowAddressCreation][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowAddressCreation] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowAddressCreation]: <doc:NetworkProfileNetworkFeatures/AllowAddressCreation>
    public enum AllowAddressCreation: Codable, Equatable, Sendable {
      case addressCreationAllowed
      case addressCreationBlocked
      /// 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 = .addressCreationAllowed
      }

      /// 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 .addressCreationAllowed: return 0
        case .addressCreationBlocked: 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 .addressCreationAllowed: return "ADDRESS_CREATION_ALLOWED"
        case .addressCreationBlocked: return "ADDRESS_CREATION_BLOCKED"
        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:AllowAddressCreation/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "ADDRESS_CREATION_ALLOWED": self = .addressCreationAllowed
        case "ADDRESS_CREATION_BLOCKED": self = .addressCreationBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowAddressCreation/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .addressCreationAllowed
        case 1: self = .addressCreationBlocked
        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 .addressCreationAllowed: return try container.encode(0)
        case .addressCreationBlocked: 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 [allowAliasIpRanges][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowAliasIpRanges] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowAliasIpRanges]: <doc:NetworkProfileNetworkFeatures/AllowAliasIpRanges>
    public enum AllowAliasIpRanges: Codable, Equatable, Sendable {
      case aliasIpRangesAllowed
      case aliasIpRangesBlocked
      /// 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 = .aliasIpRangesAllowed
      }

      /// 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 .aliasIpRangesAllowed: return 0
        case .aliasIpRangesBlocked: 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 .aliasIpRangesAllowed: return "ALIAS_IP_RANGES_ALLOWED"
        case .aliasIpRangesBlocked: return "ALIAS_IP_RANGES_BLOCKED"
        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:AllowAliasIpRanges/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "ALIAS_IP_RANGES_ALLOWED": self = .aliasIpRangesAllowed
        case "ALIAS_IP_RANGES_BLOCKED": self = .aliasIpRangesBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowAliasIpRanges/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .aliasIpRangesAllowed
        case 1: self = .aliasIpRangesBlocked
        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 .aliasIpRangesAllowed: return try container.encode(0)
        case .aliasIpRangesBlocked: 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 [allowAutoModeSubnet][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowAutoModeSubnet] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowAutoModeSubnet]: <doc:NetworkProfileNetworkFeatures/AllowAutoModeSubnet>
    public enum AllowAutoModeSubnet: Codable, Equatable, Sendable {
      case autoModeSubnetAllowed
      case autoModeSubnetBlocked
      /// 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 = .autoModeSubnetAllowed
      }

      /// 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 .autoModeSubnetAllowed: return 0
        case .autoModeSubnetBlocked: 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 .autoModeSubnetAllowed: return "AUTO_MODE_SUBNET_ALLOWED"
        case .autoModeSubnetBlocked: return "AUTO_MODE_SUBNET_BLOCKED"
        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:AllowAutoModeSubnet/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "AUTO_MODE_SUBNET_ALLOWED": self = .autoModeSubnetAllowed
        case "AUTO_MODE_SUBNET_BLOCKED": self = .autoModeSubnetBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowAutoModeSubnet/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .autoModeSubnetAllowed
        case 1: self = .autoModeSubnetBlocked
        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 .autoModeSubnetAllowed: return try container.encode(0)
        case .autoModeSubnetBlocked: 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 [allowClassDFirewalls][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowClassDFirewalls] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowClassDFirewalls]: <doc:NetworkProfileNetworkFeatures/AllowClassDfirewalls>
    public enum AllowClassDfirewalls: Codable, Equatable, Sendable {
      case classDFirewallsAllowed
      case classDFirewallsBlocked
      /// 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 = .classDFirewallsAllowed
      }

      /// 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 .classDFirewallsAllowed: return 0
        case .classDFirewallsBlocked: 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 .classDFirewallsAllowed: return "CLASS_D_FIREWALLS_ALLOWED"
        case .classDFirewallsBlocked: return "CLASS_D_FIREWALLS_BLOCKED"
        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:AllowClassDfirewalls/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "CLASS_D_FIREWALLS_ALLOWED": self = .classDFirewallsAllowed
        case "CLASS_D_FIREWALLS_BLOCKED": self = .classDFirewallsBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowClassDfirewalls/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .classDFirewallsAllowed
        case 1: self = .classDFirewallsBlocked
        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 .classDFirewallsAllowed: return try container.encode(0)
        case .classDFirewallsBlocked: 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 [allowCloudNat][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowCloudNat] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowCloudNat]: <doc:NetworkProfileNetworkFeatures/AllowCloudNat>
    public enum AllowCloudNat: Codable, Equatable, Sendable {
      case cloudNatAllowed
      case cloudNatBlocked
      /// 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 = .cloudNatAllowed
      }

      /// 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 .cloudNatAllowed: return 0
        case .cloudNatBlocked: 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 .cloudNatAllowed: return "CLOUD_NAT_ALLOWED"
        case .cloudNatBlocked: return "CLOUD_NAT_BLOCKED"
        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:AllowCloudNat/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "CLOUD_NAT_ALLOWED": self = .cloudNatAllowed
        case "CLOUD_NAT_BLOCKED": self = .cloudNatBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowCloudNat/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .cloudNatAllowed
        case 1: self = .cloudNatBlocked
        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 .cloudNatAllowed: return try container.encode(0)
        case .cloudNatBlocked: 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 [allowCloudRouter][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowCloudRouter] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowCloudRouter]: <doc:NetworkProfileNetworkFeatures/AllowCloudRouter>
    public enum AllowCloudRouter: Codable, Equatable, Sendable {
      case cloudRouterAllowed
      case cloudRouterBlocked
      /// 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 = .cloudRouterAllowed
      }

      /// 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 .cloudRouterAllowed: return 0
        case .cloudRouterBlocked: 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 .cloudRouterAllowed: return "CLOUD_ROUTER_ALLOWED"
        case .cloudRouterBlocked: return "CLOUD_ROUTER_BLOCKED"
        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:AllowCloudRouter/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "CLOUD_ROUTER_ALLOWED": self = .cloudRouterAllowed
        case "CLOUD_ROUTER_BLOCKED": self = .cloudRouterBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowCloudRouter/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .cloudRouterAllowed
        case 1: self = .cloudRouterBlocked
        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 .cloudRouterAllowed: return try container.encode(0)
        case .cloudRouterBlocked: 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 [allowDefaultNicAttachment][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowDefaultNicAttachment] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowDefaultNicAttachment]: <doc:NetworkProfileNetworkFeatures/AllowDefaultNicAttachment>
    public enum AllowDefaultNicAttachment: Codable, Equatable, Sendable {
      case defaultNicAttachmentAllowed
      case defaultNicAttachmentBlocked
      /// 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 = .defaultNicAttachmentAllowed
      }

      /// 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 .defaultNicAttachmentAllowed: return 0
        case .defaultNicAttachmentBlocked: 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 .defaultNicAttachmentAllowed: return "DEFAULT_NIC_ATTACHMENT_ALLOWED"
        case .defaultNicAttachmentBlocked: return "DEFAULT_NIC_ATTACHMENT_BLOCKED"
        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:AllowDefaultNicAttachment/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "DEFAULT_NIC_ATTACHMENT_ALLOWED": self = .defaultNicAttachmentAllowed
        case "DEFAULT_NIC_ATTACHMENT_BLOCKED": self = .defaultNicAttachmentBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowDefaultNicAttachment/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .defaultNicAttachmentAllowed
        case 1: self = .defaultNicAttachmentBlocked
        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 .defaultNicAttachmentAllowed: return try container.encode(0)
        case .defaultNicAttachmentBlocked: 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 [allowExternalIpAccess][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowExternalIpAccess] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowExternalIpAccess]: <doc:NetworkProfileNetworkFeatures/AllowExternalIpAccess>
    public enum AllowExternalIpAccess: Codable, Equatable, Sendable {
      case externalIpAccessAllowed
      case externalIpAccessBlocked
      /// 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 = .externalIpAccessAllowed
      }

      /// 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 .externalIpAccessAllowed: return 0
        case .externalIpAccessBlocked: 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 .externalIpAccessAllowed: return "EXTERNAL_IP_ACCESS_ALLOWED"
        case .externalIpAccessBlocked: return "EXTERNAL_IP_ACCESS_BLOCKED"
        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:AllowExternalIpAccess/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "EXTERNAL_IP_ACCESS_ALLOWED": self = .externalIpAccessAllowed
        case "EXTERNAL_IP_ACCESS_BLOCKED": self = .externalIpAccessBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowExternalIpAccess/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .externalIpAccessAllowed
        case 1: self = .externalIpAccessBlocked
        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 .externalIpAccessAllowed: return try container.encode(0)
        case .externalIpAccessBlocked: 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 [allowFirewallPolicy][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowFirewallPolicy] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowFirewallPolicy]: <doc:NetworkProfileNetworkFeatures/AllowFirewallPolicy>
    public enum AllowFirewallPolicy: Codable, Equatable, Sendable {
      case firewallPolicyAllowed
      case firewallPolicyBlocked
      /// 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 = .firewallPolicyAllowed
      }

      /// 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 .firewallPolicyAllowed: return 0
        case .firewallPolicyBlocked: 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 .firewallPolicyAllowed: return "FIREWALL_POLICY_ALLOWED"
        case .firewallPolicyBlocked: return "FIREWALL_POLICY_BLOCKED"
        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:AllowFirewallPolicy/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "FIREWALL_POLICY_ALLOWED": self = .firewallPolicyAllowed
        case "FIREWALL_POLICY_BLOCKED": self = .firewallPolicyBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowFirewallPolicy/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .firewallPolicyAllowed
        case 1: self = .firewallPolicyBlocked
        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 .firewallPolicyAllowed: return try container.encode(0)
        case .firewallPolicyBlocked: 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 [allowInterconnect][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowInterconnect] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowInterconnect]: <doc:NetworkProfileNetworkFeatures/AllowInterconnect>
    public enum AllowInterconnect: Codable, Equatable, Sendable {
      case interconnectAllowed
      case interconnectBlocked
      /// 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 = .interconnectAllowed
      }

      /// 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 .interconnectAllowed: return 0
        case .interconnectBlocked: 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 .interconnectAllowed: return "INTERCONNECT_ALLOWED"
        case .interconnectBlocked: return "INTERCONNECT_BLOCKED"
        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:AllowInterconnect/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "INTERCONNECT_ALLOWED": self = .interconnectAllowed
        case "INTERCONNECT_BLOCKED": self = .interconnectBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowInterconnect/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .interconnectAllowed
        case 1: self = .interconnectBlocked
        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 .interconnectAllowed: return try container.encode(0)
        case .interconnectBlocked: 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 [allowIpForwarding][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowIpForwarding] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowIpForwarding]: <doc:NetworkProfileNetworkFeatures/AllowIpForwarding>
    public enum AllowIpForwarding: Codable, Equatable, Sendable {
      case ipForwardingAllowed
      case ipForwardingBlocked
      /// 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 = .ipForwardingAllowed
      }

      /// 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 .ipForwardingAllowed: return 0
        case .ipForwardingBlocked: 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 .ipForwardingAllowed: return "IP_FORWARDING_ALLOWED"
        case .ipForwardingBlocked: return "IP_FORWARDING_BLOCKED"
        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:AllowIpForwarding/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "IP_FORWARDING_ALLOWED": self = .ipForwardingAllowed
        case "IP_FORWARDING_BLOCKED": self = .ipForwardingBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowIpForwarding/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .ipForwardingAllowed
        case 1: self = .ipForwardingBlocked
        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 .ipForwardingAllowed: return try container.encode(0)
        case .ipForwardingBlocked: 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 [allowLoadBalancing][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowLoadBalancing] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowLoadBalancing]: <doc:NetworkProfileNetworkFeatures/AllowLoadBalancing>
    public enum AllowLoadBalancing: Codable, Equatable, Sendable {
      case loadBalancingAllowed
      case loadBalancingBlocked
      /// 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 = .loadBalancingAllowed
      }

      /// 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 .loadBalancingAllowed: return 0
        case .loadBalancingBlocked: 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 .loadBalancingAllowed: return "LOAD_BALANCING_ALLOWED"
        case .loadBalancingBlocked: return "LOAD_BALANCING_BLOCKED"
        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:AllowLoadBalancing/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "LOAD_BALANCING_ALLOWED": self = .loadBalancingAllowed
        case "LOAD_BALANCING_BLOCKED": self = .loadBalancingBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowLoadBalancing/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .loadBalancingAllowed
        case 1: self = .loadBalancingBlocked
        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 .loadBalancingAllowed: return try container.encode(0)
        case .loadBalancingBlocked: 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 [allowMultiNicInSameNetwork][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowMultiNicInSameNetwork] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowMultiNicInSameNetwork]: <doc:NetworkProfileNetworkFeatures/AllowMultiNicInSameNetwork>
    public enum AllowMultiNicInSameNetwork: Codable, Equatable, Sendable {
      case multiNicInSameNetworkAllowed
      case multiNicInSameNetworkBlocked
      /// 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 = .multiNicInSameNetworkAllowed
      }

      /// 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 .multiNicInSameNetworkAllowed: return 0
        case .multiNicInSameNetworkBlocked: 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 .multiNicInSameNetworkAllowed: return "MULTI_NIC_IN_SAME_NETWORK_ALLOWED"
        case .multiNicInSameNetworkBlocked: return "MULTI_NIC_IN_SAME_NETWORK_BLOCKED"
        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:AllowMultiNicInSameNetwork/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "MULTI_NIC_IN_SAME_NETWORK_ALLOWED": self = .multiNicInSameNetworkAllowed
        case "MULTI_NIC_IN_SAME_NETWORK_BLOCKED": self = .multiNicInSameNetworkBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowMultiNicInSameNetwork/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .multiNicInSameNetworkAllowed
        case 1: self = .multiNicInSameNetworkBlocked
        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 .multiNicInSameNetworkAllowed: return try container.encode(0)
        case .multiNicInSameNetworkBlocked: 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 [allowMultiNicInSameSubnetwork][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowMultiNicInSameSubnetwork] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowMultiNicInSameSubnetwork]: <doc:NetworkProfileNetworkFeatures/AllowMultiNicInSameSubnetwork>
    public enum AllowMultiNicInSameSubnetwork: Codable, Equatable, Sendable {
      case multiNicInSameSubnetworkAllowed
      case multiNicInSameSubnetworkBlocked
      /// 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 = .multiNicInSameSubnetworkAllowed
      }

      /// 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 .multiNicInSameSubnetworkAllowed: return 0
        case .multiNicInSameSubnetworkBlocked: 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 .multiNicInSameSubnetworkAllowed: return "MULTI_NIC_IN_SAME_SUBNETWORK_ALLOWED"
        case .multiNicInSameSubnetworkBlocked: return "MULTI_NIC_IN_SAME_SUBNETWORK_BLOCKED"
        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:AllowMultiNicInSameSubnetwork/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "MULTI_NIC_IN_SAME_SUBNETWORK_ALLOWED": self = .multiNicInSameSubnetworkAllowed
        case "MULTI_NIC_IN_SAME_SUBNETWORK_BLOCKED": self = .multiNicInSameSubnetworkBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowMultiNicInSameSubnetwork/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .multiNicInSameSubnetworkAllowed
        case 1: self = .multiNicInSameSubnetworkBlocked
        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 .multiNicInSameSubnetworkAllowed: return try container.encode(0)
        case .multiNicInSameSubnetworkBlocked: 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 [allowMulticast][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowMulticast] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowMulticast]: <doc:NetworkProfileNetworkFeatures/AllowMulticast>
    public enum AllowMulticast: Codable, Equatable, Sendable {
      case multicastAllowed
      case multicastBlocked
      /// 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 = .multicastAllowed
      }

      /// 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 .multicastAllowed: return 0
        case .multicastBlocked: 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 .multicastAllowed: return "MULTICAST_ALLOWED"
        case .multicastBlocked: return "MULTICAST_BLOCKED"
        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:AllowMulticast/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "MULTICAST_ALLOWED": self = .multicastAllowed
        case "MULTICAST_BLOCKED": self = .multicastBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowMulticast/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .multicastAllowed
        case 1: self = .multicastBlocked
        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 .multicastAllowed: return try container.encode(0)
        case .multicastBlocked: 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 [allowNcc][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowNcc] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowNcc]: <doc:NetworkProfileNetworkFeatures/AllowNcc>
    public enum AllowNcc: Codable, Equatable, Sendable {
      case nccAllowed
      case nccBlocked
      /// 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 = .nccAllowed
      }

      /// 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 .nccAllowed: return 0
        case .nccBlocked: 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 .nccAllowed: return "NCC_ALLOWED"
        case .nccBlocked: return "NCC_BLOCKED"
        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:AllowNcc/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "NCC_ALLOWED": self = .nccAllowed
        case "NCC_BLOCKED": self = .nccBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowNcc/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .nccAllowed
        case 1: self = .nccBlocked
        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 .nccAllowed: return try container.encode(0)
        case .nccBlocked: 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 [allowNetworkMigration][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowNetworkMigration] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowNetworkMigration]: <doc:NetworkProfileNetworkFeatures/AllowNetworkMigration>
    public enum AllowNetworkMigration: Codable, Equatable, Sendable {
      case networkMigrationAllowed
      case networkMigrationBlocked
      /// 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 = .networkMigrationAllowed
      }

      /// 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 .networkMigrationAllowed: return 0
        case .networkMigrationBlocked: 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 .networkMigrationAllowed: return "NETWORK_MIGRATION_ALLOWED"
        case .networkMigrationBlocked: return "NETWORK_MIGRATION_BLOCKED"
        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:AllowNetworkMigration/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "NETWORK_MIGRATION_ALLOWED": self = .networkMigrationAllowed
        case "NETWORK_MIGRATION_BLOCKED": self = .networkMigrationBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowNetworkMigration/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .networkMigrationAllowed
        case 1: self = .networkMigrationBlocked
        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 .networkMigrationAllowed: return try container.encode(0)
        case .networkMigrationBlocked: 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 [allowPacketMirroring][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowPacketMirroring] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowPacketMirroring]: <doc:NetworkProfileNetworkFeatures/AllowPacketMirroring>
    public enum AllowPacketMirroring: Codable, Equatable, Sendable {
      case packetMirroringAllowed
      case packetMirroringBlocked
      /// 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 = .packetMirroringAllowed
      }

      /// 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 .packetMirroringAllowed: return 0
        case .packetMirroringBlocked: 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 .packetMirroringAllowed: return "PACKET_MIRRORING_ALLOWED"
        case .packetMirroringBlocked: return "PACKET_MIRRORING_BLOCKED"
        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:AllowPacketMirroring/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "PACKET_MIRRORING_ALLOWED": self = .packetMirroringAllowed
        case "PACKET_MIRRORING_BLOCKED": self = .packetMirroringBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowPacketMirroring/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .packetMirroringAllowed
        case 1: self = .packetMirroringBlocked
        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 .packetMirroringAllowed: return try container.encode(0)
        case .packetMirroringBlocked: 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 [allowPrivateGoogleAccess][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowPrivateGoogleAccess] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowPrivateGoogleAccess]: <doc:NetworkProfileNetworkFeatures/AllowPrivateGoogleAccess>
    public enum AllowPrivateGoogleAccess: Codable, Equatable, Sendable {
      case privateGoogleAccessAllowed
      case privateGoogleAccessBlocked
      /// 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 = .privateGoogleAccessAllowed
      }

      /// 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 .privateGoogleAccessAllowed: return 0
        case .privateGoogleAccessBlocked: 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 .privateGoogleAccessAllowed: return "PRIVATE_GOOGLE_ACCESS_ALLOWED"
        case .privateGoogleAccessBlocked: return "PRIVATE_GOOGLE_ACCESS_BLOCKED"
        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:AllowPrivateGoogleAccess/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "PRIVATE_GOOGLE_ACCESS_ALLOWED": self = .privateGoogleAccessAllowed
        case "PRIVATE_GOOGLE_ACCESS_BLOCKED": self = .privateGoogleAccessBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowPrivateGoogleAccess/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .privateGoogleAccessAllowed
        case 1: self = .privateGoogleAccessBlocked
        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 .privateGoogleAccessAllowed: return try container.encode(0)
        case .privateGoogleAccessBlocked: 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 [allowPsc][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowPsc] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowPsc]: <doc:NetworkProfileNetworkFeatures/AllowPsc>
    public enum AllowPsc: Codable, Equatable, Sendable {
      case pscAllowed
      case pscBlocked
      /// 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 = .pscAllowed
      }

      /// 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 .pscAllowed: return 0
        case .pscBlocked: 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 .pscAllowed: return "PSC_ALLOWED"
        case .pscBlocked: return "PSC_BLOCKED"
        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:AllowPsc/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "PSC_ALLOWED": self = .pscAllowed
        case "PSC_BLOCKED": self = .pscBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowPsc/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .pscAllowed
        case 1: self = .pscBlocked
        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 .pscAllowed: return try container.encode(0)
        case .pscBlocked: 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 [allowSameNetworkUnicast][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowSameNetworkUnicast] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowSameNetworkUnicast]: <doc:NetworkProfileNetworkFeatures/AllowSameNetworkUnicast>
    public enum AllowSameNetworkUnicast: Codable, Equatable, Sendable {
      case sameNetworkUnicastAllowed
      case sameNetworkUnicastBlocked
      /// 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 = .sameNetworkUnicastAllowed
      }

      /// 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 .sameNetworkUnicastAllowed: return 0
        case .sameNetworkUnicastBlocked: 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 .sameNetworkUnicastAllowed: return "SAME_NETWORK_UNICAST_ALLOWED"
        case .sameNetworkUnicastBlocked: return "SAME_NETWORK_UNICAST_BLOCKED"
        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:AllowSameNetworkUnicast/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "SAME_NETWORK_UNICAST_ALLOWED": self = .sameNetworkUnicastAllowed
        case "SAME_NETWORK_UNICAST_BLOCKED": self = .sameNetworkUnicastBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowSameNetworkUnicast/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .sameNetworkUnicastAllowed
        case 1: self = .sameNetworkUnicastBlocked
        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 .sameNetworkUnicastAllowed: return try container.encode(0)
        case .sameNetworkUnicastBlocked: 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 [allowStaticRoutes][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowStaticRoutes] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowStaticRoutes]: <doc:NetworkProfileNetworkFeatures/AllowStaticRoutes>
    public enum AllowStaticRoutes: Codable, Equatable, Sendable {
      case staticRoutesAllowed
      case staticRoutesBlocked
      /// 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 = .staticRoutesAllowed
      }

      /// 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 .staticRoutesAllowed: return 0
        case .staticRoutesBlocked: 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 .staticRoutesAllowed: return "STATIC_ROUTES_ALLOWED"
        case .staticRoutesBlocked: return "STATIC_ROUTES_BLOCKED"
        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:AllowStaticRoutes/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "STATIC_ROUTES_ALLOWED": self = .staticRoutesAllowed
        case "STATIC_ROUTES_BLOCKED": self = .staticRoutesBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowStaticRoutes/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .staticRoutesAllowed
        case 1: self = .staticRoutesBlocked
        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 .staticRoutesAllowed: return try container.encode(0)
        case .staticRoutesBlocked: 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 [allowSubInterfaces][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowSubInterfaces] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowSubInterfaces]: <doc:NetworkProfileNetworkFeatures/AllowSubInterfaces>
    public enum AllowSubInterfaces: Codable, Equatable, Sendable {
      case subinterfacesAllowed
      case subinterfacesBlocked
      /// 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 = .subinterfacesAllowed
      }

      /// 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 .subinterfacesAllowed: return 0
        case .subinterfacesBlocked: 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 .subinterfacesAllowed: return "SUBINTERFACES_ALLOWED"
        case .subinterfacesBlocked: return "SUBINTERFACES_BLOCKED"
        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:AllowSubInterfaces/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "SUBINTERFACES_ALLOWED": self = .subinterfacesAllowed
        case "SUBINTERFACES_BLOCKED": self = .subinterfacesBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowSubInterfaces/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .subinterfacesAllowed
        case 1: self = .subinterfacesBlocked
        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 .subinterfacesAllowed: return try container.encode(0)
        case .subinterfacesBlocked: 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 [allowSubnetworkCreation][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowSubnetworkCreation] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowSubnetworkCreation]: <doc:NetworkProfileNetworkFeatures/AllowSubnetworkCreation>
    public enum AllowSubnetworkCreation: Codable, Equatable, Sendable {
      case subnetworkCreationAllowed
      case subnetworkCreationBlocked
      /// 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 = .subnetworkCreationAllowed
      }

      /// 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 .subnetworkCreationAllowed: return 0
        case .subnetworkCreationBlocked: 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 .subnetworkCreationAllowed: return "SUBNETWORK_CREATION_ALLOWED"
        case .subnetworkCreationBlocked: return "SUBNETWORK_CREATION_BLOCKED"
        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:AllowSubnetworkCreation/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "SUBNETWORK_CREATION_ALLOWED": self = .subnetworkCreationAllowed
        case "SUBNETWORK_CREATION_BLOCKED": self = .subnetworkCreationBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowSubnetworkCreation/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .subnetworkCreationAllowed
        case 1: self = .subnetworkCreationBlocked
        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 .subnetworkCreationAllowed: return try container.encode(0)
        case .subnetworkCreationBlocked: 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 [allowVpcFirewallRules][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowVpcFirewallRules] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowVpcFirewallRules]: <doc:NetworkProfileNetworkFeatures/AllowVpcFirewallRules>
    public enum AllowVpcFirewallRules: Codable, Equatable, Sendable {
      case vpcFirewallRulesAllowed
      case vpcFirewallRulesBlocked
      /// 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 = .vpcFirewallRulesAllowed
      }

      /// 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 .vpcFirewallRulesAllowed: return 0
        case .vpcFirewallRulesBlocked: 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 .vpcFirewallRulesAllowed: return "VPC_FIREWALL_RULES_ALLOWED"
        case .vpcFirewallRulesBlocked: return "VPC_FIREWALL_RULES_BLOCKED"
        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:AllowVpcFirewallRules/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "VPC_FIREWALL_RULES_ALLOWED": self = .vpcFirewallRulesAllowed
        case "VPC_FIREWALL_RULES_BLOCKED": self = .vpcFirewallRulesBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowVpcFirewallRules/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .vpcFirewallRulesAllowed
        case 1: self = .vpcFirewallRulesBlocked
        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 .vpcFirewallRulesAllowed: return try container.encode(0)
        case .vpcFirewallRulesBlocked: 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 [allowVpcPeering][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowVpcPeering] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowVpcPeering]: <doc:NetworkProfileNetworkFeatures/AllowVpcPeering>
    public enum AllowVpcPeering: Codable, Equatable, Sendable {
      case vpcPeeringAllowed
      case vpcPeeringBlocked
      /// 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 = .vpcPeeringAllowed
      }

      /// 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 .vpcPeeringAllowed: return 0
        case .vpcPeeringBlocked: 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 .vpcPeeringAllowed: return "VPC_PEERING_ALLOWED"
        case .vpcPeeringBlocked: return "VPC_PEERING_BLOCKED"
        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:AllowVpcPeering/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "VPC_PEERING_ALLOWED": self = .vpcPeeringAllowed
        case "VPC_PEERING_BLOCKED": self = .vpcPeeringBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowVpcPeering/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .vpcPeeringAllowed
        case 1: self = .vpcPeeringBlocked
        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 .vpcPeeringAllowed: return try container.encode(0)
        case .vpcPeeringBlocked: 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 [allowVpn][google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowVpn] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.allowVpn]: <doc:NetworkProfileNetworkFeatures/AllowVpn>
    public enum AllowVpn: Codable, Equatable, Sendable {
      case vpnAllowed
      case vpnBlocked
      /// 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 = .vpnAllowed
      }

      /// 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 .vpnAllowed: return 0
        case .vpnBlocked: 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 .vpnAllowed: return "VPN_ALLOWED"
        case .vpnBlocked: return "VPN_BLOCKED"
        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:AllowVpn/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "VPN_ALLOWED": self = .vpnAllowed
        case "VPN_BLOCKED": self = .vpnBlocked
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:AllowVpn/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .vpnAllowed
        case 1: self = .vpnBlocked
        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 .vpnAllowed: return try container.encode(0)
        case .vpnBlocked: 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 [firewallPolicyTypes][google.cloud.compute.v1.NetworkProfileNetworkFeatures.firewallPolicyTypes] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.firewallPolicyTypes]: <doc:NetworkProfileNetworkFeatures/FirewallPolicyTypes>
    public enum FirewallPolicyTypes: Codable, Equatable, Sendable {
      case rdmaRocePolicy
      case ullPolicy
      case vpcPolicy
      /// 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 = .rdmaRocePolicy
      }

      /// 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 .rdmaRocePolicy: return 0
        case .ullPolicy: return 1
        case .vpcPolicy: 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 .rdmaRocePolicy: return "RDMA_ROCE_POLICY"
        case .ullPolicy: return "ULL_POLICY"
        case .vpcPolicy: return "VPC_POLICY"
        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:FirewallPolicyTypes/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "RDMA_ROCE_POLICY": self = .rdmaRocePolicy
        case "ULL_POLICY": self = .ullPolicy
        case "VPC_POLICY": self = .vpcPolicy
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:FirewallPolicyTypes/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .rdmaRocePolicy
        case 1: self = .ullPolicy
        case 2: self = .vpcPolicy
        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 .rdmaRocePolicy: return try container.encode(0)
        case .ullPolicy: return try container.encode(1)
        case .vpcPolicy: 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 [interfaceTypes][google.cloud.compute.v1.NetworkProfileNetworkFeatures.interfaceTypes] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.interfaceTypes]: <doc:NetworkProfileNetworkFeatures/InterfaceTypes>
    public enum InterfaceTypes: Codable, Equatable, Sendable {
      /// GVNIC
      case gvnic
      /// IDPF
      case idpf
      /// IRDMA
      case irdma
      /// MRDMA
      case mrdma
      /// No type specified.
      case unspecifiedNicType
      /// VIRTIO
      case virtioNet
      /// 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 = .gvnic
      }

      /// 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 .gvnic: return 0
        case .idpf: return 1
        case .irdma: return 2
        case .mrdma: return 3
        case .unspecifiedNicType: return 4
        case .virtioNet: return 5
        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 .gvnic: return "GVNIC"
        case .idpf: return "IDPF"
        case .irdma: return "IRDMA"
        case .mrdma: return "MRDMA"
        case .unspecifiedNicType: return "UNSPECIFIED_NIC_TYPE"
        case .virtioNet: return "VIRTIO_NET"
        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:InterfaceTypes/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "GVNIC": self = .gvnic
        case "IDPF": self = .idpf
        case "IRDMA": self = .irdma
        case "MRDMA": self = .mrdma
        case "UNSPECIFIED_NIC_TYPE": self = .unspecifiedNicType
        case "VIRTIO_NET": self = .virtioNet
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:InterfaceTypes/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .gvnic
        case 1: self = .idpf
        case 2: self = .irdma
        case 3: self = .mrdma
        case 4: self = .unspecifiedNicType
        case 5: self = .virtioNet
        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 .gvnic: return try container.encode(0)
        case .idpf: return try container.encode(1)
        case .irdma: return try container.encode(2)
        case .mrdma: return try container.encode(3)
        case .unspecifiedNicType: return try container.encode(4)
        case .virtioNet: return try container.encode(5)
        case .unknownIntValue(let v): return try container.encode(v)
        case .unknownStringValue(let v): return try container.encode(v)
        }
      }
    }

    /// The enumerated type for the [multicast][google.cloud.compute.v1.NetworkProfileNetworkFeatures.multicast] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.multicast]: <doc:NetworkProfileNetworkFeatures/Multicast>
    public enum Multicast: Codable, Equatable, Sendable {
      case sdn
      case ull
      /// 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 = .sdn
      }

      /// 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 .sdn: return 0
        case .ull: 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 .sdn: return "MULTICAST_SDN"
        case .ull: return "MULTICAST_ULL"
        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:Multicast/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "MULTICAST_SDN": self = .sdn
        case "MULTICAST_ULL": self = .ull
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:Multicast/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .sdn
        case 1: self = .ull
        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 .sdn: return try container.encode(0)
        case .ull: 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 [subnetPurposes][google.cloud.compute.v1.NetworkProfileNetworkFeatures.subnetPurposes] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.subnetPurposes]: <doc:NetworkProfileNetworkFeatures/SubnetPurposes>
    public enum SubnetPurposes: Codable, Equatable, Sendable {
      case subnetPurposeCustomHardware
      case subnetPurposePrivate
      /// 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 = .subnetPurposeCustomHardware
      }

      /// 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 .subnetPurposeCustomHardware: return 0
        case .subnetPurposePrivate: 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 .subnetPurposeCustomHardware: return "SUBNET_PURPOSE_CUSTOM_HARDWARE"
        case .subnetPurposePrivate: return "SUBNET_PURPOSE_PRIVATE"
        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:SubnetPurposes/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "SUBNET_PURPOSE_CUSTOM_HARDWARE": self = .subnetPurposeCustomHardware
        case "SUBNET_PURPOSE_PRIVATE": self = .subnetPurposePrivate
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:SubnetPurposes/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .subnetPurposeCustomHardware
        case 1: self = .subnetPurposePrivate
        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 .subnetPurposeCustomHardware: return try container.encode(0)
        case .subnetPurposePrivate: 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 [subnetStackTypes][google.cloud.compute.v1.NetworkProfileNetworkFeatures.subnetStackTypes] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.subnetStackTypes]: <doc:NetworkProfileNetworkFeatures/SubnetStackTypes>
    public enum SubnetStackTypes: Codable, Equatable, Sendable {
      case subnetStackTypeIpv4Ipv6
      case subnetStackTypeIpv4Only
      case subnetStackTypeIpv6Only
      /// 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 = .subnetStackTypeIpv4Ipv6
      }

      /// 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 .subnetStackTypeIpv4Ipv6: return 0
        case .subnetStackTypeIpv4Only: return 1
        case .subnetStackTypeIpv6Only: 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 .subnetStackTypeIpv4Ipv6: return "SUBNET_STACK_TYPE_IPV4_IPV6"
        case .subnetStackTypeIpv4Only: return "SUBNET_STACK_TYPE_IPV4_ONLY"
        case .subnetStackTypeIpv6Only: return "SUBNET_STACK_TYPE_IPV6_ONLY"
        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:SubnetStackTypes/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "SUBNET_STACK_TYPE_IPV4_IPV6": self = .subnetStackTypeIpv4Ipv6
        case "SUBNET_STACK_TYPE_IPV4_ONLY": self = .subnetStackTypeIpv4Only
        case "SUBNET_STACK_TYPE_IPV6_ONLY": self = .subnetStackTypeIpv6Only
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:SubnetStackTypes/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .subnetStackTypeIpv4Ipv6
        case 1: self = .subnetStackTypeIpv4Only
        case 2: self = .subnetStackTypeIpv6Only
        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 .subnetStackTypeIpv4Ipv6: return try container.encode(0)
        case .subnetStackTypeIpv4Only: return try container.encode(1)
        case .subnetStackTypeIpv6Only: 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 [subnetworkPurposes][google.cloud.compute.v1.NetworkProfileNetworkFeatures.subnetworkPurposes] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.subnetworkPurposes]: <doc:NetworkProfileNetworkFeatures/SubnetworkPurposes>
    public enum SubnetworkPurposes: Codable, Equatable, Sendable {
      /// Subnet reserved for Global Envoy-based Load Balancing.
      case globalManagedProxy
      /// Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy
      /// purpose, please use REGIONAL_MANAGED_PROXY instead.
      case internalHttpsLoadBalancer
      /// Subnetwork will be used for Migration from one peered VPC to another.
      /// (a transient state of subnetwork
      /// while migrating resources from one project to another).
      case peerMigration
      /// Regular user created or automatically created subnet.
      case `private`
      /// Subnetwork used as source range for Private NAT Gateways.
      case privateNat
      /// Regular user created or automatically created subnet.
      case privateRfc1918
      /// Subnetworks created for Private Service Connect in the producer network.
      case privateServiceConnect
      /// Subnetwork used for Regional Envoy-based Load Balancing.
      case regionalManagedProxy
      /// 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 = .globalManagedProxy
      }

      /// 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 .globalManagedProxy: return 0
        case .internalHttpsLoadBalancer: return 1
        case .peerMigration: return 2
        case .`private`: return 3
        case .privateNat: return 4
        case .privateRfc1918: return 5
        case .privateServiceConnect: return 6
        case .regionalManagedProxy: return 7
        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 .globalManagedProxy: return "GLOBAL_MANAGED_PROXY"
        case .internalHttpsLoadBalancer: return "INTERNAL_HTTPS_LOAD_BALANCER"
        case .peerMigration: return "PEER_MIGRATION"
        case .`private`: return "PRIVATE"
        case .privateNat: return "PRIVATE_NAT"
        case .privateRfc1918: return "PRIVATE_RFC_1918"
        case .privateServiceConnect: return "PRIVATE_SERVICE_CONNECT"
        case .regionalManagedProxy: return "REGIONAL_MANAGED_PROXY"
        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:SubnetworkPurposes/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "GLOBAL_MANAGED_PROXY": self = .globalManagedProxy
        case "INTERNAL_HTTPS_LOAD_BALANCER": self = .internalHttpsLoadBalancer
        case "PEER_MIGRATION": self = .peerMigration
        case "PRIVATE": self = .`private`
        case "PRIVATE_NAT": self = .privateNat
        case "PRIVATE_RFC_1918": self = .privateRfc1918
        case "PRIVATE_SERVICE_CONNECT": self = .privateServiceConnect
        case "REGIONAL_MANAGED_PROXY": self = .regionalManagedProxy
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:SubnetworkPurposes/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .globalManagedProxy
        case 1: self = .internalHttpsLoadBalancer
        case 2: self = .peerMigration
        case 3: self = .`private`
        case 4: self = .privateNat
        case 5: self = .privateRfc1918
        case 6: self = .privateServiceConnect
        case 7: self = .regionalManagedProxy
        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 .globalManagedProxy: return try container.encode(0)
        case .internalHttpsLoadBalancer: return try container.encode(1)
        case .peerMigration: return try container.encode(2)
        case .`private`: return try container.encode(3)
        case .privateNat: return try container.encode(4)
        case .privateRfc1918: return try container.encode(5)
        case .privateServiceConnect: return try container.encode(6)
        case .regionalManagedProxy: return try container.encode(7)
        case .unknownIntValue(let v): return try container.encode(v)
        case .unknownStringValue(let v): return try container.encode(v)
        }
      }
    }

    /// The enumerated type for the [subnetworkStackTypes][google.cloud.compute.v1.NetworkProfileNetworkFeatures.subnetworkStackTypes] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.subnetworkStackTypes]: <doc:NetworkProfileNetworkFeatures/SubnetworkStackTypes>
    public enum SubnetworkStackTypes: Codable, Equatable, Sendable {
      /// New VMs in this subnet can have both IPv4 and IPv6 addresses.
      case ipv4Ipv6
      /// New VMs in this subnet will only be assigned IPv4 addresses.
      case ipv4Only
      /// New VMs in this subnet will only  be assigned IPv6 addresses.
      case ipv6Only
      /// 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 = .ipv4Ipv6
      }

      /// 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 .ipv4Ipv6: return 0
        case .ipv4Only: return 1
        case .ipv6Only: 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 .ipv4Ipv6: return "IPV4_IPV6"
        case .ipv4Only: return "IPV4_ONLY"
        case .ipv6Only: return "IPV6_ONLY"
        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:SubnetworkStackTypes/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "IPV4_IPV6": self = .ipv4Ipv6
        case "IPV4_ONLY": self = .ipv4Only
        case "IPV6_ONLY": self = .ipv6Only
        default: self = .unknownStringValue(stringValue)
        }
      }

      /// Initialize from an integer value.
      ///
      /// If the value is unknown, this initializes to [`unknownIntValue`](doc:SubnetworkStackTypes/unknownIntValue(_:)).
      public init(intValue: Int) {
        switch intValue {
        case 0: self = .ipv4Ipv6
        case 1: self = .ipv4Only
        case 2: self = .ipv6Only
        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 .ipv4Ipv6: return try container.encode(0)
        case .ipv4Only: return try container.encode(1)
        case .ipv6Only: 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 [unicast][google.cloud.compute.v1.NetworkProfileNetworkFeatures.unicast] field.
    ///
    /// [google.cloud.compute.v1.NetworkProfileNetworkFeatures.unicast]: <doc:NetworkProfileNetworkFeatures/Unicast>
    public enum Unicast: Codable, Equatable, Sendable {
      case sdn
      case ull
      /// 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 = .sdn
      }

      /// 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 .sdn: return 0
        case .ull: 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 .sdn: return "UNICAST_SDN"
        case .ull: return "UNICAST_ULL"
        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:Unicast/unknownStringValue(_:)).
      public init(stringValue: Swift.String) {
        switch stringValue {
        case "UNICAST_SDN": self = .sdn
        case "UNICAST_ULL": self = .ull
        default: self = .unknownStringValue(stringValue)
        }
      }

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