@Generated(value="by gapic-generator") @BetaApi public class SessionEntityTypesClient extends Object implements com.google.api.gax.core.BackgroundResource
Session entity types are referred to as **User** entity types and are entities that are built for an individual user such as favorites, preferences, playlists, and so on. You can redefine a session entity type at the session level.
Session entity methods do not work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
For more information about entity types, see the [Dialogflow documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
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:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
}
Note: close() needs to be called on the sessionEntityTypesClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
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 SessionEntityTypesSettings to create(). For example:
To customize credentials:
SessionEntityTypesSettings sessionEntityTypesSettings =
SessionEntityTypesSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SessionEntityTypesClient sessionEntityTypesClient =
SessionEntityTypesClient.create(sessionEntityTypesSettings);
To customize the endpoint:
SessionEntityTypesSettings sessionEntityTypesSettings =
SessionEntityTypesSettings.newBuilder().setEndpoint(myEndpoint).build();
SessionEntityTypesClient sessionEntityTypesClient =
SessionEntityTypesClient.create(sessionEntityTypesSettings);
Modifier and Type | Class and Description |
---|---|
static class |
SessionEntityTypesClient.ListSessionEntityTypesFixedSizeCollection |
static class |
SessionEntityTypesClient.ListSessionEntityTypesPage |
static class |
SessionEntityTypesClient.ListSessionEntityTypesPagedResponse |
Modifier | Constructor and Description |
---|---|
protected |
SessionEntityTypesClient(SessionEntityTypesSettings settings)
Constructs an instance of SessionEntityTypesClient, using the given settings.
|
protected |
SessionEntityTypesClient(SessionEntityTypesStub stub) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static SessionEntityTypesClient |
create()
Constructs an instance of SessionEntityTypesClient with default settings.
|
static SessionEntityTypesClient |
create(SessionEntityTypesSettings settings)
Constructs an instance of SessionEntityTypesClient, using the given settings.
|
static SessionEntityTypesClient |
create(SessionEntityTypesStub stub)
Constructs an instance of SessionEntityTypesClient, using the given stub for making calls.
|
SessionEntityType |
createSessionEntityType(CreateSessionEntityTypeRequest request)
Creates a session entity type.
|
SessionEntityType |
createSessionEntityType(SessionName parent,
SessionEntityType sessionEntityType)
Creates a session entity type.
|
SessionEntityType |
createSessionEntityType(String parent,
SessionEntityType sessionEntityType)
Creates a session entity type.
|
com.google.api.gax.rpc.UnaryCallable<CreateSessionEntityTypeRequest,SessionEntityType> |
createSessionEntityTypeCallable()
Creates a session entity type.
|
void |
deleteSessionEntityType(DeleteSessionEntityTypeRequest request)
Deletes the specified session entity type.
|
void |
deleteSessionEntityType(SessionEntityTypeName name)
Deletes the specified session entity type.
|
void |
deleteSessionEntityType(String name)
Deletes the specified session entity type.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSessionEntityTypeRequest,Empty> |
deleteSessionEntityTypeCallable()
Deletes the specified session entity type.
|
SessionEntityType |
getSessionEntityType(GetSessionEntityTypeRequest request)
Retrieves the specified session entity type.
|
SessionEntityType |
getSessionEntityType(SessionEntityTypeName name)
Retrieves the specified session entity type.
|
SessionEntityType |
getSessionEntityType(String name)
Retrieves the specified session entity type.
|
com.google.api.gax.rpc.UnaryCallable<GetSessionEntityTypeRequest,SessionEntityType> |
getSessionEntityTypeCallable()
Retrieves the specified session entity type.
|
SessionEntityTypesSettings |
getSettings() |
SessionEntityTypesStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
SessionEntityTypesClient.ListSessionEntityTypesPagedResponse |
listSessionEntityTypes(ListSessionEntityTypesRequest request)
Returns the list of all session entity types in the specified session.
|
SessionEntityTypesClient.ListSessionEntityTypesPagedResponse |
listSessionEntityTypes(SessionName parent)
Returns the list of all session entity types in the specified session.
|
SessionEntityTypesClient.ListSessionEntityTypesPagedResponse |
listSessionEntityTypes(String parent)
Returns the list of all session entity types in the specified session.
|
com.google.api.gax.rpc.UnaryCallable<ListSessionEntityTypesRequest,ListSessionEntityTypesResponse> |
listSessionEntityTypesCallable()
Returns the list of all session entity types in the specified session.
|
com.google.api.gax.rpc.UnaryCallable<ListSessionEntityTypesRequest,SessionEntityTypesClient.ListSessionEntityTypesPagedResponse> |
listSessionEntityTypesPagedCallable()
Returns the list of all session entity types in the specified session.
|
void |
shutdown() |
void |
shutdownNow() |
SessionEntityType |
updateSessionEntityType(SessionEntityType sessionEntityType)
Updates the specified session entity type.
|
SessionEntityType |
updateSessionEntityType(UpdateSessionEntityTypeRequest request)
Updates the specified session entity type.
|
com.google.api.gax.rpc.UnaryCallable<UpdateSessionEntityTypeRequest,SessionEntityType> |
updateSessionEntityTypeCallable()
Updates the specified session entity type.
|
protected SessionEntityTypesClient(SessionEntityTypesSettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") protected SessionEntityTypesClient(SessionEntityTypesStub stub)
public static final SessionEntityTypesClient create() throws IOException
IOException
public static final SessionEntityTypesClient create(SessionEntityTypesSettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public static final SessionEntityTypesClient create(SessionEntityTypesStub stub)
public final SessionEntityTypesSettings getSettings()
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public SessionEntityTypesStub getStub()
public final SessionEntityTypesClient.ListSessionEntityTypesPagedResponse listSessionEntityTypes(SessionName parent)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
for (SessionEntityType element : sessionEntityTypesClient.listSessionEntityTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent
- Required. The session to list all session entity types from. Format:
`projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project
ID>/agent/environments/<Environment ID>/users/<User ID>/
sessions/<Session ID>`. If `Environment ID` is not specified, we assume default
'draft' environment. If `User ID` is not specified, we assume default '-' user.com.google.api.gax.rpc.ApiException
- if the remote call failspublic final SessionEntityTypesClient.ListSessionEntityTypesPagedResponse listSessionEntityTypes(String parent)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
for (SessionEntityType element : sessionEntityTypesClient.listSessionEntityTypes(parent.toString()).iterateAll()) {
// doThingsWith(element);
}
}
parent
- Required. The session to list all session entity types from. Format:
`projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project
ID>/agent/environments/<Environment ID>/users/<User ID>/
sessions/<Session ID>`. If `Environment ID` is not specified, we assume default
'draft' environment. If `User ID` is not specified, we assume default '-' user.com.google.api.gax.rpc.ApiException
- if the remote call failspublic final SessionEntityTypesClient.ListSessionEntityTypesPagedResponse listSessionEntityTypes(ListSessionEntityTypesRequest request)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
ListSessionEntityTypesRequest request = ListSessionEntityTypesRequest.newBuilder()
.setParent(parent.toString())
.build();
for (SessionEntityType element : sessionEntityTypesClient.listSessionEntityTypes(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<ListSessionEntityTypesRequest,SessionEntityTypesClient.ListSessionEntityTypesPagedResponse> listSessionEntityTypesPagedCallable()
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
ListSessionEntityTypesRequest request = ListSessionEntityTypesRequest.newBuilder()
.setParent(parent.toString())
.build();
ApiFuture<ListSessionEntityTypesPagedResponse> future = sessionEntityTypesClient.listSessionEntityTypesPagedCallable().futureCall(request);
// Do something
for (SessionEntityType element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSessionEntityTypesRequest,ListSessionEntityTypesResponse> listSessionEntityTypesCallable()
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
ListSessionEntityTypesRequest request = ListSessionEntityTypesRequest.newBuilder()
.setParent(parent.toString())
.build();
while (true) {
ListSessionEntityTypesResponse response = sessionEntityTypesClient.listSessionEntityTypesCallable().call(request);
for (SessionEntityType element : response.getSessionEntityTypesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final SessionEntityType getSessionEntityType(SessionEntityTypeName name)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
}
name
- Required. The name of the session entity type. Format: `projects/<Project
ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or
`projects/<Project ID>/agent/environments/<Environment ID>/users/<User
ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If
`Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is
not specified, we assume default '-' user.com.google.api.gax.rpc.ApiException
- if the remote call failspublic final SessionEntityType getSessionEntityType(String name)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name.toString());
}
name
- Required. The name of the session entity type. Format: `projects/<Project
ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or
`projects/<Project ID>/agent/environments/<Environment ID>/users/<User
ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If
`Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is
not specified, we assume default '-' user.com.google.api.gax.rpc.ApiException
- if the remote call failspublic final SessionEntityType getSessionEntityType(GetSessionEntityTypeRequest request)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
GetSessionEntityTypeRequest request = GetSessionEntityTypeRequest.newBuilder()
.setName(name.toString())
.build();
SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(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<GetSessionEntityTypeRequest,SessionEntityType> getSessionEntityTypeCallable()
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
GetSessionEntityTypeRequest request = GetSessionEntityTypeRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<SessionEntityType> future = sessionEntityTypesClient.getSessionEntityTypeCallable().futureCall(request);
// Do something
SessionEntityType response = future.get();
}
public final SessionEntityType createSessionEntityType(SessionName parent, SessionEntityType sessionEntityType)
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.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
SessionEntityType response = sessionEntityTypesClient.createSessionEntityType(parent, sessionEntityType);
}
parent
- Required. The session to create a session entity type for. Format:
`projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project
ID>/agent/environments/<Environment ID>/users/<User ID>/
sessions/<Session ID>`. If `Environment ID` is not specified, we assume default
'draft' environment. If `User ID` is not specified, we assume default '-' user.sessionEntityType
- Required. The session entity type to create.com.google.api.gax.rpc.ApiException
- if the remote call failspublic final SessionEntityType createSessionEntityType(String parent, SessionEntityType sessionEntityType)
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.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
SessionEntityType response = sessionEntityTypesClient.createSessionEntityType(parent.toString(), sessionEntityType);
}
parent
- Required. The session to create a session entity type for. Format:
`projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project
ID>/agent/environments/<Environment ID>/users/<User ID>/
sessions/<Session ID>`. If `Environment ID` is not specified, we assume default
'draft' environment. If `User ID` is not specified, we assume default '-' user.sessionEntityType
- Required. The session entity type to create.com.google.api.gax.rpc.ApiException
- if the remote call failspublic final SessionEntityType createSessionEntityType(CreateSessionEntityTypeRequest request)
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.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
CreateSessionEntityTypeRequest request = CreateSessionEntityTypeRequest.newBuilder()
.setParent(parent.toString())
.setSessionEntityType(sessionEntityType)
.build();
SessionEntityType response = sessionEntityTypesClient.createSessionEntityType(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<CreateSessionEntityTypeRequest,SessionEntityType> createSessionEntityTypeCallable()
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.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
CreateSessionEntityTypeRequest request = CreateSessionEntityTypeRequest.newBuilder()
.setParent(parent.toString())
.setSessionEntityType(sessionEntityType)
.build();
ApiFuture<SessionEntityType> future = sessionEntityTypesClient.createSessionEntityTypeCallable().futureCall(request);
// Do something
SessionEntityType response = future.get();
}
public final SessionEntityType updateSessionEntityType(SessionEntityType sessionEntityType)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
SessionEntityType response = sessionEntityTypesClient.updateSessionEntityType(sessionEntityType);
}
sessionEntityType
- Required. The entity type to update. Format: `projects/<Project
ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or
`projects/<Project ID>/agent/environments/<Environment ID>/users/<User
ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If
`Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is
not specified, we assume default '-' user.com.google.api.gax.rpc.ApiException
- if the remote call failspublic final SessionEntityType updateSessionEntityType(UpdateSessionEntityTypeRequest request)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
UpdateSessionEntityTypeRequest request = UpdateSessionEntityTypeRequest.newBuilder()
.setSessionEntityType(sessionEntityType)
.build();
SessionEntityType response = sessionEntityTypesClient.updateSessionEntityType(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<UpdateSessionEntityTypeRequest,SessionEntityType> updateSessionEntityTypeCallable()
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
UpdateSessionEntityTypeRequest request = UpdateSessionEntityTypeRequest.newBuilder()
.setSessionEntityType(sessionEntityType)
.build();
ApiFuture<SessionEntityType> future = sessionEntityTypesClient.updateSessionEntityTypeCallable().futureCall(request);
// Do something
SessionEntityType response = future.get();
}
public final void deleteSessionEntityType(SessionEntityTypeName name)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
sessionEntityTypesClient.deleteSessionEntityType(name);
}
name
- Required. The name of the entity type to delete. Format: `projects/<Project
ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or
`projects/<Project ID>/agent/environments/<Environment ID>/users/<User
ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If
`Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is
not specified, we assume default '-' user.com.google.api.gax.rpc.ApiException
- if the remote call failspublic final void deleteSessionEntityType(String name)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
sessionEntityTypesClient.deleteSessionEntityType(name.toString());
}
name
- Required. The name of the entity type to delete. Format: `projects/<Project
ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or
`projects/<Project ID>/agent/environments/<Environment ID>/users/<User
ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If
`Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is
not specified, we assume default '-' user.com.google.api.gax.rpc.ApiException
- if the remote call failspublic final void deleteSessionEntityType(DeleteSessionEntityTypeRequest request)
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
DeleteSessionEntityTypeRequest request = DeleteSessionEntityTypeRequest.newBuilder()
.setName(name.toString())
.build();
sessionEntityTypesClient.deleteSessionEntityType(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<DeleteSessionEntityTypeRequest,Empty> deleteSessionEntityTypeCallable()
This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.
Sample code:
try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
DeleteSessionEntityTypeRequest request = DeleteSessionEntityTypeRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Void> future = sessionEntityTypesClient.deleteSessionEntityTypeCallable().futureCall(request);
// Do something
future.get();
}
public final void close()
close
in interface AutoCloseable
public void shutdown()
shutdown
in interface com.google.api.gax.core.BackgroundResource
public boolean isShutdown()
isShutdown
in interface com.google.api.gax.core.BackgroundResource
public boolean isTerminated()
isTerminated
in interface com.google.api.gax.core.BackgroundResource
public void shutdownNow()
shutdownNow
in interface com.google.api.gax.core.BackgroundResource
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
awaitTermination
in interface com.google.api.gax.core.BackgroundResource
InterruptedException
Copyright © 2019 Google LLC. All rights reserved.