- release_tracks: [ALPHA]
  help_text:
    brief: Update a Cloud Media Asset complex type.
    description: Update a Media Asset complex type.
    examples: |
      To update an asset type with id my-ct, run:

        $ {command} my-ct --complex-type-config-file complex_type_configs.json --update-mask fields,allowUndefinedFields

      , where complex_type_configs.json content can be:
      {
        "fields": {
          "testField1": {
            "required":true,
            "type":"string"
          }
        },
        "allowUndefinedFields" : true
      }

  request:
    collection: mediaasset.projects.locations.complexTypes
    method: patch
    modify_request_hooks:
    - googlecloudsdk.command_lib.media.asset.complex_types.hooks:ParseComplexTypeConfigFile
    ALPHA:
      api_version: v1alpha

  arguments:
    resource:
      help_text: The Cloud Media Asset asset type to create.
      spec: !REF googlecloudsdk.command_lib.media.asset.resources:complex_type

    params:
    - _REF_: googlecloudsdk.command_lib.media.asset.flags:complex-type-config-file
    - arg_name: update-mask
      api_field: updateMask
      required: true
      help_text: |
        List of complex type's attributes to update.
    labels:
      api_field: complexType.labels

  response:
    modify_response_hooks:
    - googlecloudsdk.command_lib.media.asset.complex_types.hooks:ProcessOutput

  update:
    read_modify_update: true
