com.figure.block.api.proto.groups.ProposalServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-proto Show documentation
Show all versions of api-proto Show documentation
gRPC client code to interact with Figures off chain Provenance data
The newest version!
package com.figure.block.api.proto.groups;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.56.0)",
comments = "Source: groups/proposal-server.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ProposalServiceGrpc {
private ProposalServiceGrpc() {}
public static final String SERVICE_NAME = "api.groups.ProposalService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getLatestProposalStateMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "LatestProposalState",
requestType = com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateRequest.class,
responseType = com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getLatestProposalStateMethod() {
io.grpc.MethodDescriptor getLatestProposalStateMethod;
if ((getLatestProposalStateMethod = ProposalServiceGrpc.getLatestProposalStateMethod) == null) {
synchronized (ProposalServiceGrpc.class) {
if ((getLatestProposalStateMethod = ProposalServiceGrpc.getLatestProposalStateMethod) == null) {
ProposalServiceGrpc.getLatestProposalStateMethod = getLatestProposalStateMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "LatestProposalState"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateResponse.getDefaultInstance()))
.setSchemaDescriptor(new ProposalServiceMethodDescriptorSupplier("LatestProposalState"))
.build();
}
}
}
return getLatestProposalStateMethod;
}
private static volatile io.grpc.MethodDescriptor getAllProposalStatesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "AllProposalStates",
requestType = com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesRequest.class,
responseType = com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getAllProposalStatesMethod() {
io.grpc.MethodDescriptor getAllProposalStatesMethod;
if ((getAllProposalStatesMethod = ProposalServiceGrpc.getAllProposalStatesMethod) == null) {
synchronized (ProposalServiceGrpc.class) {
if ((getAllProposalStatesMethod = ProposalServiceGrpc.getAllProposalStatesMethod) == null) {
ProposalServiceGrpc.getAllProposalStatesMethod = getAllProposalStatesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "AllProposalStates"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesResponse.getDefaultInstance()))
.setSchemaDescriptor(new ProposalServiceMethodDescriptorSupplier("AllProposalStates"))
.build();
}
}
}
return getAllProposalStatesMethod;
}
private static volatile io.grpc.MethodDescriptor getLatestProposalStatesByGroupIdMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "LatestProposalStatesByGroupId",
requestType = com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdRequest.class,
responseType = com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getLatestProposalStatesByGroupIdMethod() {
io.grpc.MethodDescriptor getLatestProposalStatesByGroupIdMethod;
if ((getLatestProposalStatesByGroupIdMethod = ProposalServiceGrpc.getLatestProposalStatesByGroupIdMethod) == null) {
synchronized (ProposalServiceGrpc.class) {
if ((getLatestProposalStatesByGroupIdMethod = ProposalServiceGrpc.getLatestProposalStatesByGroupIdMethod) == null) {
ProposalServiceGrpc.getLatestProposalStatesByGroupIdMethod = getLatestProposalStatesByGroupIdMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "LatestProposalStatesByGroupId"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdResponse.getDefaultInstance()))
.setSchemaDescriptor(new ProposalServiceMethodDescriptorSupplier("LatestProposalStatesByGroupId"))
.build();
}
}
}
return getLatestProposalStatesByGroupIdMethod;
}
private static volatile io.grpc.MethodDescriptor getStreamLatestProposalStatesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "StreamLatestProposalStates",
requestType = com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesRequest.class,
responseType = com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getStreamLatestProposalStatesMethod() {
io.grpc.MethodDescriptor getStreamLatestProposalStatesMethod;
if ((getStreamLatestProposalStatesMethod = ProposalServiceGrpc.getStreamLatestProposalStatesMethod) == null) {
synchronized (ProposalServiceGrpc.class) {
if ((getStreamLatestProposalStatesMethod = ProposalServiceGrpc.getStreamLatestProposalStatesMethod) == null) {
ProposalServiceGrpc.getStreamLatestProposalStatesMethod = getStreamLatestProposalStatesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamLatestProposalStates"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesResponse.getDefaultInstance()))
.setSchemaDescriptor(new ProposalServiceMethodDescriptorSupplier("StreamLatestProposalStates"))
.build();
}
}
}
return getStreamLatestProposalStatesMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ProposalServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ProposalServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ProposalServiceStub(channel, callOptions);
}
};
return ProposalServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ProposalServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ProposalServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ProposalServiceBlockingStub(channel, callOptions);
}
};
return ProposalServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ProposalServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ProposalServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ProposalServiceFutureStub(channel, callOptions);
}
};
return ProposalServiceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void latestProposalState(com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLatestProposalStateMethod(), responseObserver);
}
/**
*/
default void allProposalStates(com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAllProposalStatesMethod(), responseObserver);
}
/**
*/
default void latestProposalStatesByGroupId(com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLatestProposalStatesByGroupIdMethod(), responseObserver);
}
/**
*/
default void streamLatestProposalStates(com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStreamLatestProposalStatesMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service ProposalService.
*/
public static abstract class ProposalServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return ProposalServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service ProposalService.
*/
public static final class ProposalServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private ProposalServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ProposalServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ProposalServiceStub(channel, callOptions);
}
/**
*/
public void latestProposalState(com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getLatestProposalStateMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void allProposalStates(com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getAllProposalStatesMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void latestProposalStatesByGroupId(com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getLatestProposalStatesByGroupIdMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void streamLatestProposalStates(com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getStreamLatestProposalStatesMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service ProposalService.
*/
public static final class ProposalServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private ProposalServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ProposalServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ProposalServiceBlockingStub(channel, callOptions);
}
/**
*/
public com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateResponse latestProposalState(com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getLatestProposalStateMethod(), getCallOptions(), request);
}
/**
*/
public com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesResponse allProposalStates(com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getAllProposalStatesMethod(), getCallOptions(), request);
}
/**
*/
public com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdResponse latestProposalStatesByGroupId(com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getLatestProposalStatesByGroupIdMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator streamLatestProposalStates(
com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getStreamLatestProposalStatesMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service ProposalService.
*/
public static final class ProposalServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private ProposalServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ProposalServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ProposalServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture latestProposalState(
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getLatestProposalStateMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture allProposalStates(
com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getAllProposalStatesMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture latestProposalStatesByGroupId(
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getLatestProposalStatesByGroupIdMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LATEST_PROPOSAL_STATE = 0;
private static final int METHODID_ALL_PROPOSAL_STATES = 1;
private static final int METHODID_LATEST_PROPOSAL_STATES_BY_GROUP_ID = 2;
private static final int METHODID_STREAM_LATEST_PROPOSAL_STATES = 3;
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_LATEST_PROPOSAL_STATE:
serviceImpl.latestProposalState((com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_ALL_PROPOSAL_STATES:
serviceImpl.allProposalStates((com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LATEST_PROPOSAL_STATES_BY_GROUP_ID:
serviceImpl.latestProposalStatesByGroupId((com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_STREAM_LATEST_PROPOSAL_STATES:
serviceImpl.streamLatestProposalStates((com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesRequest) 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(
getLatestProposalStateMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateRequest,
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStateResponse>(
service, METHODID_LATEST_PROPOSAL_STATE)))
.addMethod(
getAllProposalStatesMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesRequest,
com.figure.block.api.proto.groups.ProposalServer.AllProposalStatesResponse>(
service, METHODID_ALL_PROPOSAL_STATES)))
.addMethod(
getLatestProposalStatesByGroupIdMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdRequest,
com.figure.block.api.proto.groups.ProposalServer.LatestProposalStatesByGroupIdResponse>(
service, METHODID_LATEST_PROPOSAL_STATES_BY_GROUP_ID)))
.addMethod(
getStreamLatestProposalStatesMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesRequest,
com.figure.block.api.proto.groups.ProposalServer.StreamLatestProposalStatesResponse>(
service, METHODID_STREAM_LATEST_PROPOSAL_STATES)))
.build();
}
private static abstract class ProposalServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ProposalServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.figure.block.api.proto.groups.ProposalServer.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ProposalService");
}
}
private static final class ProposalServiceFileDescriptorSupplier
extends ProposalServiceBaseDescriptorSupplier {
ProposalServiceFileDescriptorSupplier() {}
}
private static final class ProposalServiceMethodDescriptorSupplier
extends ProposalServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
ProposalServiceMethodDescriptorSupplier(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 (ProposalServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ProposalServiceFileDescriptorSupplier())
.addMethod(getLatestProposalStateMethod())
.addMethod(getAllProposalStatesMethod())
.addMethod(getLatestProposalStatesByGroupIdMethod())
.addMethod(getStreamLatestProposalStatesMethod())
.build();
}
}
}
return result;
}
}