# -*- 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: Update autonomousDatabases
    description: Update an autonomousDatabase
    examples: |-
      To update the autonomousDatabase, run:

          $ {command}
  arguments:
    params:
    - help_text: |-
        Identifier. The name of the Autonomous Database resource in the following format:
        projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}
      is_positional: true
      is_primary_resource: true
      resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1alpha_resources:projects_locations_autonomous_databases
      required: true
    - arg_name: database
      api_field: autonomousDatabase.database
      required: false
      repeated: false
      help_text: |-
        The name of the Autonomous Database. The database name must be unique in
        the project. The name must begin with a letter and can
        contain a maximum of 30 alphanumeric characters.
    - arg_name: display-name
      api_field: autonomousDatabase.displayName
      required: false
      repeated: false
      help_text: |-
        The display name for the Autonomous Database. The name does not have to
        be unique within your project.
    - arg_name: admin-password
      api_field: autonomousDatabase.adminPassword
      required: false
      repeated: false
      help_text: |-
        The password for the default ADMIN user.
    - group:
        api_field: autonomousDatabase.properties
        arg_name: properties
        clearable: true
        required: false
        help_text: |-
          The properties of an Autonomous Database.
        params:
        - arg_name: properties-compute-count
          api_field: autonomousDatabase.properties.computeCount
          required: false
          repeated: false
          type: float
          help_text: |-
            The number of compute servers for the Autonomous Database.
        - arg_name: properties-cpu-core-count
          api_field: autonomousDatabase.properties.cpuCoreCount
          required: false
          repeated: false
          type: int
          help_text: |-
            The number of CPU cores to be made available to the database.
        - arg_name: properties-data-storage-size-tb
          api_field: autonomousDatabase.properties.dataStorageSizeTb
          required: false
          repeated: false
          type: int
          help_text: |-
            The size of the data stored in the database, in terabytes.
        - arg_name: properties-data-storage-size-gb
          api_field: autonomousDatabase.properties.dataStorageSizeGb
          required: false
          repeated: false
          type: int
          help_text: |-
            The size of the data stored in the database, in gigabytes.
        - arg_name: properties-db-workload
          api_field: autonomousDatabase.properties.dbWorkload
          required: false
          help_text: |-
            The workload type of the Autonomous Database.
          choices:
          - arg_value: oltp
            enum_value: OLTP
            help_text: |-
              Autonomous Transaction Processing database.
            hidden: true
          - arg_value: dw
            enum_value: DW
            help_text: |-
              Autonomous Data Warehouse database.
            hidden: true
          - arg_value: ajd
            enum_value: AJD
            help_text: |-
              Autonomous JSON Database.
            hidden: true
          - arg_value: apex
            enum_value: APEX
            help_text: |-
              Autonomous Database with the Oracle APEX Application Development workload
              type.
            hidden: true
        - arg_name: properties-db-edition
          api_field: autonomousDatabase.properties.dbEdition
          required: false
          help_text: |-
            The edition of the Autonomous Databases.
          choices:
          - arg_value: standard-edition
            enum_value: STANDARD_EDITION
            help_text: |-
              Standard Database Edition
            hidden: true
          - arg_value: enterprise-edition
            enum_value: ENTERPRISE_EDITION
            help_text: |-
              Enterprise Database Edition
            hidden: true
        - arg_name: properties-character-set
          api_field: autonomousDatabase.properties.characterSet
          required: false
          repeated: false
          help_text: |-
            The character set for the Autonomous Database. The default is AL32UTF8.
        - arg_name: properties-n-character-set
          api_field: autonomousDatabase.properties.nCharacterSet
          required: false
          repeated: false
          help_text: |-
            The national character set for the Autonomous Database. The default is
            AL16UTF16.
        - arg_name: properties-private-endpoint-ip
          api_field: autonomousDatabase.properties.privateEndpointIp
          required: false
          repeated: false
          help_text: |-
            The private endpoint IP address for the Autonomous Database.
        - arg_name: properties-private-endpoint-label
          api_field: autonomousDatabase.properties.privateEndpointLabel
          required: false
          repeated: false
          help_text: |-
            The private endpoint label for the Autonomous Database.
        - arg_name: properties-db-version
          api_field: autonomousDatabase.properties.dbVersion
          required: false
          repeated: false
          help_text: |-
            The Oracle Database version for the Autonomous Database.
        - arg_name: properties-is-auto-scaling-enabled
          api_field: autonomousDatabase.properties.isAutoScalingEnabled
          action: store_true_false
          required: false
          type: bool
          help_text: |-
            This field indicates if auto scaling is enabled for the Autonomous Database
            CPU core count.
        - arg_name: properties-is-storage-auto-scaling-enabled
          api_field: autonomousDatabase.properties.isStorageAutoScalingEnabled
          action: store_true_false
          required: false
          type: bool
          help_text: |-
            This field indicates if auto scaling is enabled for the Autonomous Database
            storage.
        - arg_name: properties-license-type
          api_field: autonomousDatabase.properties.licenseType
          required: false
          help_text: |-
            The license type used for the Autonomous Database.
          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-customer-contacts
          api_field: autonomousDatabase.properties.customerContacts
          required: false
          repeated: true
          help_text: |-
            The list of customer contacts.
          clearable: true
          spec:
          - api_field: email
            help_text: |-
              The email address used by Oracle to send notifications regarding databases
              and infrastructure.
        - arg_name: properties-secret-id
          api_field: autonomousDatabase.properties.secretId
          required: false
          repeated: false
          help_text: |-
            The ID of the Oracle Cloud Infrastructure vault secret.
        - arg_name: properties-vault-id
          api_field: autonomousDatabase.properties.vaultId
          required: false
          repeated: false
          help_text: |-
            The ID of the Oracle Cloud Infrastructure vault.
        - arg_name: properties-maintenance-schedule-type
          api_field: autonomousDatabase.properties.maintenanceScheduleType
          required: false
          help_text: |-
            The maintenance schedule of the Autonomous Database.
          choices:
          - arg_value: early
            enum_value: EARLY
            help_text: |-
              An EARLY maintenance schedule patches the database before
              the regular scheduled maintenance.
            hidden: true
          - arg_value: regular
            enum_value: REGULAR
            help_text: |-
              A REGULAR maintenance schedule follows the normal maintenance cycle.
            hidden: true
        - arg_name: properties-mtls-connection-required
          api_field: autonomousDatabase.properties.mtlsConnectionRequired
          action: store_true_false
          required: false
          type: bool
          help_text: |-
            This field specifies if the Autonomous Database requires mTLS connections.
        - arg_name: properties-backup-retention-period-days
          api_field: autonomousDatabase.properties.backupRetentionPeriodDays
          required: false
          repeated: false
          type: int
          help_text: |-
            The retention period for the Autonomous Database. This field is specified
            in days, can range from 1 day to 60 days, and has a default value of
            60 days.
        - arg_name: properties-allowlisted-ips
          api_field: autonomousDatabase.properties.allowlistedIps
          required: false
          repeated: true
          help_text: |-
            The list of allowlisted IP addresses for the Autonomous Database.
          clearable: true
        - group:
            api_field: autonomousDatabase.properties.encryptionKey
            required: false
            help_text: |-
              The encryption key used to encrypt the Autonomous Database.
            params:
            - arg_name: encryption-key-provider
              api_field: autonomousDatabase.properties.encryptionKey.provider
              required: false
              help_text: |-
                The provider of the encryption key.
              choices:
              - arg_value: google-managed
                enum_value: GOOGLE_MANAGED
                help_text: |-
                  Google Managed KMS key, if selected, please provide the KMS key name.
                hidden: true
              - arg_value: oracle-managed
                enum_value: ORACLE_MANAGED
                help_text: |-
                  Oracle Managed.
                hidden: true
            - arg_name: encryption-key-kms
              api_field: autonomousDatabase.properties.encryptionKey.kmsKey
              required: false
              repeated: false
              help_text: |-
                The KMS key used to encrypt the Autonomous Database.
                This field is required if the provider is GOOGLE_MANAGED.
                The name of the KMS key resource in the following format:
                `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
    - arg_name: labels
      api_field: autonomousDatabase.labels
      required: false
      repeated: true
      help_text: |-
        The labels or tags associated with the Autonomous Database.
      clearable: true
      spec:
      - api_field: key
      - api_field: value
    - arg_name: network
      help_text: |-
        The name of the VPC network used by the Autonomous Database in the
        following 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:
        autonomousDatabase.network: '{__relative_name__}'
      required: false
      clearable: true
    - arg_name: cidr
      api_field: autonomousDatabase.cidr
      required: false
      repeated: false
      help_text: |-
        The subnet CIDR range for the Autonomous Database.
    - arg_name: odb-network
      help_text: |-
        The name of the OdbNetwork associated with the Autonomous Database.
        Format: projects/{project}/locations/{location}/odbNetworks/{odb_network}
        It is optional but if specified, this should match the parent ODBNetwork of
        the OdbSubnet.
      is_positional: false
      is_primary_resource: false
      resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1alpha_resources:projects_locations_odb_networks
      resource_method_params:
        autonomousDatabase.odbNetwork: '{__relative_name__}'
      required: false
      clearable: true
    - arg_name: odb-subnet
      help_text: |-
        The name of the OdbSubnet associated with the Autonomous Database. 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:
        autonomousDatabase.odbSubnet: '{__relative_name__}'
      required: false
      clearable: true
    - group:
        api_field: autonomousDatabase.sourceConfig
        arg_name: source-config
        clearable: true
        required: false
        help_text: |-
          The source configuration for the standby Autonomous Database.
        params:
        - arg_name: source-config-autonomous-database
          help_text: |-
            The name of the primary Autonomous Database that is used to create a Peer
            Autonomous Database from a source.
          is_positional: false
          is_primary_resource: false
          resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1alpha_resources:projects_locations_autonomous_databases
          resource_method_params:
            autonomousDatabase.sourceConfig.autonomousDatabase: '{__relative_name__}'
          required: false
          clearable: true
        - arg_name: source-config-automatic-backups-replication-enabled
          api_field: autonomousDatabase.sourceConfig.automaticBackupsReplicationEnabled
          action: store_true_false
          required: false
          type: bool
          help_text: |-
            This field specifies if the replication of automatic backups is enabled
            when creating a Data Guard.
    - 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.autonomousDatabases
  async:
    collection:
    - oracledatabase.projects.locations.operations
  update:
    read_modify_update: true
