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

net.spals.appbuilder.app.examples.grpc.rest.UserServiceV3Grpc Maven / Gradle / Ivy

package net.spals.appbuilder.app.examples.grpc.rest;

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.11.0)",
    comments = "Source: rest_routes_v3.proto")
public final class UserServiceV3Grpc {

  private UserServiceV3Grpc() {}

  public static final String SERVICE_NAME = "UserServiceV3";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  @java.lang.Deprecated // Use {@link #getDeleteUserV3Method()} instead. 
  public static final io.grpc.MethodDescriptor METHOD_DELETE_USER_V3 = getDeleteUserV3MethodHelper();

  private static volatile io.grpc.MethodDescriptor getDeleteUserV3Method;

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static io.grpc.MethodDescriptor getDeleteUserV3Method() {
    return getDeleteUserV3MethodHelper();
  }

  private static io.grpc.MethodDescriptor getDeleteUserV3MethodHelper() {
    io.grpc.MethodDescriptor getDeleteUserV3Method;
    if ((getDeleteUserV3Method = UserServiceV3Grpc.getDeleteUserV3Method) == null) {
      synchronized (UserServiceV3Grpc.class) {
        if ((getDeleteUserV3Method = UserServiceV3Grpc.getDeleteUserV3Method) == null) {
          UserServiceV3Grpc.getDeleteUserV3Method = getDeleteUserV3Method = 
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(
                  "UserServiceV3", "DeleteUserV3"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  net.spals.appbuilder.app.examples.grpc.rest.DeleteUserRequestV3.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  net.spals.appbuilder.app.examples.grpc.rest.DeleteUserResponseV3.getDefaultInstance()))
                  .setSchemaDescriptor(new UserServiceV3MethodDescriptorSupplier("DeleteUserV3"))
                  .build();
          }
        }
     }
     return getDeleteUserV3Method;
  }
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  @java.lang.Deprecated // Use {@link #getGetUserV3Method()} instead. 
  public static final io.grpc.MethodDescriptor METHOD_GET_USER_V3 = getGetUserV3MethodHelper();

  private static volatile io.grpc.MethodDescriptor getGetUserV3Method;

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static io.grpc.MethodDescriptor getGetUserV3Method() {
    return getGetUserV3MethodHelper();
  }

  private static io.grpc.MethodDescriptor getGetUserV3MethodHelper() {
    io.grpc.MethodDescriptor getGetUserV3Method;
    if ((getGetUserV3Method = UserServiceV3Grpc.getGetUserV3Method) == null) {
      synchronized (UserServiceV3Grpc.class) {
        if ((getGetUserV3Method = UserServiceV3Grpc.getGetUserV3Method) == null) {
          UserServiceV3Grpc.getGetUserV3Method = getGetUserV3Method = 
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(
                  "UserServiceV3", "GetUserV3"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  net.spals.appbuilder.app.examples.grpc.rest.GetUserRequestV3.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  net.spals.appbuilder.app.examples.grpc.rest.GetUserResponseV3.getDefaultInstance()))
                  .setSchemaDescriptor(new UserServiceV3MethodDescriptorSupplier("GetUserV3"))
                  .build();
          }
        }
     }
     return getGetUserV3Method;
  }
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  @java.lang.Deprecated // Use {@link #getPostUserV3Method()} instead. 
  public static final io.grpc.MethodDescriptor METHOD_POST_USER_V3 = getPostUserV3MethodHelper();

  private static volatile io.grpc.MethodDescriptor getPostUserV3Method;

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static io.grpc.MethodDescriptor getPostUserV3Method() {
    return getPostUserV3MethodHelper();
  }

  private static io.grpc.MethodDescriptor getPostUserV3MethodHelper() {
    io.grpc.MethodDescriptor getPostUserV3Method;
    if ((getPostUserV3Method = UserServiceV3Grpc.getPostUserV3Method) == null) {
      synchronized (UserServiceV3Grpc.class) {
        if ((getPostUserV3Method = UserServiceV3Grpc.getPostUserV3Method) == null) {
          UserServiceV3Grpc.getPostUserV3Method = getPostUserV3Method = 
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(
                  "UserServiceV3", "PostUserV3"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  net.spals.appbuilder.app.examples.grpc.rest.PostUserRequestV3.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  net.spals.appbuilder.app.examples.grpc.rest.PostUserResponseV3.getDefaultInstance()))
                  .setSchemaDescriptor(new UserServiceV3MethodDescriptorSupplier("PostUserV3"))
                  .build();
          }
        }
     }
     return getPostUserV3Method;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static UserServiceV3Stub newStub(io.grpc.Channel channel) {
    return new UserServiceV3Stub(channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static UserServiceV3BlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    return new UserServiceV3BlockingStub(channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static UserServiceV3FutureStub newFutureStub(
      io.grpc.Channel channel) {
    return new UserServiceV3FutureStub(channel);
  }

  /**
   */
  public static abstract class UserServiceV3ImplBase implements io.grpc.BindableService {

    /**
     */
    public void deleteUserV3(net.spals.appbuilder.app.examples.grpc.rest.DeleteUserRequestV3 request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getDeleteUserV3MethodHelper(), responseObserver);
    }

    /**
     */
    public void getUserV3(net.spals.appbuilder.app.examples.grpc.rest.GetUserRequestV3 request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getGetUserV3MethodHelper(), responseObserver);
    }

    /**
     */
    public void postUserV3(net.spals.appbuilder.app.examples.grpc.rest.PostUserRequestV3 request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getPostUserV3MethodHelper(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getDeleteUserV3MethodHelper(),
            asyncUnaryCall(
              new MethodHandlers<
                net.spals.appbuilder.app.examples.grpc.rest.DeleteUserRequestV3,
                net.spals.appbuilder.app.examples.grpc.rest.DeleteUserResponseV3>(
                  this, METHODID_DELETE_USER_V3)))
          .addMethod(
            getGetUserV3MethodHelper(),
            asyncUnaryCall(
              new MethodHandlers<
                net.spals.appbuilder.app.examples.grpc.rest.GetUserRequestV3,
                net.spals.appbuilder.app.examples.grpc.rest.GetUserResponseV3>(
                  this, METHODID_GET_USER_V3)))
          .addMethod(
            getPostUserV3MethodHelper(),
            asyncUnaryCall(
              new MethodHandlers<
                net.spals.appbuilder.app.examples.grpc.rest.PostUserRequestV3,
                net.spals.appbuilder.app.examples.grpc.rest.PostUserResponseV3>(
                  this, METHODID_POST_USER_V3)))
          .build();
    }
  }

  /**
   */
  public static final class UserServiceV3Stub extends io.grpc.stub.AbstractStub {
    private UserServiceV3Stub(io.grpc.Channel channel) {
      super(channel);
    }

    private UserServiceV3Stub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public void deleteUserV3(net.spals.appbuilder.app.examples.grpc.rest.DeleteUserRequestV3 request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getDeleteUserV3MethodHelper(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getUserV3(net.spals.appbuilder.app.examples.grpc.rest.GetUserRequestV3 request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getGetUserV3MethodHelper(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void postUserV3(net.spals.appbuilder.app.examples.grpc.rest.PostUserRequestV3 request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getPostUserV3MethodHelper(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class UserServiceV3BlockingStub extends io.grpc.stub.AbstractStub {
    private UserServiceV3BlockingStub(io.grpc.Channel channel) {
      super(channel);
    }

    private UserServiceV3BlockingStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public net.spals.appbuilder.app.examples.grpc.rest.DeleteUserResponseV3 deleteUserV3(net.spals.appbuilder.app.examples.grpc.rest.DeleteUserRequestV3 request) {
      return blockingUnaryCall(
          getChannel(), getDeleteUserV3MethodHelper(), getCallOptions(), request);
    }

    /**
     */
    public net.spals.appbuilder.app.examples.grpc.rest.GetUserResponseV3 getUserV3(net.spals.appbuilder.app.examples.grpc.rest.GetUserRequestV3 request) {
      return blockingUnaryCall(
          getChannel(), getGetUserV3MethodHelper(), getCallOptions(), request);
    }

    /**
     */
    public net.spals.appbuilder.app.examples.grpc.rest.PostUserResponseV3 postUserV3(net.spals.appbuilder.app.examples.grpc.rest.PostUserRequestV3 request) {
      return blockingUnaryCall(
          getChannel(), getPostUserV3MethodHelper(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class UserServiceV3FutureStub extends io.grpc.stub.AbstractStub {
    private UserServiceV3FutureStub(io.grpc.Channel channel) {
      super(channel);
    }

    private UserServiceV3FutureStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture deleteUserV3(
        net.spals.appbuilder.app.examples.grpc.rest.DeleteUserRequestV3 request) {
      return futureUnaryCall(
          getChannel().newCall(getDeleteUserV3MethodHelper(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getUserV3(
        net.spals.appbuilder.app.examples.grpc.rest.GetUserRequestV3 request) {
      return futureUnaryCall(
          getChannel().newCall(getGetUserV3MethodHelper(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture postUserV3(
        net.spals.appbuilder.app.examples.grpc.rest.PostUserRequestV3 request) {
      return futureUnaryCall(
          getChannel().newCall(getPostUserV3MethodHelper(), getCallOptions()), request);
    }
  }

  private static final int METHODID_DELETE_USER_V3 = 0;
  private static final int METHODID_GET_USER_V3 = 1;
  private static final int METHODID_POST_USER_V3 = 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 UserServiceV3ImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(UserServiceV3ImplBase 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_DELETE_USER_V3:
          serviceImpl.deleteUserV3((net.spals.appbuilder.app.examples.grpc.rest.DeleteUserRequestV3) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_USER_V3:
          serviceImpl.getUserV3((net.spals.appbuilder.app.examples.grpc.rest.GetUserRequestV3) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_POST_USER_V3:
          serviceImpl.postUserV3((net.spals.appbuilder.app.examples.grpc.rest.PostUserRequestV3) 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 UserServiceV3BaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    UserServiceV3BaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return net.spals.appbuilder.app.examples.grpc.rest.RestServerV3Proto.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("UserServiceV3");
    }
  }

  private static final class UserServiceV3FileDescriptorSupplier
      extends UserServiceV3BaseDescriptorSupplier {
    UserServiceV3FileDescriptorSupplier() {}
  }

  private static final class UserServiceV3MethodDescriptorSupplier
      extends UserServiceV3BaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    UserServiceV3MethodDescriptorSupplier(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 (UserServiceV3Grpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new UserServiceV3FileDescriptorSupplier())
              .addMethod(getDeleteUserV3MethodHelper())
              .addMethod(getGetUserV3MethodHelper())
              .addMethod(getPostUserV3MethodHelper())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy