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

/// Specifies Kerberos related configuration.
public struct KerberosConfig: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Optional. Flag to indicate whether to Kerberize the cluster (default:
  /// false). Set this field to true to enable Kerberos on a cluster.
  public var enableKerberos: Swift.Bool = Swift.Bool()

  /// Optional. The Cloud Storage URI of a KMS encrypted file containing the root
  /// principal password.
  public var rootPrincipalPasswordUri: Swift.String = Swift.String()

  /// Optional. The URI of the KMS key used to encrypt sensitive
  /// files.
  public var kmsKeyUri: Swift.String = Swift.String()

  /// Optional. The Cloud Storage URI of the keystore file used for SSL
  /// encryption. If not provided, Dataproc will provide a self-signed
  /// certificate.
  public var keystoreUri: Swift.String = Swift.String()

  /// Optional. The Cloud Storage URI of the truststore file used for SSL
  /// encryption. If not provided, Dataproc will provide a self-signed
  /// certificate.
  public var truststoreUri: Swift.String = Swift.String()

  /// Optional. The Cloud Storage URI of a KMS encrypted file containing the
  /// password to the user provided keystore. For the self-signed certificate,
  /// this password is generated by Dataproc.
  public var keystorePasswordUri: Swift.String = Swift.String()

  /// Optional. The Cloud Storage URI of a KMS encrypted file containing the
  /// password to the user provided key. For the self-signed certificate, this
  /// password is generated by Dataproc.
  public var keyPasswordUri: Swift.String = Swift.String()

  /// Optional. The Cloud Storage URI of a KMS encrypted file containing the
  /// password to the user provided truststore. For the self-signed certificate,
  /// this password is generated by Dataproc.
  public var truststorePasswordUri: Swift.String = Swift.String()

  /// Optional. The remote realm the Dataproc on-cluster KDC will trust, should
  /// the user enable cross realm trust.
  public var crossRealmTrustRealm: Swift.String = Swift.String()

  /// Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
  /// realm trust relationship.
  public var crossRealmTrustKdc: Swift.String = Swift.String()

  /// Optional. The admin server (IP or hostname) for the remote trusted realm in
  /// a cross realm trust relationship.
  public var crossRealmTrustAdminServer: Swift.String = Swift.String()

  /// Optional. The Cloud Storage URI of a KMS encrypted file containing the
  /// shared password between the on-cluster Kerberos realm and the remote
  /// trusted realm, in a cross realm trust relationship.
  public var crossRealmTrustSharedPasswordUri: Swift.String = Swift.String()

  /// Optional. The Cloud Storage URI of a KMS encrypted file containing the
  /// master key of the KDC database.
  public var kdcDbKeyUri: Swift.String = Swift.String()

  /// Optional. The lifetime of the ticket granting ticket, in hours.
  /// If not specified, or user specifies 0, then default value 10
  /// will be used.
  public var tgtLifetimeHours: Swift.Int32 = Swift.Int32()

  /// Optional. The name of the on-cluster Kerberos realm.
  /// If not specified, the uppercased domain of hostnames will be the realm.
  public var realm: Swift.String = Swift.String()

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