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

/// Details of the Cloud VM Cluster resource.
/// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/CloudVmCluster/
public struct CloudVmCluster: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Identifier. The name of the VM Cluster resource with the format:
  /// projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster}
  public var name: Swift.String = Swift.String()

  /// Required. The name of the Exadata Infrastructure resource on which VM
  /// cluster resource is created, in the following format:
  /// projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure}
  public var exadataInfrastructure: Swift.String = Swift.String()

  /// Optional. User friendly name for this resource.
  public var displayName: Swift.String = Swift.String()

  /// Optional. Various properties of the VM Cluster.
  public var properties: CloudVmClusterProperties? = nil

  /// Optional. Labels or tags associated with the VM Cluster.
  public var labels: [Swift.String: Swift.String] = [:]

  /// Output only. The date and time that the VM cluster was created.
  public var createTime: GoogleCloudWkt.Timestamp? = nil

  /// Optional. Network settings. CIDR to use for cluster IP allocation.
  public var cidr: Swift.String = Swift.String()

  /// Optional. CIDR range of the backup subnet.
  public var backupSubnetCidr: Swift.String = Swift.String()

  /// Optional. The name of the VPC network.
  /// Format: projects/{project}/global/networks/{network}
  public var network: Swift.String = Swift.String()

  /// Output only. The GCP Oracle zone where Oracle CloudVmCluster is hosted.
  /// This will be the same as the gcp_oracle_zone of the
  /// CloudExadataInfrastructure. Example: us-east4-b-r2.
  public var gcpOracleZone: Swift.String = Swift.String()

  /// Optional. The name of the OdbNetwork associated with the VM Cluster.
  /// Format:
  /// projects/{project}/locations/{location}/odbNetworks/{odb_network}
  /// It is optional but if specified, this should match the parent ODBNetwork of
  /// the odb_subnet and backup_odb_subnet.
  public var odbNetwork: Swift.String = Swift.String()

  /// Optional. The name of the OdbSubnet associated with the VM Cluster for
  /// IP allocation. Format:
  /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
  public var odbSubnet: Swift.String = Swift.String()

  /// Optional. The name of the backup OdbSubnet associated with the VM Cluster.
  /// Format:
  /// projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
  public var backupOdbSubnet: Swift.String = Swift.String()

  /// Output only. The identity connector details which will allow OCI to
  /// securely access the resources in the customer project.
  public var identityConnector: IdentityConnector? = nil

  /// Optional. The name of ExascaleDbStorageVault associated with the VM
  /// Cluster. Format:
  /// projects/{project}/locations/{location}/exascaleDbStorageVaults/{exascale_db_storage_vault}
  public var exascaleDbStorageVault: Swift.String = Swift.String()

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