# -*- 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
  help_text:
    brief: Reschedule maintenance window for an instance.
    description: Reschedule maintenance window for an instance.
    examples: |-
      To reschedule maintenance window for an instance with the name
      `my-instance` in region `us-central-1` with immediate, run:

      $ {command} `my-instance` --project=my-project --location=us-central1
          --reschedule-type=IMMEDIATE
  arguments:
    params:
    - help_text: |-
        Name of the instance to reschedule maintenance for:
        `projects/{project}/locations/{location_id}/instances/{instance}`
      is_positional: true
      is_primary_resource: true
      resource_spec: !REF googlecloudsdk.command_lib.memorystore.v1alpha_resources:projects_locations_instances
      required: true
    - arg_name: reschedule-type
      api_field: rescheduleMaintenanceRequest.rescheduleType
      required: true
      help_text: |-
        If reschedule type is SPECIFIC_TIME, schedule_time must be set.
      choices:
      - arg_value: immediate
        enum_value: IMMEDIATE
        help_text: |-
          If the user wants to schedule the maintenance to happen now.
      - arg_value: specific-time
        enum_value: SPECIFIC_TIME
        help_text: |-
          If the user wants to reschedule the maintenance to a specific time.
    - arg_name: schedule-time
      api_field: rescheduleMaintenanceRequest.scheduleTime
      required: false
      repeated: false
      type: googlecloudsdk.core.util.times:ParseDateTime
      processor: googlecloudsdk.core.util.times:FormatDateTime
      help_text: |-
        Timestamp when the maintenance shall be rescheduled to if
        reschedule_type=SPECIFIC_TIME, in RFC 3339 format.
        Example: `2012-11-15T16:19:00.094Z`.
  request:
    api_version: v1alpha
    collection:
    - memorystore.projects.locations.instances
    method: rescheduleMaintenance
  async:
    collection:
    - memorystore.projects.locations.operations
  command_type: GENERIC
