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

/// Configuration options for private clusters.
public struct PrivateClusterConfig: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Whether nodes have internal IP addresses only. If enabled, all nodes are
  /// given only RFC 1918 private addresses and communicate with the master via
  /// private networking.
  ///
  /// Deprecated: Use
  /// [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes]
  /// instead.
  ///
  /// [google.container.v1.NetworkConfig.default_enable_private_nodes]: <doc:NetworkConfig/defaultEnablePrivateNodes>
  @available(*, deprecated)
  public var enablePrivateNodes: Swift.Bool = Swift.Bool()

  /// Whether the master's internal IP address is used as the cluster endpoint.
  ///
  /// Deprecated: Use
  /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint]
  /// instead. Note that the value of enable_public_endpoint is reversed: if
  /// enable_private_endpoint is false, then enable_public_endpoint will be true.
  ///
  /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint]: <doc:ControlPlaneEndpointsConfig/IPEndpointsConfig/enablePublicEndpoint>
  @available(*, deprecated)
  public var enablePrivateEndpoint: Swift.Bool = Swift.Bool()

  /// The IP range in CIDR notation to use for the hosted master network. This
  /// range will be used for assigning internal IP addresses to the master or
  /// set of masters, as well as the ILB VIP. This range must not overlap with
  /// any other ranges in use within the cluster's network.
  public var masterIpv4CidrBlock: Swift.String = Swift.String()

  /// Output only. The internal IP address of this cluster's master endpoint.
  ///
  /// Deprecated: Use
  /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint]
  /// instead.
  ///
  /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint]: <doc:ControlPlaneEndpointsConfig/IPEndpointsConfig/privateEndpoint>
  @available(*, deprecated)
  public var privateEndpoint: Swift.String = Swift.String()

  /// Output only. The external IP address of this cluster's master endpoint.
  ///
  /// Deprecated:Use
  /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint]
  /// instead.
  ///
  /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint]: <doc:ControlPlaneEndpointsConfig/IPEndpointsConfig/publicEndpoint>
  @available(*, deprecated)
  public var publicEndpoint: Swift.String = Swift.String()

  /// Output only. The peering name in the customer VPC used by this cluster.
  public var peeringName: Swift.String = Swift.String()

  /// Controls master global access settings.
  ///
  /// Deprecated: Use
  /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access][]
  /// instead.
  @available(*, deprecated)
  public var masterGlobalAccessConfig: PrivateClusterMasterGlobalAccessConfig? = nil

  /// Subnet to provision the master's private endpoint during cluster creation.
  /// Specified in projects/*/regions/*/subnetworks/* format.
  ///
  /// Deprecated: Use
  /// [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork]
  /// instead.
  ///
  /// [google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork]: <doc:ControlPlaneEndpointsConfig/IPEndpointsConfig/privateEndpointSubnetwork>
  @available(*, deprecated)
  public var privateEndpointSubnetwork: Swift.String = Swift.String()

  /// Initialize a new instance of `PrivateClusterConfig`.
  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 = PrivateClusterConfig().with { $0.enablePrivateNodes = ... }
  /// ```
  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.PrivateClusterConfig"
  }
  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)
  }
}
