release_tracks: [ALPHA, BETA, GA]
help_text:
  brief: |
    Import TrustConfig.
  description: |
    Import a TrustConfig.
  examples: |
      To import a TrustConfig from a YAML file, run:

        $ {command} my-trust-config --source=my-trust-config.yaml --location=global

request:
  collection: certificatemanager.projects.locations.trustConfigs
  api_version: v1

arguments:
  resource:
    spec: !REF googlecloudsdk.command_lib.certificate_manager.resources:trustConfig
    help_text: |
      Name of the TrustConfig to import.
  params:
  - arg_name: update-mask
    api_field: updateMask
    help_text: |
      Update mask used to specify fields to be overwritten in the TrustConfig by import.
      TrustConfig must already exist. Fields specified in the update-mask are relative to the
      TrustConfig. The flag can be a comma-separated list of updatable non-nested fields,
      e.g. description or trust_stores. Valid example: --update-mask=description,trust_stores.

async:
  collection: certificatemanager.projects.locations.operations

import:
  abort_if_equivalent: true
  create_if_not_exists: true
  create_request:
    collection: certificatemanager.projects.locations.trustConfigs
    ALPHA:
      api_version: v1
    method: create
