com.google.cloud.dialogflow.cx.v3beta1.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-cx-v3beta1 Show documentation
Show all versions of grpc-google-cloud-dialogflow-cx-v3beta1 Show documentation
GRPC library for grpc-google-cloud-dialogflow-cx-v3beta1
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.dialogflow.cx.v3beta1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*
*
*
* Service for managing [Agents][google.cloud.dialogflow.cx.v3beta1.Agent].
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/dialogflow/cx/v3beta1/agent.proto")
public final class AgentsGrpc {
private AgentsGrpc() {}
public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3beta1.Agents";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest,
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse>
getListAgentsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListAgents",
requestType = com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest.class,
responseType = com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest,
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse>
getListAgentsMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest,
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse>
getListAgentsMethod;
if ((getListAgentsMethod = AgentsGrpc.getListAgentsMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getListAgentsMethod = AgentsGrpc.getListAgentsMethod) == null) {
AgentsGrpc.getListAgentsMethod =
getListAgentsMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAgents"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse
.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("ListAgents"))
.build();
}
}
}
return getListAgentsMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>
getGetAgentMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetAgent",
requestType = com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest.class,
responseType = com.google.cloud.dialogflow.cx.v3beta1.Agent.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>
getGetAgentMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>
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(SERVICE_NAME, "GetAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.Agent.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("GetAgent"))
.build();
}
}
}
return getGetAgentMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>
getCreateAgentMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateAgent",
requestType = com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.class,
responseType = com.google.cloud.dialogflow.cx.v3beta1.Agent.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>
getCreateAgentMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>
getCreateAgentMethod;
if ((getCreateAgentMethod = AgentsGrpc.getCreateAgentMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getCreateAgentMethod = AgentsGrpc.getCreateAgentMethod) == null) {
AgentsGrpc.getCreateAgentMethod =
getCreateAgentMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.Agent.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("CreateAgent"))
.build();
}
}
}
return getCreateAgentMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>
getUpdateAgentMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "UpdateAgent",
requestType = com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.class,
responseType = com.google.cloud.dialogflow.cx.v3beta1.Agent.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>
getUpdateAgentMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>
getUpdateAgentMethod;
if ((getUpdateAgentMethod = AgentsGrpc.getUpdateAgentMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getUpdateAgentMethod = AgentsGrpc.getUpdateAgentMethod) == null) {
AgentsGrpc.getUpdateAgentMethod =
getUpdateAgentMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.Agent.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("UpdateAgent"))
.build();
}
}
}
return getUpdateAgentMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, com.google.protobuf.Empty>
getDeleteAgentMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeleteAgent",
requestType = com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, com.google.protobuf.Empty>
getDeleteAgentMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest, com.google.protobuf.Empty>
getDeleteAgentMethod;
if ((getDeleteAgentMethod = AgentsGrpc.getDeleteAgentMethod) == null) {
synchronized (AgentsGrpc.class) {
if ((getDeleteAgentMethod = AgentsGrpc.getDeleteAgentMethod) == null) {
AgentsGrpc.getDeleteAgentMethod =
getDeleteAgentMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("DeleteAgent"))
.build();
}
}
}
return getDeleteAgentMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest,
com.google.longrunning.Operation>
getExportAgentMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ExportAgent",
requestType = com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest,
com.google.longrunning.Operation>
getExportAgentMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest,
com.google.longrunning.Operation>
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(SERVICE_NAME, "ExportAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new AgentsMethodDescriptorSupplier("ExportAgent"))
.build();
}
}
}
return getExportAgentMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest,
com.google.longrunning.Operation>
getRestoreAgentMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "RestoreAgent",
requestType = com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest,
com.google.longrunning.Operation>
getRestoreAgentMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest,
com.google.longrunning.Operation>
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(SERVICE_NAME, "RestoreAgent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3beta1.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) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AgentsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AgentsStub(channel, callOptions);
}
};
return AgentsStub.newStub(factory, 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) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AgentsBlockingStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AgentsBlockingStub(channel, callOptions);
}
};
return AgentsBlockingStub.newStub(factory, channel);
}
/** Creates a new ListenableFuture-style stub that supports unary calls on the service */
public static AgentsFutureStub newFutureStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AgentsFutureStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AgentsFutureStub(channel, callOptions);
}
};
return AgentsFutureStub.newStub(factory, channel);
}
/**
*
*
*
* Service for managing [Agents][google.cloud.dialogflow.cx.v3beta1.Agent].
*
*/
public abstract static class AgentsImplBase implements io.grpc.BindableService {
/**
*
*
*
* Returns the list of all agents in the specified location.
*
*/
public void listAgents(
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getListAgentsMethod(), responseObserver);
}
/**
*
*
*
* Retrieves the specified agent.
*
*/
public void getAgent(
com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getGetAgentMethod(), responseObserver);
}
/**
*
*
*
* Creates an agent in the specified location.
*
*/
public void createAgent(
com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getCreateAgentMethod(), responseObserver);
}
/**
*
*
*
* Updates the specified agent.
*
*/
public void updateAgent(
com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnimplementedUnaryCall(getUpdateAgentMethod(), responseObserver);
}
/**
*
*
*
* Deletes the specified agent.
*
*/
public void deleteAgent(
com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getDeleteAgentMethod(), responseObserver);
}
/**
*
*
*
* Exports the specified agent to a ZIP file.
*
*/
public void exportAgent(
com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getExportAgentMethod(), responseObserver);
}
/**
*
*
*
* Restores the specified agent from a ZIP file.
* Note that all existing intents, intent routes, entity types, pages and
* webhooks in the agent will be deleted.
*
*/
public void restoreAgent(
com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getRestoreAgentMethod(), responseObserver);
}
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getListAgentsMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest,
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse>(
this, METHODID_LIST_AGENTS)))
.addMethod(
getGetAgentMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>(this, METHODID_GET_AGENT)))
.addMethod(
getCreateAgentMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>(this, METHODID_CREATE_AGENT)))
.addMethod(
getUpdateAgentMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest,
com.google.cloud.dialogflow.cx.v3beta1.Agent>(this, METHODID_UPDATE_AGENT)))
.addMethod(
getDeleteAgentMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest,
com.google.protobuf.Empty>(this, METHODID_DELETE_AGENT)))
.addMethod(
getExportAgentMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest,
com.google.longrunning.Operation>(this, METHODID_EXPORT_AGENT)))
.addMethod(
getRestoreAgentMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest,
com.google.longrunning.Operation>(this, METHODID_RESTORE_AGENT)))
.build();
}
}
/**
*
*
*
* Service for managing [Agents][google.cloud.dialogflow.cx.v3beta1.Agent].
*
*/
public static final class AgentsStub extends io.grpc.stub.AbstractAsyncStub {
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);
}
/**
*
*
*
* Returns the list of all agents in the specified location.
*
*/
public void listAgents(
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getListAgentsMethod(), getCallOptions()), request, responseObserver);
}
/**
*
*
*
* Retrieves the specified agent.
*
*/
public void getAgent(
com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetAgentMethod(), getCallOptions()), request, responseObserver);
}
/**
*
*
*
* Creates an agent in the specified location.
*
*/
public void createAgent(
com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getCreateAgentMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Updates the specified agent.
*
*/
public void updateAgent(
com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
asyncUnaryCall(
getChannel().newCall(getUpdateAgentMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Deletes the specified agent.
*
*/
public void deleteAgent(
com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getDeleteAgentMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Exports the specified agent to a ZIP file.
*
*/
public void exportAgent(
com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getExportAgentMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Restores the specified agent from a ZIP file.
* Note that all existing intents, intent routes, entity types, pages and
* webhooks in the agent will be deleted.
*
*/
public void restoreAgent(
com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getRestoreAgentMethod(), getCallOptions()),
request,
responseObserver);
}
}
/**
*
*
*
* Service for managing [Agents][google.cloud.dialogflow.cx.v3beta1.Agent].
*
*/
public static final class AgentsBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
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);
}
/**
*
*
*
* Returns the list of all agents in the specified location.
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse listAgents(
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest request) {
return blockingUnaryCall(getChannel(), getListAgentsMethod(), getCallOptions(), request);
}
/**
*
*
*
* Retrieves the specified agent.
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Agent getAgent(
com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest request) {
return blockingUnaryCall(getChannel(), getGetAgentMethod(), getCallOptions(), request);
}
/**
*
*
*
* Creates an agent in the specified location.
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Agent createAgent(
com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest request) {
return blockingUnaryCall(getChannel(), getCreateAgentMethod(), getCallOptions(), request);
}
/**
*
*
*
* Updates the specified agent.
*
*/
public com.google.cloud.dialogflow.cx.v3beta1.Agent updateAgent(
com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest request) {
return blockingUnaryCall(getChannel(), getUpdateAgentMethod(), getCallOptions(), request);
}
/**
*
*
*
* Deletes the specified agent.
*
*/
public com.google.protobuf.Empty deleteAgent(
com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest request) {
return blockingUnaryCall(getChannel(), getDeleteAgentMethod(), getCallOptions(), request);
}
/**
*
*
*
* Exports the specified agent to a ZIP file.
*
*/
public com.google.longrunning.Operation exportAgent(
com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest request) {
return blockingUnaryCall(getChannel(), getExportAgentMethod(), getCallOptions(), request);
}
/**
*
*
*
* Restores the specified agent from a ZIP file.
* Note that all existing intents, intent routes, entity types, pages and
* webhooks in the agent will be deleted.
*
*/
public com.google.longrunning.Operation restoreAgent(
com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest request) {
return blockingUnaryCall(getChannel(), getRestoreAgentMethod(), getCallOptions(), request);
}
}
/**
*
*
*
* Service for managing [Agents][google.cloud.dialogflow.cx.v3beta1.Agent].
*
*/
public static final class AgentsFutureStub
extends io.grpc.stub.AbstractFutureStub {
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);
}
/**
*
*
*
* Returns the list of all agents in the specified location.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse>
listAgents(com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest request) {
return futureUnaryCall(
getChannel().newCall(getListAgentsMethod(), getCallOptions()), request);
}
/**
*
*
*
* Retrieves the specified agent.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.cx.v3beta1.Agent>
getAgent(com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest request) {
return futureUnaryCall(getChannel().newCall(getGetAgentMethod(), getCallOptions()), request);
}
/**
*
*
*
* Creates an agent in the specified location.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.cx.v3beta1.Agent>
createAgent(com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getCreateAgentMethod(), getCallOptions()), request);
}
/**
*
*
*
* Updates the specified agent.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.cx.v3beta1.Agent>
updateAgent(com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getUpdateAgentMethod(), getCallOptions()), request);
}
/**
*
*
*
* Deletes the specified agent.
*
*/
public com.google.common.util.concurrent.ListenableFuture
deleteAgent(com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getDeleteAgentMethod(), getCallOptions()), request);
}
/**
*
*
*
* Exports the specified agent to a ZIP file.
*
*/
public com.google.common.util.concurrent.ListenableFuture
exportAgent(com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getExportAgentMethod(), getCallOptions()), request);
}
/**
*
*
*
* Restores the specified agent from a ZIP file.
* Note that all existing intents, intent routes, entity types, pages and
* webhooks in the agent will be deleted.
*
*/
public com.google.common.util.concurrent.ListenableFuture
restoreAgent(com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest request) {
return futureUnaryCall(
getChannel().newCall(getRestoreAgentMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST_AGENTS = 0;
private static final int METHODID_GET_AGENT = 1;
private static final int METHODID_CREATE_AGENT = 2;
private static final int METHODID_UPDATE_AGENT = 3;
private static final int METHODID_DELETE_AGENT = 4;
private static final int METHODID_EXPORT_AGENT = 5;
private static final int METHODID_RESTORE_AGENT = 6;
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_LIST_AGENTS:
serviceImpl.listAgents(
(com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse>)
responseObserver);
break;
case METHODID_GET_AGENT:
serviceImpl.getAgent(
(com.google.cloud.dialogflow.cx.v3beta1.GetAgentRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_CREATE_AGENT:
serviceImpl.createAgent(
(com.google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_UPDATE_AGENT:
serviceImpl.updateAgent(
(com.google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_DELETE_AGENT:
serviceImpl.deleteAgent(
(com.google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXPORT_AGENT:
serviceImpl.exportAgent(
(com.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_RESTORE_AGENT:
serviceImpl.restoreAgent(
(com.google.cloud.dialogflow.cx.v3beta1.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 abstract static 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.cx.v3beta1.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(getListAgentsMethod())
.addMethod(getGetAgentMethod())
.addMethod(getCreateAgentMethod())
.addMethod(getUpdateAgentMethod())
.addMethod(getDeleteAgentMethod())
.addMethod(getExportAgentMethod())
.addMethod(getRestoreAgentMethod())
.build();
}
}
}
return result;
}
}