games.mythical.saga.sdk.proto.api.offer.OfferServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of saga-sdk-proto Show documentation
Show all versions of saga-sdk-proto Show documentation
Saga SDK for Java game servers
package games.mythical.saga.sdk.proto.api.offer;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.49.2)",
comments = "Source: api/offer/rpc.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class OfferServiceGrpc {
private OfferServiceGrpc() {}
public static final String SERVICE_NAME = "saga.api.offer.OfferService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getCreateOfferQuoteMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateOfferQuote",
requestType = games.mythical.saga.sdk.proto.api.offer.CreateOfferQuoteRequest.class,
responseType = games.mythical.saga.sdk.proto.common.ReceivedResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCreateOfferQuoteMethod() {
io.grpc.MethodDescriptor getCreateOfferQuoteMethod;
if ((getCreateOfferQuoteMethod = OfferServiceGrpc.getCreateOfferQuoteMethod) == null) {
synchronized (OfferServiceGrpc.class) {
if ((getCreateOfferQuoteMethod = OfferServiceGrpc.getCreateOfferQuoteMethod) == null) {
OfferServiceGrpc.getCreateOfferQuoteMethod = getCreateOfferQuoteMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateOfferQuote"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
games.mythical.saga.sdk.proto.api.offer.CreateOfferQuoteRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
games.mythical.saga.sdk.proto.common.ReceivedResponse.getDefaultInstance()))
.setSchemaDescriptor(new OfferServiceMethodDescriptorSupplier("CreateOfferQuote"))
.build();
}
}
}
return getCreateOfferQuoteMethod;
}
private static volatile io.grpc.MethodDescriptor getConfirmOfferMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ConfirmOffer",
requestType = games.mythical.saga.sdk.proto.api.offer.ConfirmOfferRequest.class,
responseType = games.mythical.saga.sdk.proto.common.ReceivedResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getConfirmOfferMethod() {
io.grpc.MethodDescriptor getConfirmOfferMethod;
if ((getConfirmOfferMethod = OfferServiceGrpc.getConfirmOfferMethod) == null) {
synchronized (OfferServiceGrpc.class) {
if ((getConfirmOfferMethod = OfferServiceGrpc.getConfirmOfferMethod) == null) {
OfferServiceGrpc.getConfirmOfferMethod = getConfirmOfferMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ConfirmOffer"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
games.mythical.saga.sdk.proto.api.offer.ConfirmOfferRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
games.mythical.saga.sdk.proto.common.ReceivedResponse.getDefaultInstance()))
.setSchemaDescriptor(new OfferServiceMethodDescriptorSupplier("ConfirmOffer"))
.build();
}
}
}
return getConfirmOfferMethod;
}
private static volatile io.grpc.MethodDescriptor getCancelOfferMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CancelOffer",
requestType = games.mythical.saga.sdk.proto.api.offer.CancelOfferRequest.class,
responseType = games.mythical.saga.sdk.proto.common.ReceivedResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCancelOfferMethod() {
io.grpc.MethodDescriptor getCancelOfferMethod;
if ((getCancelOfferMethod = OfferServiceGrpc.getCancelOfferMethod) == null) {
synchronized (OfferServiceGrpc.class) {
if ((getCancelOfferMethod = OfferServiceGrpc.getCancelOfferMethod) == null) {
OfferServiceGrpc.getCancelOfferMethod = getCancelOfferMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelOffer"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
games.mythical.saga.sdk.proto.api.offer.CancelOfferRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
games.mythical.saga.sdk.proto.common.ReceivedResponse.getDefaultInstance()))
.setSchemaDescriptor(new OfferServiceMethodDescriptorSupplier("CancelOffer"))
.build();
}
}
}
return getCancelOfferMethod;
}
private static volatile io.grpc.MethodDescriptor getGetOffersMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetOffers",
requestType = games.mythical.saga.sdk.proto.api.offer.GetOffersRequest.class,
responseType = games.mythical.saga.sdk.proto.api.offer.OffersProto.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetOffersMethod() {
io.grpc.MethodDescriptor getGetOffersMethod;
if ((getGetOffersMethod = OfferServiceGrpc.getGetOffersMethod) == null) {
synchronized (OfferServiceGrpc.class) {
if ((getGetOffersMethod = OfferServiceGrpc.getGetOffersMethod) == null) {
OfferServiceGrpc.getGetOffersMethod = getGetOffersMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOffers"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
games.mythical.saga.sdk.proto.api.offer.GetOffersRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
games.mythical.saga.sdk.proto.api.offer.OffersProto.getDefaultInstance()))
.setSchemaDescriptor(new OfferServiceMethodDescriptorSupplier("GetOffers"))
.build();
}
}
}
return getGetOffersMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static OfferServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public OfferServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OfferServiceStub(channel, callOptions);
}
};
return OfferServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static OfferServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public OfferServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OfferServiceBlockingStub(channel, callOptions);
}
};
return OfferServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static OfferServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public OfferServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OfferServiceFutureStub(channel, callOptions);
}
};
return OfferServiceFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class OfferServiceImplBase implements io.grpc.BindableService {
/**
*
* Create an Offer quote
*
*/
public void createOfferQuote(games.mythical.saga.sdk.proto.api.offer.CreateOfferQuoteRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateOfferQuoteMethod(), responseObserver);
}
/**
*
* Confirm the Offer
*
*/
public void confirmOffer(games.mythical.saga.sdk.proto.api.offer.ConfirmOfferRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfirmOfferMethod(), responseObserver);
}
/**
*
* Cancel the Offer
*
*/
public void cancelOffer(games.mythical.saga.sdk.proto.api.offer.CancelOfferRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCancelOfferMethod(), responseObserver);
}
/**
*
* Get Offers based on filters
*
*/
public void getOffers(games.mythical.saga.sdk.proto.api.offer.GetOffersRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOffersMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateOfferQuoteMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
games.mythical.saga.sdk.proto.api.offer.CreateOfferQuoteRequest,
games.mythical.saga.sdk.proto.common.ReceivedResponse>(
this, METHODID_CREATE_OFFER_QUOTE)))
.addMethod(
getConfirmOfferMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
games.mythical.saga.sdk.proto.api.offer.ConfirmOfferRequest,
games.mythical.saga.sdk.proto.common.ReceivedResponse>(
this, METHODID_CONFIRM_OFFER)))
.addMethod(
getCancelOfferMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
games.mythical.saga.sdk.proto.api.offer.CancelOfferRequest,
games.mythical.saga.sdk.proto.common.ReceivedResponse>(
this, METHODID_CANCEL_OFFER)))
.addMethod(
getGetOffersMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
games.mythical.saga.sdk.proto.api.offer.GetOffersRequest,
games.mythical.saga.sdk.proto.api.offer.OffersProto>(
this, METHODID_GET_OFFERS)))
.build();
}
}
/**
*/
public static final class OfferServiceStub extends io.grpc.stub.AbstractAsyncStub {
private OfferServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected OfferServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OfferServiceStub(channel, callOptions);
}
/**
*
* Create an Offer quote
*
*/
public void createOfferQuote(games.mythical.saga.sdk.proto.api.offer.CreateOfferQuoteRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateOfferQuoteMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Confirm the Offer
*
*/
public void confirmOffer(games.mythical.saga.sdk.proto.api.offer.ConfirmOfferRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getConfirmOfferMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Cancel the Offer
*
*/
public void cancelOffer(games.mythical.saga.sdk.proto.api.offer.CancelOfferRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCancelOfferMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Get Offers based on filters
*
*/
public void getOffers(games.mythical.saga.sdk.proto.api.offer.GetOffersRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetOffersMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class OfferServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private OfferServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected OfferServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OfferServiceBlockingStub(channel, callOptions);
}
/**
*
* Create an Offer quote
*
*/
public games.mythical.saga.sdk.proto.common.ReceivedResponse createOfferQuote(games.mythical.saga.sdk.proto.api.offer.CreateOfferQuoteRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateOfferQuoteMethod(), getCallOptions(), request);
}
/**
*
* Confirm the Offer
*
*/
public games.mythical.saga.sdk.proto.common.ReceivedResponse confirmOffer(games.mythical.saga.sdk.proto.api.offer.ConfirmOfferRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getConfirmOfferMethod(), getCallOptions(), request);
}
/**
*
* Cancel the Offer
*
*/
public games.mythical.saga.sdk.proto.common.ReceivedResponse cancelOffer(games.mythical.saga.sdk.proto.api.offer.CancelOfferRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCancelOfferMethod(), getCallOptions(), request);
}
/**
*
* Get Offers based on filters
*
*/
public games.mythical.saga.sdk.proto.api.offer.OffersProto getOffers(games.mythical.saga.sdk.proto.api.offer.GetOffersRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetOffersMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class OfferServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private OfferServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected OfferServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OfferServiceFutureStub(channel, callOptions);
}
/**
*
* Create an Offer quote
*
*/
public com.google.common.util.concurrent.ListenableFuture createOfferQuote(
games.mythical.saga.sdk.proto.api.offer.CreateOfferQuoteRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateOfferQuoteMethod(), getCallOptions()), request);
}
/**
*
* Confirm the Offer
*
*/
public com.google.common.util.concurrent.ListenableFuture confirmOffer(
games.mythical.saga.sdk.proto.api.offer.ConfirmOfferRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getConfirmOfferMethod(), getCallOptions()), request);
}
/**
*
* Cancel the Offer
*
*/
public com.google.common.util.concurrent.ListenableFuture cancelOffer(
games.mythical.saga.sdk.proto.api.offer.CancelOfferRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCancelOfferMethod(), getCallOptions()), request);
}
/**
*
* Get Offers based on filters
*
*/
public com.google.common.util.concurrent.ListenableFuture getOffers(
games.mythical.saga.sdk.proto.api.offer.GetOffersRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetOffersMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_OFFER_QUOTE = 0;
private static final int METHODID_CONFIRM_OFFER = 1;
private static final int METHODID_CANCEL_OFFER = 2;
private static final int METHODID_GET_OFFERS = 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 OfferServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(OfferServiceImplBase 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_CREATE_OFFER_QUOTE:
serviceImpl.createOfferQuote((games.mythical.saga.sdk.proto.api.offer.CreateOfferQuoteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CONFIRM_OFFER:
serviceImpl.confirmOffer((games.mythical.saga.sdk.proto.api.offer.ConfirmOfferRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CANCEL_OFFER:
serviceImpl.cancelOffer((games.mythical.saga.sdk.proto.api.offer.CancelOfferRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_OFFERS:
serviceImpl.getOffers((games.mythical.saga.sdk.proto.api.offer.GetOffersRequest) 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 OfferServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
OfferServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return games.mythical.saga.sdk.proto.api.offer.Rpc.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("OfferService");
}
}
private static final class OfferServiceFileDescriptorSupplier
extends OfferServiceBaseDescriptorSupplier {
OfferServiceFileDescriptorSupplier() {}
}
private static final class OfferServiceMethodDescriptorSupplier
extends OfferServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
OfferServiceMethodDescriptorSupplier(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 (OfferServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new OfferServiceFileDescriptorSupplier())
.addMethod(getCreateOfferQuoteMethod())
.addMethod(getConfirmOfferMethod())
.addMethod(getCancelOfferMethod())
.addMethod(getGetOffersMethod())
.build();
}
}
}
return result;
}
}