com.smoketurner.snowizard.grpc.protos.SnowizardGrpc Maven / Gradle / Ivy
The newest version!
package com.smoketurner.snowizard.grpc.protos;
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;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.14.0)",
comments = "Source: snowizard.proto")
public final class SnowizardGrpc {
private SnowizardGrpc() {}
public static final String SERVICE_NAME = "snowizard.Snowizard";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetIdMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetId",
requestType = com.google.protobuf.Empty.class,
responseType = com.smoketurner.snowizard.grpc.protos.SnowizardResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetIdMethod() {
io.grpc.MethodDescriptor getGetIdMethod;
if ((getGetIdMethod = SnowizardGrpc.getGetIdMethod) == null) {
synchronized (SnowizardGrpc.class) {
if ((getGetIdMethod = SnowizardGrpc.getGetIdMethod) == null) {
SnowizardGrpc.getGetIdMethod = getGetIdMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"snowizard.Snowizard", "GetId"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.smoketurner.snowizard.grpc.protos.SnowizardResponse.getDefaultInstance()))
.setSchemaDescriptor(new SnowizardMethodDescriptorSupplier("GetId"))
.build();
}
}
}
return getGetIdMethod;
}
private static volatile io.grpc.MethodDescriptor getGetIdsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetIds",
requestType = com.smoketurner.snowizard.grpc.protos.SnowizardRequest.class,
responseType = com.smoketurner.snowizard.grpc.protos.SnowizardResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getGetIdsMethod() {
io.grpc.MethodDescriptor getGetIdsMethod;
if ((getGetIdsMethod = SnowizardGrpc.getGetIdsMethod) == null) {
synchronized (SnowizardGrpc.class) {
if ((getGetIdsMethod = SnowizardGrpc.getGetIdsMethod) == null) {
SnowizardGrpc.getGetIdsMethod = getGetIdsMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(
"snowizard.Snowizard", "GetIds"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.smoketurner.snowizard.grpc.protos.SnowizardRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.smoketurner.snowizard.grpc.protos.SnowizardResponse.getDefaultInstance()))
.setSchemaDescriptor(new SnowizardMethodDescriptorSupplier("GetIds"))
.build();
}
}
}
return getGetIdsMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static SnowizardStub newStub(io.grpc.Channel channel) {
return new SnowizardStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static SnowizardBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new SnowizardBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static SnowizardFutureStub newFutureStub(
io.grpc.Channel channel) {
return new SnowizardFutureStub(channel);
}
/**
*/
public static abstract class SnowizardImplBase implements io.grpc.BindableService {
/**
*/
public void getId(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetIdMethod(), responseObserver);
}
/**
*/
public void getIds(com.smoketurner.snowizard.grpc.protos.SnowizardRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetIdsMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetIdMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
com.smoketurner.snowizard.grpc.protos.SnowizardResponse>(
this, METHODID_GET_ID)))
.addMethod(
getGetIdsMethod(),
asyncServerStreamingCall(
new MethodHandlers<
com.smoketurner.snowizard.grpc.protos.SnowizardRequest,
com.smoketurner.snowizard.grpc.protos.SnowizardResponse>(
this, METHODID_GET_IDS)))
.build();
}
}
/**
*/
public static final class SnowizardStub extends io.grpc.stub.AbstractStub {
private SnowizardStub(io.grpc.Channel channel) {
super(channel);
}
private SnowizardStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SnowizardStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SnowizardStub(channel, callOptions);
}
/**
*/
public void getId(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetIdMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getIds(com.smoketurner.snowizard.grpc.protos.SnowizardRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(getGetIdsMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class SnowizardBlockingStub extends io.grpc.stub.AbstractStub {
private SnowizardBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private SnowizardBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SnowizardBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SnowizardBlockingStub(channel, callOptions);
}
/**
*/
public com.smoketurner.snowizard.grpc.protos.SnowizardResponse getId(com.google.protobuf.Empty request) {
return blockingUnaryCall(
getChannel(), getGetIdMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator getIds(
com.smoketurner.snowizard.grpc.protos.SnowizardRequest request) {
return blockingServerStreamingCall(
getChannel(), getGetIdsMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class SnowizardFutureStub extends io.grpc.stub.AbstractStub {
private SnowizardFutureStub(io.grpc.Channel channel) {
super(channel);
}
private SnowizardFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SnowizardFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SnowizardFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture getId(
com.google.protobuf.Empty request) {
return futureUnaryCall(
getChannel().newCall(getGetIdMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_ID = 0;
private static final int METHODID_GET_IDS = 1;
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 SnowizardImplBase serviceImpl;
private final int methodId;
MethodHandlers(SnowizardImplBase 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_ID:
serviceImpl.getId((com.google.protobuf.Empty) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_IDS:
serviceImpl.getIds((com.smoketurner.snowizard.grpc.protos.SnowizardRequest) 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 SnowizardBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
SnowizardBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.smoketurner.snowizard.grpc.protos.SnowizardProtos.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Snowizard");
}
}
private static final class SnowizardFileDescriptorSupplier
extends SnowizardBaseDescriptorSupplier {
SnowizardFileDescriptorSupplier() {}
}
private static final class SnowizardMethodDescriptorSupplier
extends SnowizardBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
SnowizardMethodDescriptorSupplier(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 (SnowizardGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new SnowizardFileDescriptorSupplier())
.addMethod(getGetIdMethod())
.addMethod(getGetIdsMethod())
.build();
}
}
}
return result;
}
}