# -*- 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: Update a space
    description: Update a space.
    examples: |-
      To update the display name to `My New Space Name` in the space `my-space` in project `my-project` and location `us-central1`, run:

        $ {command} my-space --project=my-project --location=us-central1 --display-name="My New Space Name"

      Or run:

        $ {command} projects/my-project/locations/us-central1/spaces/my-space --display-name="My New Space Name"

      To disable google templates in the space `my-space` in project `my-project` and location `us-central1` , run:

        $ {command} my-space --project=my-project --location=us-central1 --no-enable-gcp-shared-templates

      To update the display name, description, and enable google templates in the space `my-space` in project `my-project` and location `us-central1`, run:

        $ {command} my-space --project=my-project --location=us-central1 --display-name="My Updated Space" --description="Updated description" --enable-gcp-shared-templates
  arguments:
    params:
    - group:
        mutex: true
        help_text: |-
          Arguments for the  enable gcp shared templates.
        params:
        - arg_name: enable-gcp-shared-templates
          api_field: space.enableGcpSharedTemplates
          action: store_true_false
          required: false
          type: bool
          help_text: |-
            Flag to enable Google opinionated shared templates.
    - help_text: |-
        Identifier. The space name.
      is_positional: true
      is_primary_resource: true
      resource_spec: !REF googlecloudsdk.command_lib.design_center.v1alpha_resources:projects_locations_spaces
      required: true
    - arg_name: display-name
      api_field: space.displayName
      required: false
      repeated: false
      help_text: |-
        Display name for the space.
    - arg_name: description
      api_field: space.description
      required: false
      repeated: false
      help_text: |-
        Description for the space.
    - arg_name: gcs-bucket
      api_field: space.gcsBucket
      required: false
      repeated: false
      help_text: |-
        An existing Google Cloud Storage bucket that you want to use instead of
        creating a new bucket during ADC setup.
        If not provided, a default bucket is created during setup.
        The bucket must exist in the same project as the space.
        If the bucket name does not exist in the same project as the space, the
        request fails with an INVALID_ARGUMENT error.
        If you do not have access to the bucket, the request fails with a
        PERMISSION_DENIED error.
        Format: {$bucket_name}
        For example, if the Cloud Storage bucket URI is gs:\/\/{$bucket_name}, the
        format is {$bucket_name}.
  request:
    api_version: v1alpha
    collection:
    - designcenter.projects.locations.spaces
  update:
    read_modify_update: true
