com.google.cloud.dialogflow.v2.AgentsGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-google-cloud-dialogflow-v2 Show documentation
Show all versions of grpc-google-cloud-dialogflow-v2 Show documentation
GRPC library for grpc-google-cloud-dialogflow-v2
package com.google.cloud.dialogflow.v2;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*
* Agents are best described as Natural Language Understanding (NLU) modules
* that transform user requests into actionable data. You can include agents
* in your app, product, or service to determine user intent and respond to the
* user in a natural way.
* After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
* [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
* manage the flow of a conversation and match user input to predefined intents
* and actions.
* You can create an agent using both Dialogflow Standard Edition and
* Dialogflow Enterprise Edition. For details, see
* [Dialogflow Editions](/dialogflow-enterprise/docs/editions).
* You can save your agent for backup or versioning by exporting the agent by
* using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
* agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
* Dialogflow provides several
* [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
* conversation scenarios such as determining a date and time, converting
* currency, and so on.
* For more information about agents, see the
* [Dialogflow documentation](https://dialogflow.com/docs/agents).
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.10.0)",
comments = "Source: google/cloud/dialogflow/v2/agent.proto")
public final class AgentsGrpc {
private AgentsGrpc() {}
public static final String SERVICE_NAME = "google.cloud.dialogflow.v2.Agents";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getGetAgentMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_GET_AGENT = getGetAgentMethodHelper();
private static volatile io.grpc.MethodDescriptor getGetAgentMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getGetAgentMethod() {
return getGetAgentMethodHelper();
}
private static io.grpc.MethodDescriptor getGetAgentMethodHelper() {
io.grpc.MethodDescriptor getGetAgentMethod;
if ((getGetAgentMethod = AgentsGrpc.getGetAgentMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getGetAgentMethod = AgentsGrpc.getGetAgentMethod) == null) {
AgentsGrpc.getGetAgentMethod = getGetAgentMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"google.cloud.dialogflow.v2.Agents", "GetAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.GetAgentRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.Agent.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("GetAgent"))
.build();
}
}
}
return getGetAgentMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getSearchAgentsMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_SEARCH_AGENTS = getSearchAgentsMethodHelper();
private static volatile io.grpc.MethodDescriptor getSearchAgentsMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getSearchAgentsMethod() {
return getSearchAgentsMethodHelper();
}
private static io.grpc.MethodDescriptor getSearchAgentsMethodHelper() {
io.grpc.MethodDescriptor getSearchAgentsMethod;
if ((getSearchAgentsMethod = AgentsGrpc.getSearchAgentsMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getSearchAgentsMethod = AgentsGrpc.getSearchAgentsMethod) == null) {
AgentsGrpc.getSearchAgentsMethod = getSearchAgentsMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"google.cloud.dialogflow.v2.Agents", "SearchAgents"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.SearchAgentsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.SearchAgentsResponse.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("SearchAgents"))
.build();
}
}
}
return getSearchAgentsMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getTrainAgentMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_TRAIN_AGENT = getTrainAgentMethodHelper();
private static volatile io.grpc.MethodDescriptor getTrainAgentMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getTrainAgentMethod() {
return getTrainAgentMethodHelper();
}
private static io.grpc.MethodDescriptor getTrainAgentMethodHelper() {
io.grpc.MethodDescriptor getTrainAgentMethod;
if ((getTrainAgentMethod = AgentsGrpc.getTrainAgentMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getTrainAgentMethod = AgentsGrpc.getTrainAgentMethod) == null) {
AgentsGrpc.getTrainAgentMethod = getTrainAgentMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"google.cloud.dialogflow.v2.Agents", "TrainAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.TrainAgentRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("TrainAgent"))
.build();
}
}
}
return getTrainAgentMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getExportAgentMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_EXPORT_AGENT = getExportAgentMethodHelper();
private static volatile io.grpc.MethodDescriptor getExportAgentMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getExportAgentMethod() {
return getExportAgentMethodHelper();
}
private static io.grpc.MethodDescriptor getExportAgentMethodHelper() {
io.grpc.MethodDescriptor getExportAgentMethod;
if ((getExportAgentMethod = AgentsGrpc.getExportAgentMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getExportAgentMethod = AgentsGrpc.getExportAgentMethod) == null) {
AgentsGrpc.getExportAgentMethod = getExportAgentMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"google.cloud.dialogflow.v2.Agents", "ExportAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.ExportAgentRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("ExportAgent"))
.build();
}
}
}
return getExportAgentMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getImportAgentMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_IMPORT_AGENT = getImportAgentMethodHelper();
private static volatile io.grpc.MethodDescriptor getImportAgentMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getImportAgentMethod() {
return getImportAgentMethodHelper();
}
private static io.grpc.MethodDescriptor getImportAgentMethodHelper() {
io.grpc.MethodDescriptor getImportAgentMethod;
if ((getImportAgentMethod = AgentsGrpc.getImportAgentMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getImportAgentMethod = AgentsGrpc.getImportAgentMethod) == null) {
AgentsGrpc.getImportAgentMethod = getImportAgentMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"google.cloud.dialogflow.v2.Agents", "ImportAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.ImportAgentRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("ImportAgent"))
.build();
}
}
}
return getImportAgentMethod;
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getRestoreAgentMethod()} instead.
public static final io.grpc.MethodDescriptor METHOD_RESTORE_AGENT = getRestoreAgentMethodHelper();
private static volatile io.grpc.MethodDescriptor getRestoreAgentMethod;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getRestoreAgentMethod() {
return getRestoreAgentMethodHelper();
}
private static io.grpc.MethodDescriptor getRestoreAgentMethodHelper() {
io.grpc.MethodDescriptor getRestoreAgentMethod;
if ((getRestoreAgentMethod = AgentsGrpc.getRestoreAgentMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getRestoreAgentMethod = AgentsGrpc.getRestoreAgentMethod) == null) {
AgentsGrpc.getRestoreAgentMethod = getRestoreAgentMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"google.cloud.dialogflow.v2.Agents", "RestoreAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.v2.RestoreAgentRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("RestoreAgent"))
.build();
}
}
}
return getRestoreAgentMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static AgentsStub newStub(io.grpc.Channel channel) {
return new AgentsStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static AgentsBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new AgentsBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static AgentsFutureStub newFutureStub(
io.grpc.Channel channel) {
return new AgentsFutureStub(channel);
}
/**
*
* Agents are best described as Natural Language Understanding (NLU) modules
* that transform user requests into actionable data. You can include agents
* in your app, product, or service to determine user intent and respond to the
* user in a natural way.
* After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
* [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
* manage the flow of a conversation and match user input to predefined intents
* and actions.
* You can create an agent using both Dialogflow Standard Edition and
* Dialogflow Enterprise Edition. For details, see
* [Dialogflow Editions](/dialogflow-enterprise/docs/editions).
* You can save your agent for backup or versioning by exporting the agent by
* using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
* agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
* Dialogflow provides several
* [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
* conversation scenarios such as determining a date and time, converting
* currency, and so on.
* For more information about agents, see the
* [Dialogflow documentation](https://dialogflow.com/docs/agents).
*
*/
public static abstract class AgentsImplBase implements io.grpc.BindableService {
/**
*
* Retrieves the specified agent.
*
*/
public void getAgent(com.google.cloud.dialogflow.v2.GetAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetAgentMethodHelper(), responseObserver);
}
/**
*
* Returns the list of agents.
* Since there is at most one conversational agent per project, this method is
* useful primarily for listing all agents across projects the caller has
* access to. One can achieve that with a wildcard project collection id "-".
* Refer to [List
* Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
*
*/
public void searchAgents(com.google.cloud.dialogflow.v2.SearchAgentsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getSearchAgentsMethodHelper(), responseObserver);
}
/**
*
* Trains the specified agent.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public void trainAgent(com.google.cloud.dialogflow.v2.TrainAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getTrainAgentMethodHelper(), responseObserver);
}
/**
*
* Exports the specified agent to a ZIP file.
* Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public void exportAgent(com.google.cloud.dialogflow.v2.ExportAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getExportAgentMethodHelper(), responseObserver);
}
/**
*
* Imports the specified agent from a ZIP file.
* Uploads new intents and entity types without deleting the existing ones.
* Intents and entity types with the same name are replaced with the new
* versions from ImportAgentRequest.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public void importAgent(com.google.cloud.dialogflow.v2.ImportAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getImportAgentMethodHelper(), responseObserver);
}
/**
*
* Restores the specified agent from a ZIP file.
* Replaces the current agent version with a new one. All the intents and
* entity types in the older version are deleted.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public void restoreAgent(com.google.cloud.dialogflow.v2.RestoreAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getRestoreAgentMethodHelper(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetAgentMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.GetAgentRequest,
com.google.cloud.dialogflow.v2.Agent>(
this, METHODID_GET_AGENT)))
.addMethod(
getSearchAgentsMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.SearchAgentsRequest,
com.google.cloud.dialogflow.v2.SearchAgentsResponse>(
this, METHODID_SEARCH_AGENTS)))
.addMethod(
getTrainAgentMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.TrainAgentRequest,
com.google.longrunning.Operation>(
this, METHODID_TRAIN_AGENT)))
.addMethod(
getExportAgentMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.ExportAgentRequest,
com.google.longrunning.Operation>(
this, METHODID_EXPORT_AGENT)))
.addMethod(
getImportAgentMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.ImportAgentRequest,
com.google.longrunning.Operation>(
this, METHODID_IMPORT_AGENT)))
.addMethod(
getRestoreAgentMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.v2.RestoreAgentRequest,
com.google.longrunning.Operation>(
this, METHODID_RESTORE_AGENT)))
.build();
}
}
/**
*
* Agents are best described as Natural Language Understanding (NLU) modules
* that transform user requests into actionable data. You can include agents
* in your app, product, or service to determine user intent and respond to the
* user in a natural way.
* After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
* [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
* manage the flow of a conversation and match user input to predefined intents
* and actions.
* You can create an agent using both Dialogflow Standard Edition and
* Dialogflow Enterprise Edition. For details, see
* [Dialogflow Editions](/dialogflow-enterprise/docs/editions).
* You can save your agent for backup or versioning by exporting the agent by
* using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
* agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
* Dialogflow provides several
* [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
* conversation scenarios such as determining a date and time, converting
* currency, and so on.
* For more information about agents, see the
* [Dialogflow documentation](https://dialogflow.com/docs/agents).
*
*/
public static final class AgentsStub extends io.grpc.stub.AbstractStub {
private AgentsStub(io.grpc.Channel channel) {
super(channel);
}
private AgentsStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AgentsStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new AgentsStub(channel, callOptions);
}
/**
*
* Retrieves the specified agent.
*
*/
public void getAgent(com.google.cloud.dialogflow.v2.GetAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetAgentMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* Returns the list of agents.
* Since there is at most one conversational agent per project, this method is
* useful primarily for listing all agents across projects the caller has
* access to. One can achieve that with a wildcard project collection id "-".
* Refer to [List
* Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
*
*/
public void searchAgents(com.google.cloud.dialogflow.v2.SearchAgentsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getSearchAgentsMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* Trains the specified agent.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public void trainAgent(com.google.cloud.dialogflow.v2.TrainAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getTrainAgentMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* Exports the specified agent to a ZIP file.
* Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public void exportAgent(com.google.cloud.dialogflow.v2.ExportAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getExportAgentMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* Imports the specified agent from a ZIP file.
* Uploads new intents and entity types without deleting the existing ones.
* Intents and entity types with the same name are replaced with the new
* versions from ImportAgentRequest.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public void importAgent(com.google.cloud.dialogflow.v2.ImportAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getImportAgentMethodHelper(), getCallOptions()), request, responseObserver);
}
/**
*
* Restores the specified agent from a ZIP file.
* Replaces the current agent version with a new one. All the intents and
* entity types in the older version are deleted.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public void restoreAgent(com.google.cloud.dialogflow.v2.RestoreAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getRestoreAgentMethodHelper(), getCallOptions()), request, responseObserver);
}
}
/**
*
* Agents are best described as Natural Language Understanding (NLU) modules
* that transform user requests into actionable data. You can include agents
* in your app, product, or service to determine user intent and respond to the
* user in a natural way.
* After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
* [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
* manage the flow of a conversation and match user input to predefined intents
* and actions.
* You can create an agent using both Dialogflow Standard Edition and
* Dialogflow Enterprise Edition. For details, see
* [Dialogflow Editions](/dialogflow-enterprise/docs/editions).
* You can save your agent for backup or versioning by exporting the agent by
* using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
* agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
* Dialogflow provides several
* [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
* conversation scenarios such as determining a date and time, converting
* currency, and so on.
* For more information about agents, see the
* [Dialogflow documentation](https://dialogflow.com/docs/agents).
*
*/
public static final class AgentsBlockingStub extends io.grpc.stub.AbstractStub {
private AgentsBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private AgentsBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AgentsBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new AgentsBlockingStub(channel, callOptions);
}
/**
*
* Retrieves the specified agent.
*
*/
public com.google.cloud.dialogflow.v2.Agent getAgent(com.google.cloud.dialogflow.v2.GetAgentRequest request) {
return blockingUnaryCall(
getChannel(), getGetAgentMethodHelper(), getCallOptions(), request);
}
/**
*
* Returns the list of agents.
* Since there is at most one conversational agent per project, this method is
* useful primarily for listing all agents across projects the caller has
* access to. One can achieve that with a wildcard project collection id "-".
* Refer to [List
* Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
*
*/
public com.google.cloud.dialogflow.v2.SearchAgentsResponse searchAgents(com.google.cloud.dialogflow.v2.SearchAgentsRequest request) {
return blockingUnaryCall(
getChannel(), getSearchAgentsMethodHelper(), getCallOptions(), request);
}
/**
*
* Trains the specified agent.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public com.google.longrunning.Operation trainAgent(com.google.cloud.dialogflow.v2.TrainAgentRequest request) {
return blockingUnaryCall(
getChannel(), getTrainAgentMethodHelper(), getCallOptions(), request);
}
/**
*
* Exports the specified agent to a ZIP file.
* Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public com.google.longrunning.Operation exportAgent(com.google.cloud.dialogflow.v2.ExportAgentRequest request) {
return blockingUnaryCall(
getChannel(), getExportAgentMethodHelper(), getCallOptions(), request);
}
/**
*
* Imports the specified agent from a ZIP file.
* Uploads new intents and entity types without deleting the existing ones.
* Intents and entity types with the same name are replaced with the new
* versions from ImportAgentRequest.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public com.google.longrunning.Operation importAgent(com.google.cloud.dialogflow.v2.ImportAgentRequest request) {
return blockingUnaryCall(
getChannel(), getImportAgentMethodHelper(), getCallOptions(), request);
}
/**
*
* Restores the specified agent from a ZIP file.
* Replaces the current agent version with a new one. All the intents and
* entity types in the older version are deleted.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public com.google.longrunning.Operation restoreAgent(com.google.cloud.dialogflow.v2.RestoreAgentRequest request) {
return blockingUnaryCall(
getChannel(), getRestoreAgentMethodHelper(), getCallOptions(), request);
}
}
/**
*
* Agents are best described as Natural Language Understanding (NLU) modules
* that transform user requests into actionable data. You can include agents
* in your app, product, or service to determine user intent and respond to the
* user in a natural way.
* After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
* [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
* manage the flow of a conversation and match user input to predefined intents
* and actions.
* You can create an agent using both Dialogflow Standard Edition and
* Dialogflow Enterprise Edition. For details, see
* [Dialogflow Editions](/dialogflow-enterprise/docs/editions).
* You can save your agent for backup or versioning by exporting the agent by
* using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
* agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
* Dialogflow provides several
* [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
* conversation scenarios such as determining a date and time, converting
* currency, and so on.
* For more information about agents, see the
* [Dialogflow documentation](https://dialogflow.com/docs/agents).
*
*/
public static final class AgentsFutureStub extends io.grpc.stub.AbstractStub {
private AgentsFutureStub(io.grpc.Channel channel) {
super(channel);
}
private AgentsFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AgentsFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new AgentsFutureStub(channel, callOptions);
}
/**
*
* Retrieves the specified agent.
*
*/
public com.google.common.util.concurrent.ListenableFuture getAgent(
com.google.cloud.dialogflow.v2.GetAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetAgentMethodHelper(), getCallOptions()), request);
}
/**
*
* Returns the list of agents.
* Since there is at most one conversational agent per project, this method is
* useful primarily for listing all agents across projects the caller has
* access to. One can achieve that with a wildcard project collection id "-".
* Refer to [List
* Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
*
*/
public com.google.common.util.concurrent.ListenableFuture searchAgents(
com.google.cloud.dialogflow.v2.SearchAgentsRequest request) {
return futureUnaryCall(
getChannel().newCall(getSearchAgentsMethodHelper(), getCallOptions()), request);
}
/**
*
* Trains the specified agent.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public com.google.common.util.concurrent.ListenableFuture trainAgent(
com.google.cloud.dialogflow.v2.TrainAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getTrainAgentMethodHelper(), getCallOptions()), request);
}
/**
*
* Exports the specified agent to a ZIP file.
* Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public com.google.common.util.concurrent.ListenableFuture exportAgent(
com.google.cloud.dialogflow.v2.ExportAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getExportAgentMethodHelper(), getCallOptions()), request);
}
/**
*
* Imports the specified agent from a ZIP file.
* Uploads new intents and entity types without deleting the existing ones.
* Intents and entity types with the same name are replaced with the new
* versions from ImportAgentRequest.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public com.google.common.util.concurrent.ListenableFuture importAgent(
com.google.cloud.dialogflow.v2.ImportAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getImportAgentMethodHelper(), getCallOptions()), request);
}
/**
*
* Restores the specified agent from a ZIP file.
* Replaces the current agent version with a new one. All the intents and
* entity types in the older version are deleted.
* Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
* metadata: [google.protobuf.Struct][google.protobuf.Struct]>
*
*/
public com.google.common.util.concurrent.ListenableFuture restoreAgent(
com.google.cloud.dialogflow.v2.RestoreAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getRestoreAgentMethodHelper(), getCallOptions()), request);
}
}
private static final int METHODID_GET_AGENT = 0;
private static final int METHODID_SEARCH_AGENTS = 1;
private static final int METHODID_TRAIN_AGENT = 2;
private static final int METHODID_EXPORT_AGENT = 3;
private static final int METHODID_IMPORT_AGENT = 4;
private static final int METHODID_RESTORE_AGENT = 5;
private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final AgentsImplBase serviceImpl;
private final int methodId;
MethodHandlers(AgentsImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_GET_AGENT:
serviceImpl.getAgent((com.google.cloud.dialogflow.v2.GetAgentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SEARCH_AGENTS:
serviceImpl.searchAgents((com.google.cloud.dialogflow.v2.SearchAgentsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_TRAIN_AGENT:
serviceImpl.trainAgent((com.google.cloud.dialogflow.v2.TrainAgentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXPORT_AGENT:
serviceImpl.exportAgent((com.google.cloud.dialogflow.v2.ExportAgentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_IMPORT_AGENT:
serviceImpl.importAgent((com.google.cloud.dialogflow.v2.ImportAgentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_RESTORE_AGENT:
serviceImpl.restoreAgent((com.google.cloud.dialogflow.v2.RestoreAgentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static abstract class AgentsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
AgentsBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.dialogflow.v2.AgentProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Agents");
}
}
private static final class AgentsFileDescriptorSupplier
extends AgentsBaseDescriptorSupplier {
AgentsFileDescriptorSupplier() {}
}
private static final class AgentsMethodDescriptorSupplier
extends AgentsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
AgentsMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (AgentsGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new AgentsFileDescriptorSupplier())
.addMethod(getGetAgentMethodHelper())
.addMethod(getSearchAgentsMethodHelper())
.addMethod(getTrainAgentMethodHelper())
.addMethod(getExportAgentMethodHelper())
.addMethod(getImportAgentMethodHelper())
.addMethod(getRestoreAgentMethodHelper())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy