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

/// Parameters that describe the nodes in a cluster.
@available(*, deprecated)
public struct AwsNodeConfig: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Optional. The EC2 instance type when creating on-Demand instances.
  ///
  /// If unspecified during node pool creation, a default will be chosen based on
  /// the node pool version, and assigned to this field.
  public var instanceType: Swift.String = Swift.String()

  /// Optional. Template for the root volume provisioned for node pool nodes.
  /// Volumes will be provisioned in the availability zone assigned
  /// to the node pool subnet.
  ///
  /// When unspecified, it defaults to 32 GiB with the GP2 volume type.
  public var rootVolume: AwsVolumeTemplate? = nil

  /// Optional. The initial taints assigned to nodes of this node pool.
  public var taints: [NodeTaint] = []

  /// Optional. The initial labels assigned to nodes of this node pool. An object
  /// containing a list of "key": value pairs. Example: { "name": "wrench",
  /// "mass": "1.3kg", "count": "3" }.
  public var labels: [Swift.String: Swift.String] = [:]

  /// Optional. Key/value metadata to assign to each underlying AWS resource.
  /// Specify at most 50 pairs containing alphanumerics, spaces, and symbols
  /// (.+-=_:@/). Keys can be up to 127 Unicode characters. Values can be up to
  /// 255 Unicode characters.
  public var tags: [Swift.String: Swift.String] = [:]

  /// Required. The name or ARN of the AWS IAM instance profile to assign to
  /// nodes in the pool.
  public var iamInstanceProfile: Swift.String = Swift.String()

  /// Optional. The OS image type to use on node pool instances.
  /// Can be unspecified, or have a value of `ubuntu`.
  ///
  /// When unspecified, it defaults to `ubuntu`.
  public var imageType: Swift.String = Swift.String()

  /// Optional. The SSH configuration.
  public var sshConfig: AwsSshConfig? = nil

  /// Optional. The IDs of additional security groups to add to nodes in this
  /// pool. The manager will automatically create security groups with minimum
  /// rules needed for a functioning cluster.
  public var securityGroupIds: [Swift.String] = []

  /// Optional. Proxy configuration for outbound HTTP(S) traffic.
  public var proxyConfig: AwsProxyConfig? = nil

  /// Required. Config encryption for user data.
  public var configEncryption: AwsConfigEncryption? = nil

  /// Optional. Placement related info for this node.
  /// When unspecified, the VPC's default tenancy will be used.
  public var instancePlacement: AwsInstancePlacement? = nil

  /// Optional. Configuration related to CloudWatch metrics collection on the
  /// Auto Scaling group of the node pool.
  ///
  /// When unspecified, metrics collection is disabled.
  public var autoscalingMetricsCollection: AwsAutoscalingGroupMetricsCollection? = nil

  /// Optional. Configuration for provisioning EC2 Spot instances
  ///
  /// When specified, the node pool will provision Spot instances from the set
  /// of spot_config.instance_types.
  /// This field is mutually exclusive with `instance_type`.
  public var spotConfig: SpotConfig? = nil

  /// Initialize a new instance of `AwsNodeConfig`.
  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 = AwsNodeConfig().with { $0.instanceType = ... }
  /// ```
  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.cloud.gkemulticloud.v1.AwsNodeConfig"
  }
  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)
  }
}
