All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.grpc.com.streamlayer.pushNotification.common.CommonGrpc Maven / Gradle / Ivy

There is a newer version: 5.133.1
Show newest version
package com.streamlayer.pushNotification.common;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.65.1)",
    comments = "Source: streamlayer/pushNotification/pushNotification.common.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class CommonGrpc {

  private CommonGrpc() {}

  public static final java.lang.String SERVICE_NAME = "streamlayer.pushNotification.Common";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor getSendTestMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "SendTest",
      requestType = com.streamlayer.pushNotification.common.SendTestRequest.class,
      responseType = com.streamlayer.pushNotification.common.SendTestResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getSendTestMethod() {
    io.grpc.MethodDescriptor getSendTestMethod;
    if ((getSendTestMethod = CommonGrpc.getSendTestMethod) == null) {
      synchronized (CommonGrpc.class) {
        if ((getSendTestMethod = CommonGrpc.getSendTestMethod) == null) {
          CommonGrpc.getSendTestMethod = getSendTestMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SendTest"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.pushNotification.common.SendTestRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.pushNotification.common.SendTestResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getSendTestMethod;
  }

  private static volatile io.grpc.MethodDescriptor getOrganizationListMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "OrganizationList",
      requestType = com.streamlayer.pushNotification.common.OrganizationListRequest.class,
      responseType = com.streamlayer.pushNotification.common.OrganizationListResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getOrganizationListMethod() {
    io.grpc.MethodDescriptor getOrganizationListMethod;
    if ((getOrganizationListMethod = CommonGrpc.getOrganizationListMethod) == null) {
      synchronized (CommonGrpc.class) {
        if ((getOrganizationListMethod = CommonGrpc.getOrganizationListMethod) == null) {
          CommonGrpc.getOrganizationListMethod = getOrganizationListMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "OrganizationList"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.pushNotification.common.OrganizationListRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.pushNotification.common.OrganizationListResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getOrganizationListMethod;
  }

  private static volatile io.grpc.MethodDescriptor getUserGetMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "UserGet",
      requestType = com.streamlayer.pushNotification.common.UserGetRequest.class,
      responseType = com.streamlayer.pushNotification.common.UserGetResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getUserGetMethod() {
    io.grpc.MethodDescriptor getUserGetMethod;
    if ((getUserGetMethod = CommonGrpc.getUserGetMethod) == null) {
      synchronized (CommonGrpc.class) {
        if ((getUserGetMethod = CommonGrpc.getUserGetMethod) == null) {
          CommonGrpc.getUserGetMethod = getUserGetMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UserGet"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.pushNotification.common.UserGetRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.pushNotification.common.UserGetResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getUserGetMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static CommonStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public CommonStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new CommonStub(channel, callOptions);
        }
      };
    return CommonStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static CommonBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public CommonBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new CommonBlockingStub(channel, callOptions);
        }
      };
    return CommonBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static CommonFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public CommonFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new CommonFutureStub(channel, callOptions);
        }
      };
    return CommonFutureStub.newStub(factory, channel);
  }

  /**
   */
  public interface AsyncService {

    /**
     */
    default void sendTest(com.streamlayer.pushNotification.common.SendTestRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSendTestMethod(), responseObserver);
    }

    /**
     */
    default void organizationList(com.streamlayer.pushNotification.common.OrganizationListRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getOrganizationListMethod(), responseObserver);
    }

    /**
     */
    default void userGet(com.streamlayer.pushNotification.common.UserGetRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUserGetMethod(), responseObserver);
    }
  }

  /**
   * Base class for the server implementation of the service Common.
   */
  public static abstract class CommonImplBase
      implements io.grpc.BindableService, AsyncService {

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return CommonGrpc.bindService(this);
    }
  }

  /**
   * A stub to allow clients to do asynchronous rpc calls to service Common.
   */
  public static final class CommonStub
      extends io.grpc.stub.AbstractAsyncStub {
    private CommonStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected CommonStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new CommonStub(channel, callOptions);
    }

    /**
     */
    public void sendTest(com.streamlayer.pushNotification.common.SendTestRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSendTestMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void organizationList(com.streamlayer.pushNotification.common.OrganizationListRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getOrganizationListMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void userGet(com.streamlayer.pushNotification.common.UserGetRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getUserGetMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   * A stub to allow clients to do synchronous rpc calls to service Common.
   */
  public static final class CommonBlockingStub
      extends io.grpc.stub.AbstractBlockingStub {
    private CommonBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected CommonBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new CommonBlockingStub(channel, callOptions);
    }

    /**
     */
    public com.streamlayer.pushNotification.common.SendTestResponse sendTest(com.streamlayer.pushNotification.common.SendTestRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSendTestMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.streamlayer.pushNotification.common.OrganizationListResponse organizationList(com.streamlayer.pushNotification.common.OrganizationListRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getOrganizationListMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.streamlayer.pushNotification.common.UserGetResponse userGet(com.streamlayer.pushNotification.common.UserGetRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getUserGetMethod(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do ListenableFuture-style rpc calls to service Common.
   */
  public static final class CommonFutureStub
      extends io.grpc.stub.AbstractFutureStub {
    private CommonFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected CommonFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new CommonFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture sendTest(
        com.streamlayer.pushNotification.common.SendTestRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSendTestMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture organizationList(
        com.streamlayer.pushNotification.common.OrganizationListRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getOrganizationListMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture userGet(
        com.streamlayer.pushNotification.common.UserGetRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getUserGetMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_SEND_TEST = 0;
  private static final int METHODID_ORGANIZATION_LIST = 1;
  private static final int METHODID_USER_GET = 2;

  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_SEND_TEST:
          serviceImpl.sendTest((com.streamlayer.pushNotification.common.SendTestRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_ORGANIZATION_LIST:
          serviceImpl.organizationList((com.streamlayer.pushNotification.common.OrganizationListRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_USER_GET:
          serviceImpl.userGet((com.streamlayer.pushNotification.common.UserGetRequest) 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(
          getSendTestMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.pushNotification.common.SendTestRequest,
              com.streamlayer.pushNotification.common.SendTestResponse>(
                service, METHODID_SEND_TEST)))
        .addMethod(
          getOrganizationListMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.pushNotification.common.OrganizationListRequest,
              com.streamlayer.pushNotification.common.OrganizationListResponse>(
                service, METHODID_ORGANIZATION_LIST)))
        .addMethod(
          getUserGetMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.pushNotification.common.UserGetRequest,
              com.streamlayer.pushNotification.common.UserGetResponse>(
                service, METHODID_USER_GET)))
        .build();
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (CommonGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .addMethod(getSendTestMethod())
              .addMethod(getOrganizationListMethod())
              .addMethod(getUserGetMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy