- release_tracks: [GA]
  help_text:
    brief: Replace a Google Workspace Add-ons deployment
    description: Replace a Google Workspace Add-ons deployment
    examples: |
      To replace an deployment called `my-deployment` with the deployment file, run:

        $ {command} my-deployment --deployment-file=my-deployment.json

      To replace an deployment called `my-deployment` with the deployment object, run:

        $ {command} my-deployment --deployment-object=my-deployment-string
  request:
    collection: gsuiteaddons.projects.deployments
    api_version: v1
    method: replaceDeployment
    modify_request_hooks:
    - googlecloudsdk.command_lib.workspace_add_ons.util:HandleEscapingInNamePath
  arguments:
    resource:
      help_text: Google Workspace Add-ons deployment to replace
      spec: !REF googlecloudsdk.command_lib.workspace_add_ons.resources:deployment
    params:
    - api_field: googleCloudGsuiteaddonsV1Deployment.etag
      arg_name: etag
      help_text: etag of the deployment file
      type: str
    - group:
        mutex: true
        required: true
        params:
        - api_field: googleCloudGsuiteaddonsV1Deployment
          arg_name: deployment-object
          help_text: json string of the deploymentObject
          processor: googlecloudsdk.command_lib.workspace_add_ons.util:LoadJsonString
        - api_field: googleCloudGsuiteaddonsV1Deployment
          arg_name: deployment-file
          help_text: path to the deployment file
          processor: googlecloudsdk.command_lib.workspace_add_ons.util:ParseJsonFileToDeployment
  output:
    format: json
