com.passkit.grpc.DistributionGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
SDK for the PassKit gRPC API that can be used to create, configure and manage Membership, Loyalty, Event Ticket, Coupon, Transit and Boarding Pass content for mobile wallet applications, including Apple Pay and Google Pay.
package com.passkit.grpc;
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.33.1)",
comments = "Source: io/core/a_rpc_distribution.proto")
public final class DistributionGrpc {
private DistributionGrpc() {}
public static final String SERVICE_NAME = "io.Distribution";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getSendWelcomeEmailMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "sendWelcomeEmail",
requestType = com.passkit.grpc.Distribution.EmailDistributionRequest.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getSendWelcomeEmailMethod() {
io.grpc.MethodDescriptor getSendWelcomeEmailMethod;
if ((getSendWelcomeEmailMethod = DistributionGrpc.getSendWelcomeEmailMethod) == null) {
synchronized (DistributionGrpc.class) {
if ((getSendWelcomeEmailMethod = DistributionGrpc.getSendWelcomeEmailMethod) == null) {
DistributionGrpc.getSendWelcomeEmailMethod = getSendWelcomeEmailMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "sendWelcomeEmail"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.passkit.grpc.Distribution.EmailDistributionRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(new DistributionMethodDescriptorSupplier("sendWelcomeEmail"))
.build();
}
}
}
return getSendWelcomeEmailMethod;
}
private static volatile io.grpc.MethodDescriptor getGetSmartPasssLinkMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getSmartPasssLink",
requestType = com.passkit.grpc.Distribution.SmartPassLinkRequest.class,
responseType = com.passkit.grpc.CommonObjects.Url.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetSmartPasssLinkMethod() {
io.grpc.MethodDescriptor getGetSmartPasssLinkMethod;
if ((getGetSmartPasssLinkMethod = DistributionGrpc.getGetSmartPasssLinkMethod) == null) {
synchronized (DistributionGrpc.class) {
if ((getGetSmartPasssLinkMethod = DistributionGrpc.getGetSmartPasssLinkMethod) == null) {
DistributionGrpc.getGetSmartPasssLinkMethod = getGetSmartPasssLinkMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getSmartPasssLink"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.passkit.grpc.Distribution.SmartPassLinkRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.passkit.grpc.CommonObjects.Url.getDefaultInstance()))
.setSchemaDescriptor(new DistributionMethodDescriptorSupplier("getSmartPasssLink"))
.build();
}
}
}
return getGetSmartPasssLinkMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static DistributionStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public DistributionStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DistributionStub(channel, callOptions);
}
};
return DistributionStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static DistributionBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public DistributionBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DistributionBlockingStub(channel, callOptions);
}
};
return DistributionBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static DistributionFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public DistributionFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DistributionFutureStub(channel, callOptions);
}
};
return DistributionFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class DistributionImplBase implements io.grpc.BindableService {
/**
*/
public void sendWelcomeEmail(com.passkit.grpc.Distribution.EmailDistributionRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getSendWelcomeEmailMethod(), responseObserver);
}
/**
*/
public void getSmartPasssLink(com.passkit.grpc.Distribution.SmartPassLinkRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetSmartPasssLinkMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getSendWelcomeEmailMethod(),
asyncUnaryCall(
new MethodHandlers<
com.passkit.grpc.Distribution.EmailDistributionRequest,
com.google.protobuf.Empty>(
this, METHODID_SEND_WELCOME_EMAIL)))
.addMethod(
getGetSmartPasssLinkMethod(),
asyncUnaryCall(
new MethodHandlers<
com.passkit.grpc.Distribution.SmartPassLinkRequest,
com.passkit.grpc.CommonObjects.Url>(
this, METHODID_GET_SMART_PASSS_LINK)))
.build();
}
}
/**
*/
public static final class DistributionStub extends io.grpc.stub.AbstractAsyncStub {
private DistributionStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DistributionStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DistributionStub(channel, callOptions);
}
/**
*/
public void sendWelcomeEmail(com.passkit.grpc.Distribution.EmailDistributionRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getSendWelcomeEmailMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getSmartPasssLink(com.passkit.grpc.Distribution.SmartPassLinkRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetSmartPasssLinkMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class DistributionBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private DistributionBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DistributionBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DistributionBlockingStub(channel, callOptions);
}
/**
*/
public com.google.protobuf.Empty sendWelcomeEmail(com.passkit.grpc.Distribution.EmailDistributionRequest request) {
return blockingUnaryCall(
getChannel(), getSendWelcomeEmailMethod(), getCallOptions(), request);
}
/**
*/
public com.passkit.grpc.CommonObjects.Url getSmartPasssLink(com.passkit.grpc.Distribution.SmartPassLinkRequest request) {
return blockingUnaryCall(
getChannel(), getGetSmartPasssLinkMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class DistributionFutureStub extends io.grpc.stub.AbstractFutureStub {
private DistributionFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DistributionFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DistributionFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture sendWelcomeEmail(
com.passkit.grpc.Distribution.EmailDistributionRequest request) {
return futureUnaryCall(
getChannel().newCall(getSendWelcomeEmailMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture getSmartPasssLink(
com.passkit.grpc.Distribution.SmartPassLinkRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetSmartPasssLinkMethod(), getCallOptions()), request);
}
}
private static final int METHODID_SEND_WELCOME_EMAIL = 0;
private static final int METHODID_GET_SMART_PASSS_LINK = 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 DistributionImplBase serviceImpl;
private final int methodId;
MethodHandlers(DistributionImplBase 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_SEND_WELCOME_EMAIL:
serviceImpl.sendWelcomeEmail((com.passkit.grpc.Distribution.EmailDistributionRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_SMART_PASSS_LINK:
serviceImpl.getSmartPasssLink((com.passkit.grpc.Distribution.SmartPassLinkRequest) 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 DistributionBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
DistributionBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.passkit.grpc.ARpcDistribution.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Distribution");
}
}
private static final class DistributionFileDescriptorSupplier
extends DistributionBaseDescriptorSupplier {
DistributionFileDescriptorSupplier() {}
}
private static final class DistributionMethodDescriptorSupplier
extends DistributionBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
DistributionMethodDescriptorSupplier(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 (DistributionGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new DistributionFileDescriptorSupplier())
.addMethod(getSendWelcomeEmailMethod())
.addMethod(getGetSmartPasssLinkMethod())
.build();
}
}
}
return result;
}
}