# Copyright 2019 Google LLC # # 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 # # https://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. module Google module Cloud module Dialogflow module V2 # Represents an entity type. # Entity types serve as a tool for extracting parameter values from natural # language queries. # @!attribute [rw] name # @return [String] # The unique identifier of the entity type. # Required for {Google::Cloud::Dialogflow::V2::EntityTypes::UpdateEntityType EntityTypes::UpdateEntityType} and # {Google::Cloud::Dialogflow::V2::EntityTypes::BatchUpdateEntityTypes EntityTypes::BatchUpdateEntityTypes} methods. # Format: `projects//agent/entityTypes/`. # @!attribute [rw] display_name # @return [String] # Required. The name of the entity type. # @!attribute [rw] kind # @return [Google::Cloud::Dialogflow::V2::EntityType::Kind] # Required. Indicates the kind of entity type. # @!attribute [rw] auto_expansion_mode # @return [Google::Cloud::Dialogflow::V2::EntityType::AutoExpansionMode] # Optional. Indicates whether the entity type can be automatically # expanded. # @!attribute [rw] entities # @return [Array] # Optional. The collection of entity entries associated with the entity type. class EntityType # An **entity entry** for an associated entity type. # @!attribute [rw] value # @return [String] # Required. The primary value associated with this entity entry. # For example, if the entity type is *vegetable*, the value could be # *scallions*. # # For `KIND_MAP` entity types: # # * A canonical value to be used in place of synonyms. # # For `KIND_LIST` entity types: # # * A string that can contain references to other entity types (with or # without aliases). # @!attribute [rw] synonyms # @return [Array] # Required. A collection of value synonyms. For example, if the entity type # is *vegetable*, and `value` is *scallions*, a synonym could be *green # onions*. # # For `KIND_LIST` entity types: # # * This collection must contain exactly one synonym equal to `value`. class Entity; end # Represents different entity type expansion modes. Automated expansion # allows an agent to recognize values that have not been explicitly listed in # the entity (for example, new kinds of shopping list items). module AutoExpansionMode # Auto expansion disabled for the entity. AUTO_EXPANSION_MODE_UNSPECIFIED = 0 # Allows an agent to recognize values that have not been explicitly # listed in the entity. AUTO_EXPANSION_MODE_DEFAULT = 1 end # Represents kinds of entities. module Kind # Not specified. This value should be never used. KIND_UNSPECIFIED = 0 # Map entity types allow mapping of a group of synonyms to a canonical # value. KIND_MAP = 1 # List entity types contain a set of entries that do not map to canonical # values. However, list entity types can contain references to other entity # types (with or without aliases). KIND_LIST = 2 end end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::ListEntityTypes EntityTypes::ListEntityTypes}. # @!attribute [rw] parent # @return [String] # Required. The agent to list all entity types from. # Format: `projects//agent`. # @!attribute [rw] language_code # @return [String] # Optional. The language to list entity synonyms for. If not specified, # the agent's default language is used. # [Many # languages](https://cloud.google.com/dialogflow/docs/reference/language) # are supported. Note: languages must be enabled in the agent before they can # be used. # @!attribute [rw] page_size # @return [Integer] # Optional. The maximum number of items to return in a single page. By # default 100 and at most 1000. # @!attribute [rw] page_token # @return [String] # Optional. The next_page_token value returned from a previous list request. class ListEntityTypesRequest; end # The response message for {Google::Cloud::Dialogflow::V2::EntityTypes::ListEntityTypes EntityTypes::ListEntityTypes}. # @!attribute [rw] entity_types # @return [Array] # The list of agent entity types. There will be a maximum number of items # returned based on the page_size field in the request. # @!attribute [rw] next_page_token # @return [String] # Token to retrieve the next page of results, or empty if there are no # more results in the list. class ListEntityTypesResponse; end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::GetEntityType EntityTypes::GetEntityType}. # @!attribute [rw] name # @return [String] # Required. The name of the entity type. # Format: `projects//agent/entityTypes/`. # @!attribute [rw] language_code # @return [String] # Optional. The language to retrieve entity synonyms for. If not specified, # the agent's default language is used. # [Many # languages](https://cloud.google.com/dialogflow/docs/reference/language) # are supported. Note: languages must be enabled in the agent before they can # be used. class GetEntityTypeRequest; end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::CreateEntityType EntityTypes::CreateEntityType}. # @!attribute [rw] parent # @return [String] # Required. The agent to create a entity type for. # Format: `projects//agent`. # @!attribute [rw] entity_type # @return [Google::Cloud::Dialogflow::V2::EntityType] # Required. The entity type to create. # @!attribute [rw] language_code # @return [String] # Optional. The language of entity synonyms defined in `entity_type`. If not # specified, the agent's default language is used. # [Many # languages](https://cloud.google.com/dialogflow/docs/reference/language) # are supported. Note: languages must be enabled in the agent before they can # be used. class CreateEntityTypeRequest; end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::UpdateEntityType EntityTypes::UpdateEntityType}. # @!attribute [rw] entity_type # @return [Google::Cloud::Dialogflow::V2::EntityType] # Required. The entity type to update. # @!attribute [rw] language_code # @return [String] # Optional. The language of entity synonyms defined in `entity_type`. If not # specified, the agent's default language is used. # [Many # languages](https://cloud.google.com/dialogflow/docs/reference/language) # are supported. Note: languages must be enabled in the agent before they can # be used. # @!attribute [rw] update_mask # @return [Google::Protobuf::FieldMask] # Optional. The mask to control which fields get updated. class UpdateEntityTypeRequest; end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::DeleteEntityType EntityTypes::DeleteEntityType}. # @!attribute [rw] name # @return [String] # Required. The name of the entity type to delete. # Format: `projects//agent/entityTypes/`. class DeleteEntityTypeRequest; end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchUpdateEntityTypes EntityTypes::BatchUpdateEntityTypes}. # @!attribute [rw] parent # @return [String] # Required. The name of the agent to update or create entity types in. # Format: `projects//agent`. # @!attribute [rw] entity_type_batch_uri # @return [String] # The URI to a Google Cloud Storage file containing entity types to update # or create. The file format can either be a serialized proto (of # EntityBatch type) or a JSON object. Note: The URI must start with # "gs://". # @!attribute [rw] entity_type_batch_inline # @return [Google::Cloud::Dialogflow::V2::EntityTypeBatch] # The collection of entity types to update or create. # @!attribute [rw] language_code # @return [String] # Optional. The language of entity synonyms defined in `entity_types`. If not # specified, the agent's default language is used. # [Many # languages](https://cloud.google.com/dialogflow/docs/reference/language) # are supported. Note: languages must be enabled in the agent before they can # be used. # @!attribute [rw] update_mask # @return [Google::Protobuf::FieldMask] # Optional. The mask to control which fields get updated. class BatchUpdateEntityTypesRequest; end # The response message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchUpdateEntityTypes EntityTypes::BatchUpdateEntityTypes}. # @!attribute [rw] entity_types # @return [Array] # The collection of updated or created entity types. class BatchUpdateEntityTypesResponse; end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchDeleteEntityTypes EntityTypes::BatchDeleteEntityTypes}. # @!attribute [rw] parent # @return [String] # Required. The name of the agent to delete all entities types for. Format: # `projects//agent`. # @!attribute [rw] entity_type_names # @return [Array] # Required. The names entity types to delete. All names must point to the # same agent as `parent`. class BatchDeleteEntityTypesRequest; end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchCreateEntities EntityTypes::BatchCreateEntities}. # @!attribute [rw] parent # @return [String] # Required. The name of the entity type to create entities in. Format: # `projects//agent/entityTypes/`. # @!attribute [rw] entities # @return [Array] # Required. The entities to create. # @!attribute [rw] language_code # @return [String] # Optional. The language of entity synonyms defined in `entities`. If not # specified, the agent's default language is used. # [Many # languages](https://cloud.google.com/dialogflow/docs/reference/language) # are supported. Note: languages must be enabled in the agent before they can # be used. class BatchCreateEntitiesRequest; end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchUpdateEntities EntityTypes::BatchUpdateEntities}. # @!attribute [rw] parent # @return [String] # Required. The name of the entity type to update or create entities in. # Format: `projects//agent/entityTypes/`. # @!attribute [rw] entities # @return [Array] # Required. The entities to update or create. # @!attribute [rw] language_code # @return [String] # Optional. The language of entity synonyms defined in `entities`. If not # specified, the agent's default language is used. # [Many # languages](https://cloud.google.com/dialogflow/docs/reference/language) # are supported. Note: languages must be enabled in the agent before they can # be used. # @!attribute [rw] update_mask # @return [Google::Protobuf::FieldMask] # Optional. The mask to control which fields get updated. class BatchUpdateEntitiesRequest; end # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchDeleteEntities EntityTypes::BatchDeleteEntities}. # @!attribute [rw] parent # @return [String] # Required. The name of the entity type to delete entries for. Format: # `projects//agent/entityTypes/`. # @!attribute [rw] entity_values # @return [Array] # Required. The canonical `values` of the entities to delete. Note that # these are not fully-qualified names, i.e. they don't start with # `projects/`. # @!attribute [rw] language_code # @return [String] # Optional. The language of entity synonyms defined in `entities`. If not # specified, the agent's default language is used. # [Many # languages](https://cloud.google.com/dialogflow/docs/reference/language) # are supported. Note: languages must be enabled in the agent before they can # be used. class BatchDeleteEntitiesRequest; end # This message is a wrapper around a collection of entity types. # @!attribute [rw] entity_types # @return [Array] # A collection of entity types. class EntityTypeBatch; end end end end end