# Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client (v1.12.1)

1.12.1 (latest) 1.12.0 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.26.0 0.25.0 0.24.2 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.1 0.14.0 0.13.0 0.12.0 0.11.0 0.10.2 0.9.0 0.8.1 0.7.1 0.6.0 0.5.0 0.4.0 Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.

REST client for the EntityTypes service.


<br />

Service for managing [EntityTypes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType "Google::Cloud::Dialogflow::CX::V3::EntityType (class)").

## Inherits

- Object

## Includes

- [Google::Cloud::Dialogflow::CX::V3::EntityTypes::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the EntityTypes Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Client-Configuration "Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all EntityTypes clients
::Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the EntityTypes Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Client#Google__Cloud__Dialogflow__CX__V3__EntityTypes__Rest__Client_configure_class_ "Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Client-Configuration "Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Client-Configuration))

### #create_entity_type

    def create_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType
    def create_entity_type(parent: nil, entity_type: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType

Creates an entity type in the specified agent.


<br />

Note: You should always train a flow prior to sending it queries. See the
[training
documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
**Overloads**

    def create_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType

Pass arguments to `create_entity_type` via a request object, either of type [CreateEntityTypeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-CreateEntityTypeRequest "Google::Cloud::Dialogflow::CX::V3::CreateEntityTypeRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::CreateEntityTypeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-CreateEntityTypeRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def create_entity_type(parent: nil, entity_type: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType

Pass arguments to `create_entity_type` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The agent to create a entity type for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
- **entity_type** ([::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType), ::Hash) --- Required. The entity type to create.
- **language_code** (::String) --- The language of the following fields in `entity_type`:


  - `EntityType.entities.value`
  - `EntityType.entities.synonyms`
  - `EntityType.excluded_phrases.value`

  If not specified, the agent's default language is used.
  [Many
  languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  are supported.
  Note: languages must be enabled in the agent before they can be used.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::CreateEntityTypeRequest.new

# Call the create_entity_type method.
result = client.create_entity_type request

# The returned object is of type Google::Cloud::Dialogflow::CX::V3::EntityType.
p result
```

### #delete_entity_type

    def delete_entity_type(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_entity_type(name: nil, force: nil) -> ::Google::Protobuf::Empty

Deletes the specified entity type.


<br />

Note: You should always train a flow prior to sending it queries. See the
[training
documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
**Overloads**

    def delete_entity_type(request, options = nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_entity_type` via a request object, either of type [DeleteEntityTypeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DeleteEntityTypeRequest "Google::Cloud::Dialogflow::CX::V3::DeleteEntityTypeRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::DeleteEntityTypeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-DeleteEntityTypeRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def delete_entity_type(name: nil, force: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_entity_type` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The name of the entity type to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/entityTypes/<EntityTypeID>`.
- **force** (::Boolean) ---

  This field has no effect for entity type not being used.
  For entity types that are used by intents or pages:
  - If `force` is set to false, an error will be returned with message indicating the referencing resources.
  - If `force` is set to true, Dialogflow will remove the entity type, as well as any references to the entity type (i.e. Page [parameter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Form-Parameter "Google::Cloud::Dialogflow::CX::V3::Form::Parameter (class)") of the entity type will be changed to '@sys.any' and intent [parameter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-Intent-Parameter "Google::Cloud::Dialogflow::CX::V3::Intent::Parameter (class)") of the entity type will be removed).
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Protobuf-Empty))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::DeleteEntityTypeRequest.new

# Call the delete_entity_type method.
result = client.delete_entity_type request

# The returned object is of type Google::Protobuf::Empty.
p result
```

### #export_entity_types

    def export_entity_types(request, options = nil) -> ::Gapic::Operation
    def export_entity_types(parent: nil, entity_types: nil, entity_types_uri: nil, entity_types_content_inline: nil, data_format: nil, language_code: nil) -> ::Gapic::Operation

Exports the selected entity types.
**Overloads**

    def export_entity_types(request, options = nil) -> ::Gapic::Operation

Pass arguments to `export_entity_types` via a request object, either of type [Google::Cloud::Dialogflow::CX::V3::ExportEntityTypesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ExportEntityTypesRequest "Google::Cloud::Dialogflow::CX::V3::ExportEntityTypesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::ExportEntityTypesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ExportEntityTypesRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def export_entity_types(parent: nil, entity_types: nil, entity_types_uri: nil, entity_types_content_inline: nil, data_format: nil, language_code: nil) -> ::Gapic::Operation

Pass arguments to `export_entity_types` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The name of the parent agent to export entity types. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
- **entity_types** (::Array\<::String\>) --- Required. The name of the entity types to export. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/entityTypes/<EntityTypeID>`.
- **entity_types_uri** (::String) --- Optional. The [Google Cloud
  Storage](https://cloud.google.com/storage/docs/) URI to export the entity types to. The format of this URI must be `gs://<bucket-name>/<object-name>`.


  Dialogflow performs a write operation for the Cloud Storage object
  on the caller's behalf, so your request authentication must
  have write permissions for the object. For more information, see
  [Dialogflow access
  control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).

  Note: The following parameters are mutually exclusive: `entity_types_uri`, `entity_types_content_inline`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **entity_types_content_inline** (::Boolean) --- Optional. The option to return the serialized entity types inline.


  Note: The following parameters are mutually exclusive: `entity_types_content_inline`, `entity_types_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **data_format** ([::Google::Cloud::Dialogflow::CX::V3::ExportEntityTypesRequest::DataFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ExportEntityTypesRequest-DataFormat)) --- Optional. The data format of the exported entity types. If not specified, `BLOB` is assumed.
- **language_code** (::String) --- Optional. The language to retrieve the entity type for. The following fields are language dependent:


  - `EntityType.entities.value`
  - `EntityType.entities.synonyms`
  - `EntityType.excluded_phrases.value`

  If not specified, all language dependent fields will be retrieved.
  [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.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Operation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::ExportEntityTypesRequest.new

# Call the export_entity_types method.
result = client.export_entity_types request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #get_entity_type

    def get_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType
    def get_entity_type(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType

Retrieves the specified entity type.
**Overloads**

    def get_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType

Pass arguments to `get_entity_type` via a request object, either of type [GetEntityTypeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-GetEntityTypeRequest "Google::Cloud::Dialogflow::CX::V3::GetEntityTypeRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::GetEntityTypeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-GetEntityTypeRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def get_entity_type(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType

Pass arguments to `get_entity_type` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The name of the entity type. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/entityTypes/<EntityTypeID>`.
- **language_code** (::String) --- The language to retrieve the entity type for. The following fields are language dependent:


  - `EntityType.entities.value`
  - `EntityType.entities.synonyms`
  - `EntityType.excluded_phrases.value`

  If not specified, the agent's default language is used.
  [Many
  languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  are supported.
  Note: languages must be enabled in the agent before they can be used.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::GetEntityTypeRequest.new

# Call the get_entity_type method.
result = client.get_entity_type request

# The returned object is of type Google::Cloud::Dialogflow::CX::V3::EntityType.
p result
```

### #import_entity_types

    def import_entity_types(request, options = nil) -> ::Gapic::Operation
    def import_entity_types(parent: nil, entity_types_uri: nil, entity_types_content: nil, merge_option: nil, target_entity_type: nil) -> ::Gapic::Operation

Imports the specified entitytypes into the agent.
**Overloads**

    def import_entity_types(request, options = nil) -> ::Gapic::Operation

Pass arguments to `import_entity_types` via a request object, either of type [ImportEntityTypesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ImportEntityTypesRequest "Google::Cloud::Dialogflow::CX::V3::ImportEntityTypesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::ImportEntityTypesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ImportEntityTypesRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def import_entity_types(parent: nil, entity_types_uri: nil, entity_types_content: nil, merge_option: nil, target_entity_type: nil) -> ::Gapic::Operation

Pass arguments to `import_entity_types` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The agent to import the entity types into. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
- **entity_types_uri** (::String) --- The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to import entity types from. The format of this URI must be `gs://<bucket-name>/<object-name>`.


  Dialogflow performs a read operation for the Cloud Storage object
  on the caller's behalf, so your request authentication must
  have read permissions for the object. For more information, see
  [Dialogflow access
  control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).

  Note: The following parameters are mutually exclusive: `entity_types_uri`, `entity_types_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **entity_types_content** ([::Google::Cloud::Dialogflow::CX::V3::InlineSource](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-InlineSource), ::Hash) --- Uncompressed byte content of entity types.


  Note: The following parameters are mutually exclusive: `entity_types_content`, `entity_types_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
- **merge_option** ([::Google::Cloud::Dialogflow::CX::V3::ImportEntityTypesRequest::MergeOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ImportEntityTypesRequest-MergeOption)) --- Required. Merge option for importing entity types.
- **target_entity_type** (::String) --- Optional. The target entity type to import into. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/entity_types/<EntityTypeID>`. If set, there should be only one entity type included in \[entity_types\]\[google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types\], of which the type should match the type of the target entity type. All [entities](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType#Google__Cloud__Dialogflow__CX__V3__EntityType_entities_instance_ "Google::Cloud::Dialogflow::CX::V3::EntityType#entities (method)") in the imported entity type will be added to the target entity type.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Operation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::ImportEntityTypesRequest.new

# Call the import_entity_types method.
result = client.import_entity_types request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #initialize

    def initialize() { |config| ... } -> Client

Create a new EntityTypes REST client object.
**Yields**

- (config) --- Configure the EntityTypes client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_entity_types

    def list_entity_types(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::EntityType>
    def list_entity_types(parent: nil, language_code: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::EntityType>

Returns the list of all entity types in the specified agent.
**Overloads**

    def list_entity_types(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::EntityType>

Pass arguments to `list_entity_types` via a request object, either of type [ListEntityTypesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ListEntityTypesRequest "Google::Cloud::Dialogflow::CX::V3::ListEntityTypesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::ListEntityTypesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-ListEntityTypesRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def list_entity_types(parent: nil, language_code: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::EntityType>

Pass arguments to `list_entity_types` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The agent to list all entity types for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
- **language_code** (::String) --- The language to list entity types for. The following fields are language dependent:


  - `EntityType.entities.value`
  - `EntityType.entities.synonyms`
  - `EntityType.excluded_phrases.value`

  If not specified, the agent's default language is used.
  [Many
  languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  are supported.
  Note: languages must be enabled in the agent before they can be used.
- **page_size** (::Integer) --- The maximum number of items to return in a single page. By default 100 and at most 1000.
- **page_token** (::String) --- The next_page_token value returned from a previous list request.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::ListEntityTypesRequest.new

# Call the list_entity_types method.
result = client.list_entity_types request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::EntityType.
  p item
end
```

### #location_client

    def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.
**Returns**

- (Google::Cloud::Location::Locations::Rest::Client)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #operations_client

    def operations_client() -> ::Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityTypes-Rest-Operations))

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_entity_type

    def update_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType
    def update_entity_type(entity_type: nil, language_code: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType

Updates the specified entity type.


<br />

Note: You should always train a flow prior to sending it queries. See the
[training
documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
**Overloads**

    def update_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType

Pass arguments to `update_entity_type` via a request object, either of type [UpdateEntityTypeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-UpdateEntityTypeRequest "Google::Cloud::Dialogflow::CX::V3::UpdateEntityTypeRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Dialogflow::CX::V3::UpdateEntityTypeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-UpdateEntityTypeRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def update_entity_type(entity_type: nil, language_code: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::EntityType

Pass arguments to `update_entity_type` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **entity_type** ([::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType), ::Hash) --- Required. The entity type to update.
- **language_code** (::String) --- The language of the following fields in `entity_type`:


  - `EntityType.entities.value`
  - `EntityType.entities.synonyms`
  - `EntityType.excluded_phrases.value`

  If not specified, the agent's default language is used.
  [Many
  languages](https://cloud.google.com/dialogflow/cx/docs/reference/language)
  are supported.
  Note: languages must be enabled in the agent before they can be used.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Protobuf-FieldMask), ::Hash) --- The mask to control which fields get updated.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Dialogflow::CX::V3::EntityType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-cx-v3/latest/Google-Cloud-Dialogflow-CX-V3-EntityType))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/dialogflow/cx/v3"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::CX::V3::EntityTypes::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::CX::V3::UpdateEntityTypeRequest.new

# Call the update_entity_type method.
result = client.update_entity_type request

# The returned object is of type Google::Cloud::Dialogflow::CX::V3::EntityType.
p result
```