# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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
#
#    http://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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
  - ALPHA
  auto_generated: true
  hidden: true
  help_text:
    brief: Create a new CloudVmCluster.
    description: Create a new CloudVmCluster.
    examples: |-
      Choose an available gi-versions in your location by running
      `gcloud oracle-database db-system-shapes list --location=us-east4`.
      To create CloudVmCluster instance with id `my-instance` in the location `us-east4`
      with display-name `my instance`, odb-network `projects/network-project/locations/us-east4/odbNetworks/my-odbnetwork`,
      odb-subnet `projects/network-project/locations/us-east4/odbNetworks/my-odbnetwork/odbSubnets/my-odbsubnet`,
      backup-odb-subnet `projects/network-project/locations/us-east4/odbNetworks/my-odbnetwork/odbSubnets/my-backup-odbsubnet`,
      cidr `10.1.0.0/24`, network `projects/my-project/locations/global/networks/default`,
      backup-subnet-cidr `10.2.0.0/24`, license-type `LICENSE_INCLUDED`, ssh-public-keys `VtTxzlPJtIivthmLOmWdRDFy5l27pKUTwLp02`,
      hostname-prefix `hostname1`, cpu-core-count `4` and choosen gi-version `xx.0.0.0`, run:

      To set the network configuration use one of the following options:

      ODBNetwork based configuration(This is the recommended way):

      $ {command} my-instance --location=us-east4 --display-name="my instance" \
       --odb-network=projects/network-project/locations/us-east4/odbNetworks/my-odbnetwork \
       --odb-subnet=projects/network-project/locations/us-east4/odbNetworks/my-odbnetwork/odbSubnets/my-odbsubnet \
       --backup-odb-subnet=projects/network-project/locations/us-east4/odbNetworks/my-odbnetwork/odbSubnets/my-backup-odbsubnet \
       --properties-license-type=LICENSE_INCLUDED \
       --properties-ssh-public-keys="VtTxzlPJtIivthmLOmWdRDFy5l27pKUTwLp02" \
       --properties-gi-version=xx.0.0.0  --properties-hostname-prefix=hostname1 \
       --properties-cpu-core-count=4

      Network and CIDR based configuration:

      $ {command} my-instance --location=us-east4 --display-name="my instance" \
       --cidr=10.1.0.0/24 --network=projects/my-project/locations/global/networks/default \
       --backup-subnet-cidr=10.2.0.0/24  --properties-license-type=LICENSE_INCLUDED \
       --properties-ssh-public-keys="VtTxzlPJtIivthmLOmWdRDFy5l27pKUTwLp02" \
       --properties-gi-version=xx.0.0.0  --properties-hostname-prefix=hostname1 \
       --properties-cpu-core-count=4
  arguments:
    params:
    - help_text: |-
        Identifier. The name of the VM Cluster resource with the format:
        projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster}
      is_positional: true
      is_primary_resource: true
      request_id_field: cloudVmClusterId
      resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1alpha_resources:projects_locations_cloud_vm_clusters
      required: true
    - arg_name: exadata-infrastructure
      help_text: |-
        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}
      is_positional: false
      is_primary_resource: false
      resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1alpha_resources:projects_locations_cloud_exadata_infrastructures
      resource_method_params:
        cloudVmCluster.exadataInfrastructure: '{__relative_name__}'
      required: true
    - arg_name: display-name
      api_field: cloudVmCluster.displayName
      required: false
      repeated: false
      help_text: |-
        User friendly name for this resource.
    - group:
        api_field: cloudVmCluster.properties
        required: false
        help_text: |-
          Various properties and settings associated with Exadata VM cluster.
        params:
        - arg_name: properties-license-type
          api_field: cloudVmCluster.properties.licenseType
          required: true
          help_text: |-
            License type of VM Cluster.
          choices:
          - arg_value: license-included
            enum_value: LICENSE_INCLUDED
            help_text: |-
              License included part of offer
            hidden: true
          - arg_value: bring-your-own-license
            enum_value: BRING_YOUR_OWN_LICENSE
            help_text: |-
              Bring your own license
            hidden: true
        - arg_name: properties-gi-version
          api_field: cloudVmCluster.properties.giVersion
          required: false
          repeated: false
          help_text: |-
            Grid Infrastructure Version.
        - group:
            api_field: cloudVmCluster.properties.timeZone
            required: false
            help_text: |-
              Represents a time zone from the
              [IANA Time Zone Database](https://www.iana.org/time-zones).
            params:
            - arg_name: time-zone-id
              api_field: cloudVmCluster.properties.timeZone.id
              required: false
              repeated: false
              help_text: |-
                IANA Time Zone Database time zone. For example "America/New_York".
            - arg_name: time-zone-version
              api_field: cloudVmCluster.properties.timeZone.version
              required: false
              repeated: false
              help_text: |-
                IANA Time Zone Database version number. For example "2019a".
        - arg_name: properties-ssh-public-keys
          api_field: cloudVmCluster.properties.sshPublicKeys
          required: false
          repeated: true
          help_text: |-
            SSH public keys to be stored with cluster.
        - arg_name: properties-node-count
          api_field: cloudVmCluster.properties.nodeCount
          required: false
          repeated: false
          type: int
          help_text: |-
            Number of database servers.
        - arg_name: properties-ocpu-count
          api_field: cloudVmCluster.properties.ocpuCount
          required: false
          repeated: false
          type: float
          help_text: |-
            OCPU count per VM. Minimum is 0.1.
        - arg_name: properties-memory-size-gb
          api_field: cloudVmCluster.properties.memorySizeGb
          required: false
          repeated: false
          type: int
          help_text: |-
            Memory allocated in GBs.
        - arg_name: properties-db-node-storage-size-gb
          api_field: cloudVmCluster.properties.dbNodeStorageSizeGb
          required: false
          repeated: false
          type: int
          help_text: |-
            Local storage per VM.
        - arg_name: properties-data-storage-size-tb
          api_field: cloudVmCluster.properties.dataStorageSizeTb
          required: false
          repeated: false
          type: float
          help_text: |-
            The data disk group size to be allocated in TBs.
        - arg_name: properties-disk-redundancy
          api_field: cloudVmCluster.properties.diskRedundancy
          required: false
          help_text: |-
            The type of redundancy.
          choices:
          - arg_value: high
            enum_value: HIGH
            help_text: |-
              High -  3 way mirror.
            hidden: true
          - arg_value: normal
            enum_value: NORMAL
            help_text: |-
              Normal - 2 way mirror.
            hidden: true
        - arg_name: properties-sparse-diskgroup-enabled
          api_field: cloudVmCluster.properties.sparseDiskgroupEnabled
          action: store_true
          required: false
          type: bool
          help_text: |-
            Use exadata sparse snapshots.
          default: null
        - arg_name: properties-local-backup-enabled
          api_field: cloudVmCluster.properties.localBackupEnabled
          action: store_true
          required: false
          type: bool
          help_text: |-
            Use local backup.
          default: null
        - arg_name: properties-hostname-prefix
          api_field: cloudVmCluster.properties.hostnamePrefix
          required: false
          repeated: false
          help_text: |-
            Prefix for VM cluster host names.
        - group:
            api_field: cloudVmCluster.properties.diagnosticsDataCollectionOptions
            required: false
            help_text: |-
              Data collection options for diagnostics.
            params:
            - arg_name: diagnostics-data-collection-options-events-enabled
              api_field: cloudVmCluster.properties.diagnosticsDataCollectionOptions.diagnosticsEventsEnabled
              action: store_true
              required: false
              type: bool
              help_text: |-
                Indicates whether diagnostic collection is enabled for the VM cluster
              default: null
            - arg_name: diagnostics-data-collection-options-health-monitoring-enabled
              api_field: cloudVmCluster.properties.diagnosticsDataCollectionOptions.healthMonitoringEnabled
              action: store_true
              required: false
              type: bool
              help_text: |-
                Indicates whether health monitoring is enabled for the VM cluster
              default: null
            - arg_name: diagnostics-data-collection-options-incident-logs-enabled
              api_field: cloudVmCluster.properties.diagnosticsDataCollectionOptions.incidentLogsEnabled
              action: store_true
              required: false
              type: bool
              help_text: |-
                Indicates whether incident logs and trace collection are enabled for the VM
                cluster
              default: null
        - arg_name: properties-cpu-core-count
          api_field: cloudVmCluster.properties.cpuCoreCount
          required: true
          repeated: false
          type: int
          help_text: |-
            Number of enabled CPU cores.
        - arg_name: properties-system-version
          api_field: cloudVmCluster.properties.systemVersion
          required: false
          repeated: false
          help_text: |-
            Operating system version of the image.
        - arg_name: properties-db-server-ocids
          api_field: cloudVmCluster.properties.dbServerOcids
          required: false
          repeated: true
          help_text: |-
            OCID of database servers.
        - arg_name: properties-cluster-name
          api_field: cloudVmCluster.properties.clusterName
          required: false
          repeated: false
          help_text: |-
            OCI Cluster name.
    - arg_name: labels
      api_field: cloudVmCluster.labels
      required: false
      repeated: true
      help_text: |-
        Labels or tags associated with the VM Cluster.
      spec:
      - api_field: key
      - api_field: value
    - arg_name: cidr
      api_field: cloudVmCluster.cidr
      required: false
      repeated: false
      help_text: |-
        Network settings. CIDR to use for cluster IP allocation.
    - arg_name: backup-subnet-cidr
      api_field: cloudVmCluster.backupSubnetCidr
      required: false
      repeated: false
      help_text: |-
        CIDR range of the backup subnet.
    - arg_name: network
      help_text: |-
        The name of the VPC network.
        Format: projects/{project}/global/networks/{network}
      is_positional: false
      is_primary_resource: false
      resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1alpha_resources:projects_none_networks
      resource_method_params:
        cloudVmCluster.network: '{__relative_name__}'
      required: false
    - arg_name: odb-network
      help_text: |-
        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.
      is_positional: false
      is_primary_resource: false
      resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1alpha_resources:projects_locations_odb_networks
      resource_method_params:
        cloudVmCluster.odbNetwork: '{__relative_name__}'
      required: false
    - arg_name: odb-subnet
      help_text: |-
        The name of the OdbSubnet associated with the VM Cluster for
        IP allocation. Format:
        projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
      is_positional: false
      is_primary_resource: false
      resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1alpha_resources:projects_locations_odb_networks_odb_subnets
      resource_method_params:
        cloudVmCluster.odbSubnet: '{__relative_name__}'
      required: false
    - arg_name: backup-odb-subnet
      help_text: |-
        The name of the backup OdbSubnet associated with the VM Cluster.
        Format:
        projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
      is_positional: false
      is_primary_resource: false
      resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1alpha_resources:projects_locations_odb_networks_odb_subnets
      resource_method_params:
        cloudVmCluster.backupOdbSubnet: '{__relative_name__}'
      required: false
    - arg_name: request-id
      api_field: requestId
      required: false
      repeated: false
      help_text: |-
        An optional ID to identify the request. This value is used to identify
        duplicate requests. If you make a request with the same request ID
        and the original request is still in progress or completed, the server
        ignores the second request. This prevents clients from
        accidentally creating duplicate commitments.

        The request ID must be a valid UUID with the exception that zero UUID is
        not supported (00000000-0000-0000-0000-000000000000).
  request:
    api_version: v1alpha
    collection:
    - oracledatabase.projects.locations.cloudVmClusters
  async:
    collection:
    - oracledatabase.projects.locations.operations
