@Generated(value="by gapic-generator-java") public class TransitionRouteGroupsClient extends Object implements com.google.api.gax.core.BackgroundResource
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
TransitionRouteGroupName name =
TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName(
"[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
}
Note: close() needs to be called on the TransitionRouteGroupsClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
ListTransitionRouteGroups |
Returns the list of all transition route groups in the specified flow. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTransitionRouteGroup |
Retrieves the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTransitionRouteGroup |
Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the specified flow. 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). |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTransitionRouteGroup |
Updates the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. 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). |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTransitionRouteGroup |
Deletes the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. 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). |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of TransitionRouteGroupsSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
TransitionRouteGroupsSettings transitionRouteGroupsSettings =
TransitionRouteGroupsSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create(transitionRouteGroupsSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
TransitionRouteGroupsSettings transitionRouteGroupsSettings =
TransitionRouteGroupsSettings.newBuilder().setEndpoint(myEndpoint).build();
TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create(transitionRouteGroupsSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
TransitionRouteGroupsSettings transitionRouteGroupsSettings =
TransitionRouteGroupsSettings.newHttpJsonBuilder().build();
TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create(transitionRouteGroupsSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
TransitionRouteGroupsClient.ListLocationsFixedSizeCollection |
static class |
TransitionRouteGroupsClient.ListLocationsPage |
static class |
TransitionRouteGroupsClient.ListLocationsPagedResponse |
static class |
TransitionRouteGroupsClient.ListTransitionRouteGroupsFixedSizeCollection |
static class |
TransitionRouteGroupsClient.ListTransitionRouteGroupsPage |
static class |
TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
TransitionRouteGroupsClient(TransitionRouteGroupsSettings settings)
Constructs an instance of TransitionRouteGroupsClient, using the given settings.
|
protected |
TransitionRouteGroupsClient(TransitionRouteGroupsStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static TransitionRouteGroupsClient |
create()
Constructs an instance of TransitionRouteGroupsClient with default settings.
|
static TransitionRouteGroupsClient |
create(TransitionRouteGroupsSettings settings)
Constructs an instance of TransitionRouteGroupsClient, using the given settings.
|
static TransitionRouteGroupsClient |
create(TransitionRouteGroupsStub stub)
Constructs an instance of TransitionRouteGroupsClient, using the given stub for making calls.
|
TransitionRouteGroup |
createTransitionRouteGroup(AgentName parent,
TransitionRouteGroup transitionRouteGroup)
Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the
specified flow.
|
TransitionRouteGroup |
createTransitionRouteGroup(CreateTransitionRouteGroupRequest request)
Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the
specified flow.
|
TransitionRouteGroup |
createTransitionRouteGroup(FlowName parent,
TransitionRouteGroup transitionRouteGroup)
Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the
specified flow.
|
TransitionRouteGroup |
createTransitionRouteGroup(String parent,
TransitionRouteGroup transitionRouteGroup)
Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the
specified flow.
|
com.google.api.gax.rpc.UnaryCallable<CreateTransitionRouteGroupRequest,TransitionRouteGroup> |
createTransitionRouteGroupCallable()
Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the
specified flow.
|
void |
deleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest request)
Deletes the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
void |
deleteTransitionRouteGroup(String name)
Deletes the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
void |
deleteTransitionRouteGroup(TransitionRouteGroupName name)
Deletes the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
com.google.api.gax.rpc.UnaryCallable<DeleteTransitionRouteGroupRequest,com.google.protobuf.Empty> |
deleteTransitionRouteGroupCallable()
Deletes the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
TransitionRouteGroupsSettings |
getSettings() |
TransitionRouteGroupsStub |
getStub() |
TransitionRouteGroup |
getTransitionRouteGroup(GetTransitionRouteGroupRequest request)
Retrieves the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
TransitionRouteGroup |
getTransitionRouteGroup(String name)
Retrieves the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
TransitionRouteGroup |
getTransitionRouteGroup(TransitionRouteGroupName name)
Retrieves the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
com.google.api.gax.rpc.UnaryCallable<GetTransitionRouteGroupRequest,TransitionRouteGroup> |
getTransitionRouteGroupCallable()
Retrieves the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
boolean |
isShutdown() |
boolean |
isTerminated() |
TransitionRouteGroupsClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,TransitionRouteGroupsClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse |
listTransitionRouteGroups(AgentName parent)
Returns the list of all transition route groups in the specified flow.
|
TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse |
listTransitionRouteGroups(FlowName parent)
Returns the list of all transition route groups in the specified flow.
|
TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse |
listTransitionRouteGroups(ListTransitionRouteGroupsRequest request)
Returns the list of all transition route groups in the specified flow.
|
TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse |
listTransitionRouteGroups(String parent)
Returns the list of all transition route groups in the specified flow.
|
com.google.api.gax.rpc.UnaryCallable<ListTransitionRouteGroupsRequest,ListTransitionRouteGroupsResponse> |
listTransitionRouteGroupsCallable()
Returns the list of all transition route groups in the specified flow.
|
com.google.api.gax.rpc.UnaryCallable<ListTransitionRouteGroupsRequest,TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse> |
listTransitionRouteGroupsPagedCallable()
Returns the list of all transition route groups in the specified flow.
|
void |
shutdown() |
void |
shutdownNow() |
TransitionRouteGroup |
updateTransitionRouteGroup(TransitionRouteGroup transitionRouteGroup,
com.google.protobuf.FieldMask updateMask)
Updates the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
TransitionRouteGroup |
updateTransitionRouteGroup(UpdateTransitionRouteGroupRequest request)
Updates the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
com.google.api.gax.rpc.UnaryCallable<UpdateTransitionRouteGroupRequest,TransitionRouteGroup> |
updateTransitionRouteGroupCallable()
Updates the specified
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
protected TransitionRouteGroupsClient(TransitionRouteGroupsSettings settings) throws IOException
IOExceptionprotected TransitionRouteGroupsClient(TransitionRouteGroupsStub stub)
public static final TransitionRouteGroupsClient create() throws IOException
IOExceptionpublic static final TransitionRouteGroupsClient create(TransitionRouteGroupsSettings settings) throws IOException
IOExceptionpublic static final TransitionRouteGroupsClient create(TransitionRouteGroupsStub stub)
public final TransitionRouteGroupsSettings getSettings()
public TransitionRouteGroupsStub getStub()
public final TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(AgentName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
for (TransitionRouteGroup element :
transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The flow to list all transition route groups for. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`
or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(FlowName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
for (TransitionRouteGroup element :
transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The flow to list all transition route groups for. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`
or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
String parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
for (TransitionRouteGroup element :
transitionRouteGroupsClient.listTransitionRouteGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The flow to list all transition route groups for. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`
or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse listTransitionRouteGroups(ListTransitionRouteGroupsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
ListTransitionRouteGroupsRequest request =
ListTransitionRouteGroupsRequest.newBuilder()
.setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setLanguageCode("languageCode-2092349083")
.build();
for (TransitionRouteGroup element :
transitionRouteGroupsClient.listTransitionRouteGroups(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListTransitionRouteGroupsRequest,TransitionRouteGroupsClient.ListTransitionRouteGroupsPagedResponse> listTransitionRouteGroupsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
ListTransitionRouteGroupsRequest request =
ListTransitionRouteGroupsRequest.newBuilder()
.setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setLanguageCode("languageCode-2092349083")
.build();
ApiFuture<TransitionRouteGroup> future =
transitionRouteGroupsClient.listTransitionRouteGroupsPagedCallable().futureCall(request);
// Do something.
for (TransitionRouteGroup element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListTransitionRouteGroupsRequest,ListTransitionRouteGroupsResponse> listTransitionRouteGroupsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
ListTransitionRouteGroupsRequest request =
ListTransitionRouteGroupsRequest.newBuilder()
.setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setLanguageCode("languageCode-2092349083")
.build();
while (true) {
ListTransitionRouteGroupsResponse response =
transitionRouteGroupsClient.listTransitionRouteGroupsCallable().call(request);
for (TransitionRouteGroup element : response.getTransitionRouteGroupsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final TransitionRouteGroup getTransitionRouteGroup(TransitionRouteGroupName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
TransitionRouteGroupName name =
TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName(
"[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
}
name - Required. The name of the
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/transitionRouteGroups/<TransitionRouteGroupID>`
or
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/transitionRouteGroups/<TransitionRouteGroupID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TransitionRouteGroup getTransitionRouteGroup(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
String name =
TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName(
"[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
.toString();
TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(name);
}
name - Required. The name of the
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup]. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/transitionRouteGroups/<TransitionRouteGroupID>`
or
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/transitionRouteGroups/<TransitionRouteGroupID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TransitionRouteGroup getTransitionRouteGroup(GetTransitionRouteGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
GetTransitionRouteGroupRequest request =
GetTransitionRouteGroupRequest.newBuilder()
.setName(
TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName(
"[PROJECT]",
"[LOCATION]",
"[AGENT]",
"[FLOW]",
"[TRANSITION_ROUTE_GROUP]")
.toString())
.setLanguageCode("languageCode-2092349083")
.build();
TransitionRouteGroup response = transitionRouteGroupsClient.getTransitionRouteGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetTransitionRouteGroupRequest,TransitionRouteGroup> getTransitionRouteGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
GetTransitionRouteGroupRequest request =
GetTransitionRouteGroupRequest.newBuilder()
.setName(
TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName(
"[PROJECT]",
"[LOCATION]",
"[AGENT]",
"[FLOW]",
"[TRANSITION_ROUTE_GROUP]")
.toString())
.setLanguageCode("languageCode-2092349083")
.build();
ApiFuture<TransitionRouteGroup> future =
transitionRouteGroupsClient.getTransitionRouteGroupCallable().futureCall(request);
// Do something.
TransitionRouteGroup response = future.get();
}
public final TransitionRouteGroup createTransitionRouteGroup(AgentName parent, TransitionRouteGroup transitionRouteGroup)
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
TransitionRouteGroup response =
transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup);
}
parent - Required. The flow to create an
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`
or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>` for
agent-level groups.transitionRouteGroup - Required. The transition route group to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TransitionRouteGroup createTransitionRouteGroup(FlowName parent, TransitionRouteGroup transitionRouteGroup)
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
FlowName parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
TransitionRouteGroup response =
transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup);
}
parent - Required. The flow to create an
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`
or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>` for
agent-level groups.transitionRouteGroup - Required. The transition route group to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TransitionRouteGroup createTransitionRouteGroup(String parent, TransitionRouteGroup transitionRouteGroup)
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
String parent = FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString();
TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
TransitionRouteGroup response =
transitionRouteGroupsClient.createTransitionRouteGroup(parent, transitionRouteGroup);
}
parent - Required. The flow to create an
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`
or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>` for
agent-level groups.transitionRouteGroup - Required. The transition route group to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TransitionRouteGroup createTransitionRouteGroup(CreateTransitionRouteGroupRequest request)
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
CreateTransitionRouteGroupRequest request =
CreateTransitionRouteGroupRequest.newBuilder()
.setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
.setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
.setLanguageCode("languageCode-2092349083")
.build();
TransitionRouteGroup response =
transitionRouteGroupsClient.createTransitionRouteGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateTransitionRouteGroupRequest,TransitionRouteGroup> createTransitionRouteGroupCallable()
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
CreateTransitionRouteGroupRequest request =
CreateTransitionRouteGroupRequest.newBuilder()
.setParent(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString())
.setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
.setLanguageCode("languageCode-2092349083")
.build();
ApiFuture<TransitionRouteGroup> future =
transitionRouteGroupsClient.createTransitionRouteGroupCallable().futureCall(request);
// Do something.
TransitionRouteGroup response = future.get();
}
public final TransitionRouteGroup updateTransitionRouteGroup(TransitionRouteGroup transitionRouteGroup, com.google.protobuf.FieldMask updateMask)
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
TransitionRouteGroup transitionRouteGroup = TransitionRouteGroup.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
TransitionRouteGroup response =
transitionRouteGroupsClient.updateTransitionRouteGroup(transitionRouteGroup, updateMask);
}
transitionRouteGroup - Required. The transition route group to update.updateMask - The mask to control which fields get updated.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TransitionRouteGroup updateTransitionRouteGroup(UpdateTransitionRouteGroupRequest request)
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
UpdateTransitionRouteGroupRequest request =
UpdateTransitionRouteGroupRequest.newBuilder()
.setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setLanguageCode("languageCode-2092349083")
.build();
TransitionRouteGroup response =
transitionRouteGroupsClient.updateTransitionRouteGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateTransitionRouteGroupRequest,TransitionRouteGroup> updateTransitionRouteGroupCallable()
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
UpdateTransitionRouteGroupRequest request =
UpdateTransitionRouteGroupRequest.newBuilder()
.setTransitionRouteGroup(TransitionRouteGroup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setLanguageCode("languageCode-2092349083")
.build();
ApiFuture<TransitionRouteGroup> future =
transitionRouteGroupsClient.updateTransitionRouteGroupCallable().futureCall(request);
// Do something.
TransitionRouteGroup response = future.get();
}
public final void deleteTransitionRouteGroup(TransitionRouteGroupName name)
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
TransitionRouteGroupName name =
TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName(
"[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]");
transitionRouteGroupsClient.deleteTransitionRouteGroup(name);
}
name - Required. The name of the
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete.
Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/transitionRouteGroups/<TransitionRouteGroupID>`
or
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/transitionRouteGroups/<TransitionRouteGroupID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteTransitionRouteGroup(String name)
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
String name =
TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName(
"[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[TRANSITION_ROUTE_GROUP]")
.toString();
transitionRouteGroupsClient.deleteTransitionRouteGroup(name);
}
name - Required. The name of the
[TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete.
Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/transitionRouteGroups/<TransitionRouteGroupID>`
or
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/transitionRouteGroups/<TransitionRouteGroupID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest request)
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
DeleteTransitionRouteGroupRequest request =
DeleteTransitionRouteGroupRequest.newBuilder()
.setName(
TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName(
"[PROJECT]",
"[LOCATION]",
"[AGENT]",
"[FLOW]",
"[TRANSITION_ROUTE_GROUP]")
.toString())
.setForce(true)
.build();
transitionRouteGroupsClient.deleteTransitionRouteGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteTransitionRouteGroupRequest,com.google.protobuf.Empty> deleteTransitionRouteGroupCallable()
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).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
DeleteTransitionRouteGroupRequest request =
DeleteTransitionRouteGroupRequest.newBuilder()
.setName(
TransitionRouteGroupName.ofProjectLocationAgentFlowTransitionRouteGroupName(
"[PROJECT]",
"[LOCATION]",
"[AGENT]",
"[FLOW]",
"[TRANSITION_ROUTE_GROUP]")
.toString())
.setForce(true)
.build();
ApiFuture<Empty> future =
transitionRouteGroupsClient.deleteTransitionRouteGroupCallable().futureCall(request);
// Do something.
future.get();
}
public final TransitionRouteGroupsClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : transitionRouteGroupsClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,TransitionRouteGroupsClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
transitionRouteGroupsClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
transitionRouteGroupsClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = transitionRouteGroupsClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TransitionRouteGroupsClient transitionRouteGroupsClient =
TransitionRouteGroupsClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
transitionRouteGroupsClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2025 Google LLC. All rights reserved.