Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::Client (v0.7.1)

Reference documentation and code samples for the Dialogflow CX V3 API class Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::Client.

Client for the SessionEntityTypes service.

Service for managing SessionEntityTypes.

Inherits

  • Object

Methods

.configure

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

Configure the SessionEntityTypes Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all SessionEntityTypes clients
::Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the SessionEntityTypes 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.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_session_entity_type

def create_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType
def create_session_entity_type(parent: nil, session_entity_type: nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType

Creates a session entity type.

Overloads
def create_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType
Pass arguments to create_session_entity_type via a request object, either of type CreateSessionEntityTypeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::CreateSessionEntityTypeRequest, ::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_session_entity_type(parent: nil, session_entity_type: nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType
Pass arguments to create_session_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 session to create a session entity type for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>. If Environment ID is not specified, we assume default 'draft' environment.
  • session_entity_type (::Google::Cloud::Dialogflow::CX::V3::SessionEntityType, ::Hash) — Required. The session entity type to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

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

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

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

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

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

#delete_session_entity_type

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

Deletes the specified session entity type.

Overloads
def delete_session_entity_type(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_session_entity_type via a request object, either of type DeleteSessionEntityTypeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::DeleteSessionEntityTypeRequest, ::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_session_entity_type(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_session_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).
Parameter
  • name (::String) — Required. The name of the session entity type to delete. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID>/entityTypes/<Entity Type ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>. If Environment ID is not specified, we assume default 'draft' environment.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

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

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

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

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

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

#get_session_entity_type

def get_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType
def get_session_entity_type(name: nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType

Retrieves the specified session entity type.

Overloads
def get_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType
Pass arguments to get_session_entity_type via a request object, either of type GetSessionEntityTypeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::GetSessionEntityTypeRequest, ::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_session_entity_type(name: nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType
Pass arguments to get_session_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).
Parameter
  • name (::String) — Required. The name of the session entity type. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID>/entityTypes/<Entity Type ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>. If Environment ID is not specified, we assume default 'draft' environment.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

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

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

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

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

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

#initialize

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

Create a new SessionEntityTypes client object.

Yields
  • (config) — Configure the SessionEntityTypes client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::Client.new

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

#list_session_entity_types

def list_session_entity_types(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::SessionEntityType>
def list_session_entity_types(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::SessionEntityType>

Returns the list of all session entity types in the specified session.

Overloads
def list_session_entity_types(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::SessionEntityType>
Pass arguments to list_session_entity_types via a request object, either of type ListSessionEntityTypesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::ListSessionEntityTypesRequest, ::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_session_entity_types(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::SessionEntityType>
Pass arguments to list_session_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 session to list all session entity types from. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>. If Environment ID is not specified, we assume default 'draft' environment.
  • 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
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

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

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType.
  p response
end

#update_session_entity_type

def update_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType
def update_session_entity_type(session_entity_type: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType

Updates the specified session entity type.

Overloads
def update_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType
Pass arguments to update_session_entity_type via a request object, either of type UpdateSessionEntityTypeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::UpdateSessionEntityTypeRequest, ::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_session_entity_type(session_entity_type: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType
Pass arguments to update_session_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
  • session_entity_type (::Google::Cloud::Dialogflow::CX::V3::SessionEntityType, ::Hash) — Required. The session entity type to update. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/sessions/<Session ID>/entityTypes/<Entity Type ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>. If Environment ID is not specified, we assume default 'draft' environment.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — The mask to control which fields get updated.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

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

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

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

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

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