public static final class IntentsGrpc.IntentsStub extends io.grpc.stub.AbstractStub<IntentsGrpc.IntentsStub>
An intent represents a mapping between input from a user and an action to be taken by your application. When you pass user input to the [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) method, the Dialogflow API analyzes the input and searches for a matching intent. If no match is found, the Dialogflow API returns a fallback intent (`is_fallback` = true). You can provide additional information for the Dialogflow API to use to match user input to an intent by adding the following to your intent. * **Contexts** - provide additional context for intent analysis. For example, if an intent is related to an object in your application that plays music, you can provide a context to determine when to match the intent if the user input is “turn it off”. You can include a context that matches the intent when there is previous user input of "play music", and not when there is previous user input of "turn on the light". * **Events** - allow for matching an intent by using an event name instead of user input. Your application can provide an event name and related parameters to the Dialogflow API to match an intent. For example, when your application starts, you can send a welcome event with a user name parameter to the Dialogflow API to match an intent with a personalized welcome message for the user. * **Training phrases** - provide examples of user input to train the Dialogflow API agent to better match intents. For more information about intents, see the [Dialogflow documentation](https://dialogflow.com/docs/intents).
Modifier and Type | Method and Description |
---|---|
void |
batchDeleteIntents(BatchDeleteIntentsRequest request,
io.grpc.stub.StreamObserver<Operation> responseObserver)
Deletes intents in the specified agent.
|
void |
batchUpdateIntents(BatchUpdateIntentsRequest request,
io.grpc.stub.StreamObserver<Operation> responseObserver)
Updates/Creates multiple intents in the specified agent.
|
protected IntentsGrpc.IntentsStub |
build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) |
void |
createIntent(CreateIntentRequest request,
io.grpc.stub.StreamObserver<Intent> responseObserver)
Creates an intent in the specified agent.
|
void |
deleteIntent(DeleteIntentRequest request,
io.grpc.stub.StreamObserver<Empty> responseObserver)
Deletes the specified intent.
|
void |
getIntent(GetIntentRequest request,
io.grpc.stub.StreamObserver<Intent> responseObserver)
Retrieves the specified intent.
|
void |
listIntents(ListIntentsRequest request,
io.grpc.stub.StreamObserver<ListIntentsResponse> responseObserver)
Returns the list of all intents in the specified agent.
|
void |
updateIntent(UpdateIntentRequest request,
io.grpc.stub.StreamObserver<Intent> responseObserver)
Updates the specified intent.
|
protected IntentsGrpc.IntentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
build
in class io.grpc.stub.AbstractStub<IntentsGrpc.IntentsStub>
public void listIntents(ListIntentsRequest request, io.grpc.stub.StreamObserver<ListIntentsResponse> responseObserver)
Returns the list of all intents in the specified agent.
public void getIntent(GetIntentRequest request, io.grpc.stub.StreamObserver<Intent> responseObserver)
Retrieves the specified intent.
public void createIntent(CreateIntentRequest request, io.grpc.stub.StreamObserver<Intent> responseObserver)
Creates an intent in the specified agent.
public void updateIntent(UpdateIntentRequest request, io.grpc.stub.StreamObserver<Intent> responseObserver)
Updates the specified intent.
public void deleteIntent(DeleteIntentRequest request, io.grpc.stub.StreamObserver<Empty> responseObserver)
Deletes the specified intent.
public void batchUpdateIntents(BatchUpdateIntentsRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
Updates/Creates multiple intents in the specified agent. Operation <response: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse]>
public void batchDeleteIntents(BatchDeleteIntentsRequest request, io.grpc.stub.StreamObserver<Operation> responseObserver)
Deletes intents in the specified agent. Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>