com.google.cloud.dialogflow.cx.v3.GeneratorsGrpc 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-v3 Show documentation
Show all versions of grpc-google-cloud-dialogflow-cx-v3 Show documentation
GRPC library for grpc-google-cloud-dialogflow-cx-v3
The newest version!
/*
* Copyright 2024 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.v3;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
*
*
* Service for managing [Generators][google.cloud.dialogflow.cx.v3.Generator]
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/dialogflow/cx/v3/generator.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class GeneratorsGrpc {
private GeneratorsGrpc() {}
public static final java.lang.String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.Generators";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest,
com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse>
getListGeneratorsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListGenerators",
requestType = com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest.class,
responseType = com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest,
com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse>
getListGeneratorsMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest,
com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse>
getListGeneratorsMethod;
if ((getListGeneratorsMethod = GeneratorsGrpc.getListGeneratorsMethod) == null) {
synchronized (GeneratorsGrpc.class) {
if ((getListGeneratorsMethod = GeneratorsGrpc.getListGeneratorsMethod) == null) {
GeneratorsGrpc.getListGeneratorsMethod =
getListGeneratorsMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListGenerators"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse
.getDefaultInstance()))
.setSchemaDescriptor(new GeneratorsMethodDescriptorSupplier("ListGenerators"))
.build();
}
}
}
return getListGeneratorsMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>
getGetGeneratorMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetGenerator",
requestType = com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest.class,
responseType = com.google.cloud.dialogflow.cx.v3.Generator.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>
getGetGeneratorMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>
getGetGeneratorMethod;
if ((getGetGeneratorMethod = GeneratorsGrpc.getGetGeneratorMethod) == null) {
synchronized (GeneratorsGrpc.class) {
if ((getGetGeneratorMethod = GeneratorsGrpc.getGetGeneratorMethod) == null) {
GeneratorsGrpc.getGetGeneratorMethod =
getGetGeneratorMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGenerator"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3.Generator.getDefaultInstance()))
.setSchemaDescriptor(new GeneratorsMethodDescriptorSupplier("GetGenerator"))
.build();
}
}
}
return getGetGeneratorMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>
getCreateGeneratorMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateGenerator",
requestType = com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest.class,
responseType = com.google.cloud.dialogflow.cx.v3.Generator.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>
getCreateGeneratorMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>
getCreateGeneratorMethod;
if ((getCreateGeneratorMethod = GeneratorsGrpc.getCreateGeneratorMethod) == null) {
synchronized (GeneratorsGrpc.class) {
if ((getCreateGeneratorMethod = GeneratorsGrpc.getCreateGeneratorMethod) == null) {
GeneratorsGrpc.getCreateGeneratorMethod =
getCreateGeneratorMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateGenerator"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3.Generator.getDefaultInstance()))
.setSchemaDescriptor(
new GeneratorsMethodDescriptorSupplier("CreateGenerator"))
.build();
}
}
}
return getCreateGeneratorMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>
getUpdateGeneratorMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "UpdateGenerator",
requestType = com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest.class,
responseType = com.google.cloud.dialogflow.cx.v3.Generator.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>
getUpdateGeneratorMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>
getUpdateGeneratorMethod;
if ((getUpdateGeneratorMethod = GeneratorsGrpc.getUpdateGeneratorMethod) == null) {
synchronized (GeneratorsGrpc.class) {
if ((getUpdateGeneratorMethod = GeneratorsGrpc.getUpdateGeneratorMethod) == null) {
GeneratorsGrpc.getUpdateGeneratorMethod =
getUpdateGeneratorMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateGenerator"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3.Generator.getDefaultInstance()))
.setSchemaDescriptor(
new GeneratorsMethodDescriptorSupplier("UpdateGenerator"))
.build();
}
}
}
return getUpdateGeneratorMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest, com.google.protobuf.Empty>
getDeleteGeneratorMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeleteGenerator",
requestType = com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest, com.google.protobuf.Empty>
getDeleteGeneratorMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest, com.google.protobuf.Empty>
getDeleteGeneratorMethod;
if ((getDeleteGeneratorMethod = GeneratorsGrpc.getDeleteGeneratorMethod) == null) {
synchronized (GeneratorsGrpc.class) {
if ((getDeleteGeneratorMethod = GeneratorsGrpc.getDeleteGeneratorMethod) == null) {
GeneratorsGrpc.getDeleteGeneratorMethod =
getDeleteGeneratorMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteGenerator"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(
new GeneratorsMethodDescriptorSupplier("DeleteGenerator"))
.build();
}
}
}
return getDeleteGeneratorMethod;
}
/** Creates a new async stub that supports all call types for the service */
public static GeneratorsStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public GeneratorsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GeneratorsStub(channel, callOptions);
}
};
return GeneratorsStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static GeneratorsBlockingStub newBlockingStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public GeneratorsBlockingStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GeneratorsBlockingStub(channel, callOptions);
}
};
return GeneratorsBlockingStub.newStub(factory, channel);
}
/** Creates a new ListenableFuture-style stub that supports unary calls on the service */
public static GeneratorsFutureStub newFutureStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public GeneratorsFutureStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GeneratorsFutureStub(channel, callOptions);
}
};
return GeneratorsFutureStub.newStub(factory, channel);
}
/**
*
*
*
* Service for managing [Generators][google.cloud.dialogflow.cx.v3.Generator]
*
*/
public interface AsyncService {
/**
*
*
*
* Returns the list of all generators in the specified agent.
*
*/
default void listGenerators(
com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getListGeneratorsMethod(), responseObserver);
}
/**
*
*
*
* Retrieves the specified generator.
*
*/
default void getGenerator(
com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getGetGeneratorMethod(), responseObserver);
}
/**
*
*
*
* Creates a generator in the specified agent.
*
*/
default void createGenerator(
com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getCreateGeneratorMethod(), responseObserver);
}
/**
*
*
*
* Update the specified generator.
*
*/
default void updateGenerator(
com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getUpdateGeneratorMethod(), responseObserver);
}
/**
*
*
*
* Deletes the specified generators.
*
*/
default void deleteGenerator(
com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getDeleteGeneratorMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Generators.
*
*
* Service for managing [Generators][google.cloud.dialogflow.cx.v3.Generator]
*
*/
public abstract static class GeneratorsImplBase implements io.grpc.BindableService, AsyncService {
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return GeneratorsGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Generators.
*
*
* Service for managing [Generators][google.cloud.dialogflow.cx.v3.Generator]
*
*/
public static final class GeneratorsStub extends io.grpc.stub.AbstractAsyncStub {
private GeneratorsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GeneratorsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GeneratorsStub(channel, callOptions);
}
/**
*
*
*
* Returns the list of all generators in the specified agent.
*
*/
public void listGenerators(
com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListGeneratorsMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Retrieves the specified generator.
*
*/
public void getGenerator(
com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetGeneratorMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Creates a generator in the specified agent.
*
*/
public void createGenerator(
com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateGeneratorMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Update the specified generator.
*
*/
public void updateGenerator(
com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUpdateGeneratorMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Deletes the specified generators.
*
*/
public void deleteGenerator(
com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeleteGeneratorMethod(), getCallOptions()),
request,
responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service Generators.
*
*
* Service for managing [Generators][google.cloud.dialogflow.cx.v3.Generator]
*
*/
public static final class GeneratorsBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private GeneratorsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GeneratorsBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GeneratorsBlockingStub(channel, callOptions);
}
/**
*
*
*
* Returns the list of all generators in the specified agent.
*
*/
public com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse listGenerators(
com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListGeneratorsMethod(), getCallOptions(), request);
}
/**
*
*
*
* Retrieves the specified generator.
*
*/
public com.google.cloud.dialogflow.cx.v3.Generator getGenerator(
com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetGeneratorMethod(), getCallOptions(), request);
}
/**
*
*
*
* Creates a generator in the specified agent.
*
*/
public com.google.cloud.dialogflow.cx.v3.Generator createGenerator(
com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateGeneratorMethod(), getCallOptions(), request);
}
/**
*
*
*
* Update the specified generator.
*
*/
public com.google.cloud.dialogflow.cx.v3.Generator updateGenerator(
com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateGeneratorMethod(), getCallOptions(), request);
}
/**
*
*
*
* Deletes the specified generators.
*
*/
public com.google.protobuf.Empty deleteGenerator(
com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteGeneratorMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Generators.
*
*
* Service for managing [Generators][google.cloud.dialogflow.cx.v3.Generator]
*
*/
public static final class GeneratorsFutureStub
extends io.grpc.stub.AbstractFutureStub {
private GeneratorsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GeneratorsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GeneratorsFutureStub(channel, callOptions);
}
/**
*
*
*
* Returns the list of all generators in the specified agent.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse>
listGenerators(com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListGeneratorsMethod(), getCallOptions()), request);
}
/**
*
*
*
* Retrieves the specified generator.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.cx.v3.Generator>
getGenerator(com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetGeneratorMethod(), getCallOptions()), request);
}
/**
*
*
*
* Creates a generator in the specified agent.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.cx.v3.Generator>
createGenerator(com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateGeneratorMethod(), getCallOptions()), request);
}
/**
*
*
*
* Update the specified generator.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.cx.v3.Generator>
updateGenerator(com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUpdateGeneratorMethod(), getCallOptions()), request);
}
/**
*
*
*
* Deletes the specified generators.
*
*/
public com.google.common.util.concurrent.ListenableFuture
deleteGenerator(com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeleteGeneratorMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST_GENERATORS = 0;
private static final int METHODID_GET_GENERATOR = 1;
private static final int METHODID_CREATE_GENERATOR = 2;
private static final int METHODID_UPDATE_GENERATOR = 3;
private static final int METHODID_DELETE_GENERATOR = 4;
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 AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService 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_GENERATORS:
serviceImpl.listGenerators(
(com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest) request,
(io.grpc.stub.StreamObserver<
com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse>)
responseObserver);
break;
case METHODID_GET_GENERATOR:
serviceImpl.getGenerator(
(com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_CREATE_GENERATOR:
serviceImpl.createGenerator(
(com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_UPDATE_GENERATOR:
serviceImpl.updateGenerator(
(com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_DELETE_GENERATOR:
serviceImpl.deleteGenerator(
(com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest) 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();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getListGeneratorsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3.ListGeneratorsRequest,
com.google.cloud.dialogflow.cx.v3.ListGeneratorsResponse>(
service, METHODID_LIST_GENERATORS)))
.addMethod(
getGetGeneratorMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3.GetGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>(service, METHODID_GET_GENERATOR)))
.addMethod(
getCreateGeneratorMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3.CreateGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>(
service, METHODID_CREATE_GENERATOR)))
.addMethod(
getUpdateGeneratorMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3.UpdateGeneratorRequest,
com.google.cloud.dialogflow.cx.v3.Generator>(
service, METHODID_UPDATE_GENERATOR)))
.addMethod(
getDeleteGeneratorMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dialogflow.cx.v3.DeleteGeneratorRequest,
com.google.protobuf.Empty>(service, METHODID_DELETE_GENERATOR)))
.build();
}
private abstract static class GeneratorsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
GeneratorsBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.dialogflow.cx.v3.GeneratorProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Generators");
}
}
private static final class GeneratorsFileDescriptorSupplier
extends GeneratorsBaseDescriptorSupplier {
GeneratorsFileDescriptorSupplier() {}
}
private static final class GeneratorsMethodDescriptorSupplier
extends GeneratorsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
GeneratorsMethodDescriptorSupplier(java.lang.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 (GeneratorsGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new GeneratorsFileDescriptorSupplier())
.addMethod(getListGeneratorsMethod())
.addMethod(getGetGeneratorMethod())
.addMethod(getCreateGeneratorMethod())
.addMethod(getUpdateGeneratorMethod())
.addMethod(getDeleteGeneratorMethod())
.build();
}
}
}
return result;
}
}