# -*- 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:
  - BETA
  auto_generated: true
  help_text:
    brief: Update PolicyBinding instance.
    description: |
      Update PolicyBinding instance.
    examples: |-
      To update display name of `my-binding` in organization `123` run:

      $ {command} my-binding --organization=123 --location=global --display-name=new-display-name
  arguments:
    params:
    - help_text: |-
        Identifier. The name of the policy binding, in the format
        `{binding_parent/locations/{location}/policyBindings/{policy_binding_id}`.
        The binding parent is the closest Resource Manager resource (project,
        folder, or organization) to the binding target.

        Format:

        * `projects/{project_id}/locations/{location}/policyBindings/{policy_binding_id}`
        * `projects/{project_number}/locations/{location}/policyBindings/{policy_binding_id}`
        * `folders/{folder_id}/locations/{location}/policyBindings/{policy_binding_id}`
        * `organizations/{organization_id}/locations/{location}/policyBindings/{policy_binding_id}`
      is_positional: true
      is_primary_resource: true
      resource_spec: !REF googlecloudsdk.command_lib.iam.v3beta_resources:folders_or_organizations_or_projects_locations_policy_bindings
      required: true
    - arg_name: etag
      api_field: googleIamV3betaPolicyBinding.etag
      required: false
      repeated: false
      help_text: |-
        The etag for the policy binding.
        If this is provided on update, it must match the server's etag.
    - arg_name: display-name
      api_field: googleIamV3betaPolicyBinding.displayName
      required: false
      repeated: false
      help_text: |-
        The description of the policy binding. Must be less than or equal to 63
        characters.
    - arg_name: annotations
      api_field: googleIamV3betaPolicyBinding.annotations
      required: false
      repeated: true
      help_text: |-
        User-defined annotations. See https://google.aip.dev/148#annotations for
        more details such as format and size limitations
      clearable: true
      spec:
      - api_field: key
      - api_field: value
    - group:
        api_field: googleIamV3betaPolicyBinding.condition
        arg_name: condition
        clearable: true
        required: false
        help_text: |-
          Represents a textual expression in the Common Expression Language (CEL)
          syntax. CEL is a C-like expression language. The syntax and semantics of CEL
          are documented at https://github.com/google/cel-spec.

          Example (Comparison):

              title: "Summary size limit"
              description: "Determines if a summary is less than 100 chars"
              expression: "document.summary.size() < 100"

          Example (Equality):

              title: "Requestor is owner"
              description: "Determines if requestor is the document owner"
              expression: "document.owner == request.auth.claims.email"

          Example (Logic):

              title: "Public documents"
              description: "Determine whether the document should be publicly visible"
              expression: "document.type != 'private' && document.type != 'internal'"

          Example (Data Manipulation):

              title: "Notification string"
              description: "Create a notification string with a timestamp."
              expression: "'New message received at ' + string(document.create_time)"

          The exact variables and functions that may be referenced within an expression
          are determined by the service that evaluates it. See the service
          documentation for additional information.
        params:
        - arg_name: condition-expression
          api_field: googleIamV3betaPolicyBinding.condition.expression
          required: false
          repeated: false
          help_text: |-
            Textual representation of an expression in Common Expression Language
            syntax.
        - arg_name: condition-title
          api_field: googleIamV3betaPolicyBinding.condition.title
          required: false
          repeated: false
          help_text: |-
            Title for the expression, i.e. a short string describing
            its purpose. This can be used e.g. in UIs which allow to enter the
            expression.
        - arg_name: condition-description
          api_field: googleIamV3betaPolicyBinding.condition.description
          required: false
          repeated: false
          help_text: |-
            Description of the expression. This is a longer text which
            describes the expression, e.g. when hovered over it in a UI.
        - arg_name: condition-location
          api_field: googleIamV3betaPolicyBinding.condition.location
          required: false
          repeated: false
          help_text: |-
            String indicating the location of the expression for error
            reporting, e.g. a file name and a position in the file.
  request:
    api_version: v3beta
    collection:
    - iam.folders.locations.policyBindings
    - iam.organizations.locations.policyBindings
    - iam.projects.locations.policyBindings
  async:
    collection:
    - iam.folders.locations.operations
    - iam.organizations.locations.operations
    - iam.projects.locations.operations
  update:
    read_modify_update: true
