public static final class ContextsGrpc.ContextsStub extends io.grpc.stub.AbstractStub<ContextsGrpc.ContextsStub>
A context represents additional information included with user input or with an intent returned by the Dialogflow API. Contexts are helpful for differentiating user input which may be vague or have a different meaning depending on additional details from your application such as user setting and preferences, previous user input, where the user is in your application, geographic location, and so on. You can include contexts as input parameters of a [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) request, or as output contexts included in the returned intent. Contexts expire when an intent is matched, after the number of `DetectIntent` requests specified by the `lifespan_count` parameter, or after 10 minutes if no intents are matched for a `DetectIntent` request. For more information about contexts, see the [Dialogflow documentation](https://dialogflow.com/docs/contexts).
Modifier and Type | Method and Description |
---|---|
protected ContextsGrpc.ContextsStub |
build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) |
void |
createContext(CreateContextRequest request,
io.grpc.stub.StreamObserver<Context> responseObserver)
Creates a context.
|
void |
deleteAllContexts(DeleteAllContextsRequest request,
io.grpc.stub.StreamObserver<Empty> responseObserver)
Deletes all active contexts in the specified session.
|
void |
deleteContext(DeleteContextRequest request,
io.grpc.stub.StreamObserver<Empty> responseObserver)
Deletes the specified context.
|
void |
getContext(GetContextRequest request,
io.grpc.stub.StreamObserver<Context> responseObserver)
Retrieves the specified context.
|
void |
listContexts(ListContextsRequest request,
io.grpc.stub.StreamObserver<ListContextsResponse> responseObserver)
Returns the list of all contexts in the specified session.
|
void |
updateContext(UpdateContextRequest request,
io.grpc.stub.StreamObserver<Context> responseObserver)
Updates the specified context.
|
protected ContextsGrpc.ContextsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
build
in class io.grpc.stub.AbstractStub<ContextsGrpc.ContextsStub>
public void listContexts(ListContextsRequest request, io.grpc.stub.StreamObserver<ListContextsResponse> responseObserver)
Returns the list of all contexts in the specified session.
public void getContext(GetContextRequest request, io.grpc.stub.StreamObserver<Context> responseObserver)
Retrieves the specified context.
public void createContext(CreateContextRequest request, io.grpc.stub.StreamObserver<Context> responseObserver)
Creates a context.
public void updateContext(UpdateContextRequest request, io.grpc.stub.StreamObserver<Context> responseObserver)
Updates the specified context.
public void deleteContext(DeleteContextRequest request, io.grpc.stub.StreamObserver<Empty> responseObserver)
Deletes the specified context.
public void deleteAllContexts(DeleteAllContextsRequest request, io.grpc.stub.StreamObserver<Empty> responseObserver)
Deletes all active contexts in the specified session.