// Code generated by sidekick. DO NOT EDIT.
//
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import GoogleCloudWkt

/// AutoprovisioningNodePoolDefaults contains defaults for a node pool created
/// by NAP.
public struct AutoprovisioningNodePoolDefaults: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Scopes that are used by NAP when creating node pools.
  public var oauthScopes: [Swift.String] = []

  /// The Google Cloud Platform Service Account to be used by the node VMs.
  public var serviceAccount: Swift.String = Swift.String()

  /// Specifies the upgrade settings for NAP created node pools
  public var upgradeSettings: NodePool.UpgradeSettings? = nil

  /// Specifies the node management options for NAP created node-pools.
  public var management: NodeManagement? = nil

  /// Deprecated. Minimum CPU platform to be used for NAP created node pools.
  /// The instance may be scheduled on the specified or newer CPU platform.
  /// Applicable values are the friendly names of CPU platforms, such as
  /// minCpuPlatform: Intel Haswell or
  /// minCpuPlatform: Intel Sandy Bridge. For more
  /// information, read [how to specify min CPU
  /// platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform).
  /// This field is deprecated, min_cpu_platform should be specified using
  /// `cloud.google.com/requested-min-cpu-platform` label selector on the pod.
  /// To unset the min cpu platform field pass "automatic"
  /// as field value.
  @available(*, deprecated)
  public var minCpuPlatform: Swift.String = Swift.String()

  /// Size of the disk attached to each node, specified in GB.
  /// The smallest allowed disk size is 10GB.
  ///
  /// If unspecified, the default disk size is 100GB.
  public var diskSizeGb: Swift.Int32 = Swift.Int32()

  /// Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or
  /// 'pd-balanced')
  ///
  /// If unspecified, the default disk type is 'pd-standard'
  public var diskType: Swift.String = Swift.String()

  /// Shielded Instance options.
  public var shieldedInstanceConfig: ShieldedInstanceConfig? = nil

  /// The Customer Managed Encryption Key used to encrypt the boot disk attached
  /// to each node in the node pool. This should be of the form
  /// projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME].
  /// For more information about protecting resources with Cloud KMS Keys please
  /// see:
  /// https://cloud.google.com/compute/docs/disks/customer-managed-encryption
  public var bootDiskKmsKey: Swift.String = Swift.String()

  /// The image type to use for NAP created node. Please see
  /// https://cloud.google.com/kubernetes-engine/docs/concepts/node-images
  /// for available image types.
  public var imageType: Swift.String = Swift.String()

  /// DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead.
  public var insecureKubeletReadonlyPortEnabled: Swift.Bool? = nil

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

  public static var _anyTypeUrl: Swift.String {
    return "type.googleapis.com/google.container.v1.AutoprovisioningNodePoolDefaults"
  }
  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)
  }
}
