release_tracks: [ALPHA]
help_text:
  brief: Create a Dialogflow entity type for the agent of the current project.
  description: Create a Dialogflow entity type for the agent of the current project.
  examples: |
    To create an entity type with a display name and entities:

      $ {command} --display-name="color" --entities=red,blue

arguments:
  resource:
    help_text: The agent to create the entity type under.
    spec: !REF googlecloudsdk.command_lib.dialogflow.resources:agent
    is_parent_resource: true
  params:
  - _COMMON_: flags.display_name
    required: true
  - _COMMON_: flags.auto_expand
  - arg_name: entities
    api_field: googleCloudDialogflowV2EntityType.entities
    repeated: false
    type: googlecloudsdk.command_lib.dialogflow.entity_types.hooks:EntitiesType
    help_text: |
      Comma separated list of entities, or a map of entities to synonyms.

      If a list, the entities can contain references to other entity types (with or without
      aliases).

      To specify a map, set this flag with `--flags-file` as a map, where each key is the
      canonical name and each value is a list of synonyms to map to the canonical name. The
      canonical name must be explicitly included in the list of synonyms. For more information
      on `--flags-file`, see `gcloud topics flags-file`.

      For example, use `--flags-file=flags.yaml`, where `flags.yaml` contains:

      ```
      --entities:
        red:
        - red
        - cherry
        - rose
        blue:
        - blue
        - azure
        - cyan
      ```

      For more information, see
      https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2/Entity.

request:
  collection: dialogflow.projects.agent.entityTypes
  display_resource_type: entity type
  modify_request_hooks:
  - googlecloudsdk.command_lib.dialogflow.entity_types.hooks:AddEntityTypeKind
