cloud.prefab.domain.IdServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prefab-cloud-java Show documentation
Show all versions of prefab-cloud-java Show documentation
API Client for https://prefab.cloud: rate limits, feature flags and semaphores as a service
The newest version!
package cloud.prefab.domain;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.48.0)",
comments = "Source: prefab.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class IdServiceGrpc {
private IdServiceGrpc() {}
public static final String SERVICE_NAME = "prefab.IdService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetBlockMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetBlock",
requestType = cloud.prefab.domain.Prefab.IdBlockRequest.class,
responseType = cloud.prefab.domain.Prefab.IdBlock.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetBlockMethod() {
io.grpc.MethodDescriptor getGetBlockMethod;
if ((getGetBlockMethod = IdServiceGrpc.getGetBlockMethod) == null) {
synchronized (IdServiceGrpc.class) {
if ((getGetBlockMethod = IdServiceGrpc.getGetBlockMethod) == null) {
IdServiceGrpc.getGetBlockMethod = getGetBlockMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlock"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cloud.prefab.domain.Prefab.IdBlockRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cloud.prefab.domain.Prefab.IdBlock.getDefaultInstance()))
.setSchemaDescriptor(new IdServiceMethodDescriptorSupplier("GetBlock"))
.build();
}
}
}
return getGetBlockMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static IdServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IdServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IdServiceStub(channel, callOptions);
}
};
return IdServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static IdServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IdServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IdServiceBlockingStub(channel, callOptions);
}
};
return IdServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static IdServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IdServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IdServiceFutureStub(channel, callOptions);
}
};
return IdServiceFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class IdServiceImplBase implements io.grpc.BindableService {
/**
*/
public void getBlock(cloud.prefab.domain.Prefab.IdBlockRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetBlockMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
cloud.prefab.domain.Prefab.IdBlockRequest,
cloud.prefab.domain.Prefab.IdBlock>(
this, METHODID_GET_BLOCK)))
.build();
}
}
/**
*/
public static final class IdServiceStub extends io.grpc.stub.AbstractAsyncStub {
private IdServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IdServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IdServiceStub(channel, callOptions);
}
/**
*/
public void getBlock(cloud.prefab.domain.Prefab.IdBlockRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetBlockMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class IdServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private IdServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IdServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IdServiceBlockingStub(channel, callOptions);
}
/**
*/
public cloud.prefab.domain.Prefab.IdBlock getBlock(cloud.prefab.domain.Prefab.IdBlockRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetBlockMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class IdServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private IdServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IdServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IdServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture getBlock(
cloud.prefab.domain.Prefab.IdBlockRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetBlockMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_BLOCK = 0;
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 IdServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(IdServiceImplBase 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_BLOCK:
serviceImpl.getBlock((cloud.prefab.domain.Prefab.IdBlockRequest) 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 IdServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
IdServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return cloud.prefab.domain.Prefab.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("IdService");
}
}
private static final class IdServiceFileDescriptorSupplier
extends IdServiceBaseDescriptorSupplier {
IdServiceFileDescriptorSupplier() {}
}
private static final class IdServiceMethodDescriptorSupplier
extends IdServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
IdServiceMethodDescriptorSupplier(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 (IdServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new IdServiceFileDescriptorSupplier())
.addMethod(getGetBlockMethod())
.build();
}
}
}
return result;
}
}