# -*- 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:
  - GA
  auto_generated: true
  help_text:
    brief: Create a new ExadataInfrastructure.
    description: Creates a new ExadataInfrastructure.
    examples: |-
      Choose an available system shapes in your location by running
      `gcloud oracle-database db-system-shapes list --location=us-east4`.
      To create Exadata Infrastructure instance with id `my-instance` in the location `us-east4`
      with display-name `my instance`, compute count `2` and choosen shape "Exadata.FOO", run:

      $ {command} my-instance --location=us-east4 --display-name="my instance" \
       --properties-shape=Exadata.FOO --properties-compute-count=2 --properties-storage-count=3
  arguments:
    params:
    - help_text: |-
        Identifier. The name of the Exadata Infrastructure resource with the format:
        projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}
      is_positional: true
      is_primary_resource: true
      request_id_field: cloudExadataInfrastructureId
      resource_spec: !REF googlecloudsdk.command_lib.oracle_database.v1_resources:projects_locations_cloud_exadata_infrastructures
      required: true
    - arg_name: display-name
      api_field: cloudExadataInfrastructure.displayName
      required: false
      repeated: false
      help_text: |-
        User friendly name for this resource.
    - arg_name: gcp-oracle-zone
      api_field: cloudExadataInfrastructure.gcpOracleZone
      required: false
      repeated: false
      help_text: |-
        The GCP Oracle zone where Oracle Exadata Infrastructure is hosted.
        Example: us-east4-b-r2.
        If not specified, the system will pick a zone based on availability.
    - group:
        api_field: cloudExadataInfrastructure.properties
        required: false
        help_text: |-
          Various properties of Exadata Infrastructure.
        params:
        - arg_name: properties-compute-count
          api_field: cloudExadataInfrastructure.properties.computeCount
          required: false
          repeated: false
          type: int
          help_text: |-
            The number of compute servers for the Exadata Infrastructure.
        - arg_name: properties-storage-count
          api_field: cloudExadataInfrastructure.properties.storageCount
          required: false
          repeated: false
          type: int
          help_text: |-
            The number of Cloud Exadata storage servers for the Exadata Infrastructure.
        - arg_name: properties-total-storage-size-gb
          api_field: cloudExadataInfrastructure.properties.totalStorageSizeGb
          required: false
          repeated: false
          type: int
          help_text: |-
            The total storage allocated to the Exadata Infrastructure
            resource, in gigabytes (GB).
        - group:
            api_field: cloudExadataInfrastructure.properties.maintenanceWindow
            required: false
            help_text: |-
              Maintenance window as defined by Oracle.
              https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/MaintenanceWindow
            params:
            - arg_name: maintenance-window-preference
              api_field: cloudExadataInfrastructure.properties.maintenanceWindow.preference
              required: false
              help_text: |-
                The maintenance window scheduling preference.
              choices:
              - arg_value: custom-preference
                enum_value: CUSTOM_PREFERENCE
                help_text: |-
                  Custom preference.
              - arg_value: no-preference
                enum_value: NO_PREFERENCE
                help_text: |-
                  No preference.
            - arg_name: maintenance-window-months
              api_field: cloudExadataInfrastructure.properties.maintenanceWindow.months
              required: false
              repeated: true
              help_text: |-
                Months during the year when maintenance should be performed.
              choices:
              - arg_value: january
                enum_value: JANUARY
                help_text: |-
                  The month of January.
              - arg_value: february
                enum_value: FEBRUARY
                help_text: |-
                  The month of February.
              - arg_value: march
                enum_value: MARCH
                help_text: |-
                  The month of March.
              - arg_value: april
                enum_value: APRIL
                help_text: |-
                  The month of April.
              - arg_value: may
                enum_value: MAY
                help_text: |-
                  The month of May.
              - arg_value: june
                enum_value: JUNE
                help_text: |-
                  The month of June.
              - arg_value: july
                enum_value: JULY
                help_text: |-
                  The month of July.
              - arg_value: august
                enum_value: AUGUST
                help_text: |-
                  The month of August.
              - arg_value: september
                enum_value: SEPTEMBER
                help_text: |-
                  The month of September.
              - arg_value: october
                enum_value: OCTOBER
                help_text: |-
                  The month of October.
              - arg_value: november
                enum_value: NOVEMBER
                help_text: |-
                  The month of November.
              - arg_value: december
                enum_value: DECEMBER
                help_text: |-
                  The month of December.
            - arg_name: maintenance-window-weeks-of-month
              api_field: cloudExadataInfrastructure.properties.maintenanceWindow.weeksOfMonth
              required: false
              repeated: true
              type: int
              help_text: |-
                Weeks during the month when maintenance should be performed. Weeks start on
                the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7
                days. Weeks start and end based on calendar dates, not days of the week.
            - arg_name: maintenance-window-days-of-week
              api_field: cloudExadataInfrastructure.properties.maintenanceWindow.daysOfWeek
              required: false
              repeated: true
              help_text: |-
                Days during the week when maintenance should be performed.
              choices:
              - arg_value: monday
                enum_value: MONDAY
                help_text: |-
                  Monday
              - arg_value: tuesday
                enum_value: TUESDAY
                help_text: |-
                  Tuesday
              - arg_value: wednesday
                enum_value: WEDNESDAY
                help_text: |-
                  Wednesday
              - arg_value: thursday
                enum_value: THURSDAY
                help_text: |-
                  Thursday
              - arg_value: friday
                enum_value: FRIDAY
                help_text: |-
                  Friday
              - arg_value: saturday
                enum_value: SATURDAY
                help_text: |-
                  Saturday
              - arg_value: sunday
                enum_value: SUNDAY
                help_text: |-
                  Sunday
            - arg_name: maintenance-window-hours-of-day
              api_field: cloudExadataInfrastructure.properties.maintenanceWindow.hoursOfDay
              required: false
              repeated: true
              type: int
              help_text: |-
                The window of hours during the day when maintenance should be performed.
                The window is a 4 hour slot. Valid values are:
                  0 - represents time slot 0:00 - 3:59 UTC
                  4 - represents time slot 4:00 - 7:59 UTC
                  8 - represents time slot 8:00 - 11:59 UTC
                  12 - represents time slot 12:00 - 15:59 UTC
                  16 - represents time slot 16:00 - 19:59 UTC
                  20 - represents time slot 20:00 - 23:59 UTC
            - arg_name: maintenance-window-lead-time-week
              api_field: cloudExadataInfrastructure.properties.maintenanceWindow.leadTimeWeek
              required: false
              repeated: false
              type: int
              help_text: |-
                Lead time window allows user to set a lead time to prepare for a down time.
                The lead time is in weeks and valid value is between 1 to 4.
            - arg_name: maintenance-window-patching-mode
              api_field: cloudExadataInfrastructure.properties.maintenanceWindow.patchingMode
              required: false
              help_text: |-
                Cloud CloudExadataInfrastructure node patching method, either "ROLLING"
                or "NONROLLING". Default value is ROLLING.
              choices:
              - arg_value: rolling
                enum_value: ROLLING
                help_text: |-
                  Updates the Cloud Exadata database server hosts in a rolling fashion.
              - arg_value: non-rolling
                enum_value: NON_ROLLING
                help_text: |-
                  The non-rolling maintenance method first updates your storage servers at
                  the same time, then your database servers at the same time.
            - arg_name: maintenance-window-custom-action-timeout-mins
              api_field: cloudExadataInfrastructure.properties.maintenanceWindow.customActionTimeoutMins
              required: false
              repeated: false
              type: int
              help_text: |-
                Determines the amount of time the system will wait before the start of each
                database server patching operation. Custom action timeout is in minutes and
                valid value is between 15 to 120 (inclusive).
            - arg_name: maintenance-window-is-custom-action-timeout-enabled
              api_field: cloudExadataInfrastructure.properties.maintenanceWindow.isCustomActionTimeoutEnabled
              action: store_true
              required: false
              type: bool
              help_text: |-
                If true, enables the configuration of a custom action timeout (waiting
                period) between database server patching operations.
              default: null
        - arg_name: properties-shape
          api_field: cloudExadataInfrastructure.properties.shape
          required: true
          repeated: false
          help_text: |-
            The shape of the Exadata Infrastructure. The shape determines the
            amount of CPU, storage, and memory resources allocated to the instance.
        - arg_name: properties-customer-contacts
          api_field: cloudExadataInfrastructure.properties.customerContacts
          required: false
          repeated: true
          help_text: |-
            The list of customer contacts.
          spec:
          - api_field: email
            help_text: |-
              The email address used by Oracle to send notifications regarding databases
              and infrastructure.
    - arg_name: labels
      api_field: cloudExadataInfrastructure.labels
      required: false
      repeated: true
      help_text: |-
        Labels or tags associated with the resource.
      spec:
      - api_field: key
      - api_field: value
    - 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: v1
    collection:
    - oracledatabase.projects.locations.cloudExadataInfrastructures
  async:
    collection:
    - oracledatabase.projects.locations.operations
