com.passkit.grpc.Analytics.AnalyticsGrpc 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.Analytics;
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/analytics/a_rpc.proto")
public final class AnalyticsGrpc {
private AnalyticsGrpc() {}
public static final String SERVICE_NAME = "analytics.Analytics";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetAnalyticsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getAnalytics",
requestType = com.passkit.grpc.Reporting.AnalyticsRequest.class,
responseType = com.passkit.grpc.Reporting.AnalyticsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetAnalyticsMethod() {
io.grpc.MethodDescriptor getGetAnalyticsMethod;
if ((getGetAnalyticsMethod = AnalyticsGrpc.getGetAnalyticsMethod) == null) {
synchronized (AnalyticsGrpc.class) {
if ((getGetAnalyticsMethod = AnalyticsGrpc.getGetAnalyticsMethod) == null) {
AnalyticsGrpc.getGetAnalyticsMethod = getGetAnalyticsMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getAnalytics"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.passkit.grpc.Reporting.AnalyticsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.passkit.grpc.Reporting.AnalyticsResponse.getDefaultInstance()))
.setSchemaDescriptor(new AnalyticsMethodDescriptorSupplier("getAnalytics"))
.build();
}
}
}
return getGetAnalyticsMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static AnalyticsStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AnalyticsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AnalyticsStub(channel, callOptions);
}
};
return AnalyticsStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static AnalyticsBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AnalyticsBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AnalyticsBlockingStub(channel, callOptions);
}
};
return AnalyticsBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static AnalyticsFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AnalyticsFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AnalyticsFutureStub(channel, callOptions);
}
};
return AnalyticsFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class AnalyticsImplBase implements io.grpc.BindableService {
/**
*
* Retrieve a daily, monthly or yearly record.
*
*/
public void getAnalytics(com.passkit.grpc.Reporting.AnalyticsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetAnalyticsMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetAnalyticsMethod(),
asyncUnaryCall(
new MethodHandlers<
com.passkit.grpc.Reporting.AnalyticsRequest,
com.passkit.grpc.Reporting.AnalyticsResponse>(
this, METHODID_GET_ANALYTICS)))
.build();
}
}
/**
*/
public static final class AnalyticsStub extends io.grpc.stub.AbstractAsyncStub {
private AnalyticsStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AnalyticsStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AnalyticsStub(channel, callOptions);
}
/**
*
* Retrieve a daily, monthly or yearly record.
*
*/
public void getAnalytics(com.passkit.grpc.Reporting.AnalyticsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetAnalyticsMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class AnalyticsBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private AnalyticsBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AnalyticsBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AnalyticsBlockingStub(channel, callOptions);
}
/**
*
* Retrieve a daily, monthly or yearly record.
*
*/
public com.passkit.grpc.Reporting.AnalyticsResponse getAnalytics(com.passkit.grpc.Reporting.AnalyticsRequest request) {
return blockingUnaryCall(
getChannel(), getGetAnalyticsMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class AnalyticsFutureStub extends io.grpc.stub.AbstractFutureStub {
private AnalyticsFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AnalyticsFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AnalyticsFutureStub(channel, callOptions);
}
/**
*
* Retrieve a daily, monthly or yearly record.
*
*/
public com.google.common.util.concurrent.ListenableFuture getAnalytics(
com.passkit.grpc.Reporting.AnalyticsRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetAnalyticsMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_ANALYTICS = 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 AnalyticsImplBase serviceImpl;
private final int methodId;
MethodHandlers(AnalyticsImplBase 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_ANALYTICS:
serviceImpl.getAnalytics((com.passkit.grpc.Reporting.AnalyticsRequest) 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 AnalyticsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
AnalyticsBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.passkit.grpc.Analytics.ARpc.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Analytics");
}
}
private static final class AnalyticsFileDescriptorSupplier
extends AnalyticsBaseDescriptorSupplier {
AnalyticsFileDescriptorSupplier() {}
}
private static final class AnalyticsMethodDescriptorSupplier
extends AnalyticsBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
AnalyticsMethodDescriptorSupplier(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 (AnalyticsGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new AnalyticsFileDescriptorSupplier())
.addMethod(getGetAnalyticsMethod())
.build();
}
}
}
return result;
}
}