Dialogflow CX V3 API - Class Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client (v0.24.0)

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

Client for the TransitionRouteGroups service.

Service for managing TransitionRouteGroups.

Inherits

  • Object

Methods

.configure

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

Configure the TransitionRouteGroups 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 TransitionRouteGroups clients
::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroups::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the TransitionRouteGroups 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_transition_route_group

def create_transition_route_group(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
def create_transition_route_group(parent: nil, transition_route_group: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup

Creates an TransitionRouteGroup in the specified flow.

Note: You should always train a flow prior to sending it queries. See the training documentation.

Overloads
def create_transition_route_group(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
Pass arguments to create_transition_route_group via a request object, either of type CreateTransitionRouteGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::CreateTransitionRouteGroupRequest, ::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_transition_route_group(parent: nil, transition_route_group: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
Pass arguments to create_transition_route_group 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 flow to create an TransitionRouteGroup for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID> for agent-level groups.
  • transition_route_group (::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup, ::Hash) — Required. The transition route group to create.
  • language_code (::String) — The language of the following fields in TransitionRouteGroup:

    • TransitionRouteGroup.transition_routes.trigger_fulfillment.messages * TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases

    If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

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::TransitionRouteGroups::Client.new

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

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

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

#delete_transition_route_group

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

Deletes the specified TransitionRouteGroup.

Note: You should always train a flow prior to sending it queries. See the training documentation.

Overloads
def delete_transition_route_group(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_transition_route_group via a request object, either of type DeleteTransitionRouteGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::DeleteTransitionRouteGroupRequest, ::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_transition_route_group(name: nil, force: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_transition_route_group 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 TransitionRouteGroup to delete. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>.
  • force (::Boolean) —

    This field has no effect for transition route group that no page is using. If the transition route group is referenced by any page:

    • If force is set to false, an error will be returned with message indicating pages that reference the transition route group.
    • If force is set to true, Dialogflow will remove the transition route group, as well as any reference to it.
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::TransitionRouteGroups::Client.new

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

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

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

#get_transition_route_group

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

Retrieves the specified TransitionRouteGroup.

Overloads
def get_transition_route_group(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
Pass arguments to get_transition_route_group via a request object, either of type GetTransitionRouteGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::GetTransitionRouteGroupRequest, ::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_transition_route_group(name: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
Pass arguments to get_transition_route_group 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 TransitionRouteGroup. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID> or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/transitionRouteGroups/<Transition Route Group ID>.
  • language_code (::String) — The language to retrieve the transition route group for. The following fields are language dependent:

    • TransitionRouteGroup.transition_routes.trigger_fulfillment.messages * TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases

    If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

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::TransitionRouteGroups::Client.new

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

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

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

#initialize

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

Create a new TransitionRouteGroups client object.

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

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

#list_transition_route_groups

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

Returns the list of all transition route groups in the specified flow.

Overloads
def list_transition_route_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup>
Pass arguments to list_transition_route_groups via a request object, either of type ListTransitionRouteGroupsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::ListTransitionRouteGroupsRequest, ::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_transition_route_groups(parent: nil, page_size: nil, page_token: nil, language_code: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup>
Pass arguments to list_transition_route_groups 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 flow to list all transition route groups for. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID> or `projects/
  • 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.
  • language_code (::String) — The language to list transition route groups for. The following fields are language dependent:

    • TransitionRouteGroup.transition_routes.trigger_fulfillment.messages * TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases

    If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

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::TransitionRouteGroups::Client.new

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

# Call the list_transition_route_groups method.
result = client.list_transition_route_groups 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::TransitionRouteGroup.
  p item
end

#location_client

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

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

Returns
  • (Google::Cloud::Location::Locations::Client)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_transition_route_group

def update_transition_route_group(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
def update_transition_route_group(transition_route_group: nil, update_mask: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup

Updates the specified TransitionRouteGroup.

Note: You should always train a flow prior to sending it queries. See the training documentation.

Overloads
def update_transition_route_group(request, options = nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
Pass arguments to update_transition_route_group via a request object, either of type UpdateTransitionRouteGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::CX::V3::UpdateTransitionRouteGroupRequest, ::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_transition_route_group(transition_route_group: nil, update_mask: nil, language_code: nil) -> ::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup
Pass arguments to update_transition_route_group 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
  • transition_route_group (::Google::Cloud::Dialogflow::CX::V3::TransitionRouteGroup, ::Hash) — Required. The transition route group to update.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — The mask to control which fields get updated.
  • language_code (::String) — The language of the following fields in TransitionRouteGroup:

    • TransitionRouteGroup.transition_routes.trigger_fulfillment.messages * TransitionRouteGroup.transition_routes.trigger_fulfillment.conditional_cases

    If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

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::TransitionRouteGroups::Client.new

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

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

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