Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all SessionEntityTypes clients ::Google::Cloud::Dialogflow::V2::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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_session_entity_type
def create_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::SessionEntityType
def create_session_entity_type(parent: nil, session_entity_type: nil) -> ::Google::Cloud::Dialogflow::V2::SessionEntityType
Creates a session entity type.
If the specified session entity type already exists, overrides the session entity type.
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
def create_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::SessionEntityType
create_session_entity_type
via a request object, either of type
CreateSessionEntityTypeRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::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::V2::SessionEntityType
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).
-
parent (::String) — Required. The session to create a session entity type for.
Format:
projects/<Project ID>/agent/sessions/<Session ID>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/ sessions/<Session ID>
. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser ID
is not specified, we assume default '-' user. - session_entity_type (::Google::Cloud::Dialogflow::V2::SessionEntityType, ::Hash) — Required. The session entity type to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::V2::SessionEntityType)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::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::V2::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.
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
def delete_session_entity_type(request, options = nil) -> ::Google::Protobuf::Empty
delete_session_entity_type
via a request object, either of type
DeleteSessionEntityTypeRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::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
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).
-
name (::String) — Required. The name of the entity type to delete. Format:
projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser ID
is not specified, we assume default '-' user.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::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::V2::SessionEntityType
def get_session_entity_type(name: nil) -> ::Google::Cloud::Dialogflow::V2::SessionEntityType
Retrieves the specified session entity type.
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
def get_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::SessionEntityType
get_session_entity_type
via a request object, either of type
GetSessionEntityTypeRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::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::V2::SessionEntityType
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).
-
name (::String) — Required. The name of the session entity type. Format:
projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser ID
is not specified, we assume default '-' user.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::V2::SessionEntityType)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::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::V2::SessionEntityType. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new SessionEntityTypes client object.
- (config) — Configure the SessionEntityTypes client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dialogflow::V2::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::V2::SessionEntityType>
def list_session_entity_types(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::SessionEntityType>
Returns the list of all session entity types in the specified session.
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
def list_session_entity_types(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::SessionEntityType>
list_session_entity_types
via a request object, either of type
ListSessionEntityTypesRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::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::V2::SessionEntityType>
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).
-
parent (::String) — Required. The session to list all session entity types from.
Format:
projects/<Project ID>/agent/sessions/<Session ID>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/ sessions/<Session ID>
. IfEnvironment ID
is not specified, we assume default 'draft' environment. IfUser ID
is not specified, we assume default '-' user. - page_size (::Integer) — Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- page_token (::String) — Optional. The next_page_token value returned from a previous list request.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::SessionEntityType>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::SessionEntityType>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::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::V2::SessionEntityType. p response end
#update_session_entity_type
def update_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::SessionEntityType
def update_session_entity_type(session_entity_type: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::V2::SessionEntityType
Updates the specified session entity type.
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
def update_session_entity_type(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::SessionEntityType
update_session_entity_type
via a request object, either of type
UpdateSessionEntityTypeRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::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::V2::SessionEntityType
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).
- session_entity_type (::Google::Cloud::Dialogflow::V2::SessionEntityType, ::Hash) — Required. The session entity type to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The mask to control which fields get updated.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dialogflow::V2::SessionEntityType)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::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::V2::SessionEntityType. p result