예제 #1
0
@javax.annotation.Generated("by gRPC proto compiler")
public class IRCServiceGrpc {

  // Static method descriptors that strictly reflect the proto.
  public static final io.grpc.MethodDescriptor<
          if4031.common.LoginRequest, if4031.common.LoginResponse>
      METHOD_LOGIN =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              "if4031.IRCService",
              "login",
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.LoginRequest.parser()),
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.LoginResponse.parser()));
  public static final io.grpc.MethodDescriptor<
          if4031.common.ChangeNickRequest, if4031.common.StatusResponse>
      METHOD_CHANGE_NICKNAME =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              "if4031.IRCService",
              "changeNickname",
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.ChangeNickRequest.parser()),
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.StatusResponse.parser()));
  public static final io.grpc.MethodDescriptor<
          if4031.common.ActionRequest, if4031.common.StatusResponse>
      METHOD_LOGOUT =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              "if4031.IRCService",
              "logout",
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.ActionRequest.parser()),
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.StatusResponse.parser()));
  public static final io.grpc.MethodDescriptor<
          if4031.common.ChannelRequest, if4031.common.StatusResponse>
      METHOD_JOIN_CHANNEL =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              "if4031.IRCService",
              "joinChannel",
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.ChannelRequest.parser()),
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.StatusResponse.parser()));
  public static final io.grpc.MethodDescriptor<
          if4031.common.ActionRequest, if4031.common.MessagesResponse>
      METHOD_GET_MESSAGE =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              "if4031.IRCService",
              "getMessage",
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.ActionRequest.parser()),
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.MessagesResponse.parser()));
  public static final io.grpc.MethodDescriptor<
          if4031.common.ChannelMessageRequest, if4031.common.MessagesResponse>
      METHOD_SEND_MESSAGE_TO_CHANNEL =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              "if4031.IRCService",
              "sendMessageToChannel",
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.ChannelMessageRequest.parser()),
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.MessagesResponse.parser()));
  public static final io.grpc.MethodDescriptor<
          if4031.common.MessageRequest, if4031.common.MessagesResponse>
      METHOD_SEND_MESSAGE =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              "if4031.IRCService",
              "sendMessage",
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.MessageRequest.parser()),
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.MessagesResponse.parser()));
  public static final io.grpc.MethodDescriptor<
          if4031.common.ChannelRequest, if4031.common.StatusResponse>
      METHOD_LEAVE_CHANNEL =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              "if4031.IRCService",
              "leaveChannel",
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.ChannelRequest.parser()),
              io.grpc.protobuf.ProtoUtils.marshaller(if4031.common.StatusResponse.parser()));

  public static IRCServiceStub newStub(io.grpc.Channel channel) {
    return new IRCServiceStub(channel);
  }

  public static IRCServiceBlockingStub newBlockingStub(io.grpc.Channel channel) {
    return new IRCServiceBlockingStub(channel);
  }

  public static IRCServiceFutureStub newFutureStub(io.grpc.Channel channel) {
    return new IRCServiceFutureStub(channel);
  }

  public static interface IRCService {

    public void login(
        if4031.common.LoginRequest request,
        io.grpc.stub.StreamObserver<if4031.common.LoginResponse> responseObserver);

    public void changeNickname(
        if4031.common.ChangeNickRequest request,
        io.grpc.stub.StreamObserver<if4031.common.StatusResponse> responseObserver);

    public void logout(
        if4031.common.ActionRequest request,
        io.grpc.stub.StreamObserver<if4031.common.StatusResponse> responseObserver);

    public void joinChannel(
        if4031.common.ChannelRequest request,
        io.grpc.stub.StreamObserver<if4031.common.StatusResponse> responseObserver);

    public void getMessage(
        if4031.common.ActionRequest request,
        io.grpc.stub.StreamObserver<if4031.common.MessagesResponse> responseObserver);

    public void sendMessageToChannel(
        if4031.common.ChannelMessageRequest request,
        io.grpc.stub.StreamObserver<if4031.common.MessagesResponse> responseObserver);

    public void sendMessage(
        if4031.common.MessageRequest request,
        io.grpc.stub.StreamObserver<if4031.common.MessagesResponse> responseObserver);

    public void leaveChannel(
        if4031.common.ChannelRequest request,
        io.grpc.stub.StreamObserver<if4031.common.StatusResponse> responseObserver);
  }

  public static interface IRCServiceBlockingClient {

    public if4031.common.LoginResponse login(if4031.common.LoginRequest request);

    public if4031.common.StatusResponse changeNickname(if4031.common.ChangeNickRequest request);

    public if4031.common.StatusResponse logout(if4031.common.ActionRequest request);

    public if4031.common.StatusResponse joinChannel(if4031.common.ChannelRequest request);

    public if4031.common.MessagesResponse getMessage(if4031.common.ActionRequest request);

    public if4031.common.MessagesResponse sendMessageToChannel(
        if4031.common.ChannelMessageRequest request);

    public if4031.common.MessagesResponse sendMessage(if4031.common.MessageRequest request);

    public if4031.common.StatusResponse leaveChannel(if4031.common.ChannelRequest request);
  }

  public static interface IRCServiceFutureClient {

    public com.google.common.util.concurrent.ListenableFuture<if4031.common.LoginResponse> login(
        if4031.common.LoginRequest request);

    public com.google.common.util.concurrent.ListenableFuture<if4031.common.StatusResponse>
        changeNickname(if4031.common.ChangeNickRequest request);

    public com.google.common.util.concurrent.ListenableFuture<if4031.common.StatusResponse> logout(
        if4031.common.ActionRequest request);

    public com.google.common.util.concurrent.ListenableFuture<if4031.common.StatusResponse>
        joinChannel(if4031.common.ChannelRequest request);

    public com.google.common.util.concurrent.ListenableFuture<if4031.common.MessagesResponse>
        getMessage(if4031.common.ActionRequest request);

    public com.google.common.util.concurrent.ListenableFuture<if4031.common.MessagesResponse>
        sendMessageToChannel(if4031.common.ChannelMessageRequest request);

    public com.google.common.util.concurrent.ListenableFuture<if4031.common.MessagesResponse>
        sendMessage(if4031.common.MessageRequest request);

    public com.google.common.util.concurrent.ListenableFuture<if4031.common.StatusResponse>
        leaveChannel(if4031.common.ChannelRequest request);
  }

  public static class IRCServiceStub extends io.grpc.stub.AbstractStub<IRCServiceStub>
      implements IRCService {
    private IRCServiceStub(io.grpc.Channel channel) {
      super(channel);
    }

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

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

    @java.lang.Override
    public void login(
        if4031.common.LoginRequest request,
        io.grpc.stub.StreamObserver<if4031.common.LoginResponse> responseObserver) {
      asyncUnaryCall(channel.newCall(METHOD_LOGIN, callOptions), request, responseObserver);
    }

    @java.lang.Override
    public void changeNickname(
        if4031.common.ChangeNickRequest request,
        io.grpc.stub.StreamObserver<if4031.common.StatusResponse> responseObserver) {
      asyncUnaryCall(
          channel.newCall(METHOD_CHANGE_NICKNAME, callOptions), request, responseObserver);
    }

    @java.lang.Override
    public void logout(
        if4031.common.ActionRequest request,
        io.grpc.stub.StreamObserver<if4031.common.StatusResponse> responseObserver) {
      asyncUnaryCall(channel.newCall(METHOD_LOGOUT, callOptions), request, responseObserver);
    }

    @java.lang.Override
    public void joinChannel(
        if4031.common.ChannelRequest request,
        io.grpc.stub.StreamObserver<if4031.common.StatusResponse> responseObserver) {
      asyncUnaryCall(channel.newCall(METHOD_JOIN_CHANNEL, callOptions), request, responseObserver);
    }

    @java.lang.Override
    public void getMessage(
        if4031.common.ActionRequest request,
        io.grpc.stub.StreamObserver<if4031.common.MessagesResponse> responseObserver) {
      asyncUnaryCall(channel.newCall(METHOD_GET_MESSAGE, callOptions), request, responseObserver);
    }

    @java.lang.Override
    public void sendMessageToChannel(
        if4031.common.ChannelMessageRequest request,
        io.grpc.stub.StreamObserver<if4031.common.MessagesResponse> responseObserver) {
      asyncUnaryCall(
          channel.newCall(METHOD_SEND_MESSAGE_TO_CHANNEL, callOptions), request, responseObserver);
    }

    @java.lang.Override
    public void sendMessage(
        if4031.common.MessageRequest request,
        io.grpc.stub.StreamObserver<if4031.common.MessagesResponse> responseObserver) {
      asyncUnaryCall(channel.newCall(METHOD_SEND_MESSAGE, callOptions), request, responseObserver);
    }

    @java.lang.Override
    public void leaveChannel(
        if4031.common.ChannelRequest request,
        io.grpc.stub.StreamObserver<if4031.common.StatusResponse> responseObserver) {
      asyncUnaryCall(channel.newCall(METHOD_LEAVE_CHANNEL, callOptions), request, responseObserver);
    }
  }

  public static class IRCServiceBlockingStub
      extends io.grpc.stub.AbstractStub<IRCServiceBlockingStub>
      implements IRCServiceBlockingClient {
    private IRCServiceBlockingStub(io.grpc.Channel channel) {
      super(channel);
    }

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

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

    @java.lang.Override
    public if4031.common.LoginResponse login(if4031.common.LoginRequest request) {
      return blockingUnaryCall(channel.newCall(METHOD_LOGIN, callOptions), request);
    }

    @java.lang.Override
    public if4031.common.StatusResponse changeNickname(if4031.common.ChangeNickRequest request) {
      return blockingUnaryCall(channel.newCall(METHOD_CHANGE_NICKNAME, callOptions), request);
    }

    @java.lang.Override
    public if4031.common.StatusResponse logout(if4031.common.ActionRequest request) {
      return blockingUnaryCall(channel.newCall(METHOD_LOGOUT, callOptions), request);
    }

    @java.lang.Override
    public if4031.common.StatusResponse joinChannel(if4031.common.ChannelRequest request) {
      return blockingUnaryCall(channel.newCall(METHOD_JOIN_CHANNEL, callOptions), request);
    }

    @java.lang.Override
    public if4031.common.MessagesResponse getMessage(if4031.common.ActionRequest request) {
      return blockingUnaryCall(channel.newCall(METHOD_GET_MESSAGE, callOptions), request);
    }

    @java.lang.Override
    public if4031.common.MessagesResponse sendMessageToChannel(
        if4031.common.ChannelMessageRequest request) {
      return blockingUnaryCall(
          channel.newCall(METHOD_SEND_MESSAGE_TO_CHANNEL, callOptions), request);
    }

    @java.lang.Override
    public if4031.common.MessagesResponse sendMessage(if4031.common.MessageRequest request) {
      return blockingUnaryCall(channel.newCall(METHOD_SEND_MESSAGE, callOptions), request);
    }

    @java.lang.Override
    public if4031.common.StatusResponse leaveChannel(if4031.common.ChannelRequest request) {
      return blockingUnaryCall(channel.newCall(METHOD_LEAVE_CHANNEL, callOptions), request);
    }
  }

  public static class IRCServiceFutureStub extends io.grpc.stub.AbstractStub<IRCServiceFutureStub>
      implements IRCServiceFutureClient {
    private IRCServiceFutureStub(io.grpc.Channel channel) {
      super(channel);
    }

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

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

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<if4031.common.LoginResponse> login(
        if4031.common.LoginRequest request) {
      return futureUnaryCall(channel.newCall(METHOD_LOGIN, callOptions), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<if4031.common.StatusResponse>
        changeNickname(if4031.common.ChangeNickRequest request) {
      return futureUnaryCall(channel.newCall(METHOD_CHANGE_NICKNAME, callOptions), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<if4031.common.StatusResponse> logout(
        if4031.common.ActionRequest request) {
      return futureUnaryCall(channel.newCall(METHOD_LOGOUT, callOptions), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<if4031.common.StatusResponse>
        joinChannel(if4031.common.ChannelRequest request) {
      return futureUnaryCall(channel.newCall(METHOD_JOIN_CHANNEL, callOptions), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<if4031.common.MessagesResponse>
        getMessage(if4031.common.ActionRequest request) {
      return futureUnaryCall(channel.newCall(METHOD_GET_MESSAGE, callOptions), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<if4031.common.MessagesResponse>
        sendMessageToChannel(if4031.common.ChannelMessageRequest request) {
      return futureUnaryCall(channel.newCall(METHOD_SEND_MESSAGE_TO_CHANNEL, callOptions), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<if4031.common.MessagesResponse>
        sendMessage(if4031.common.MessageRequest request) {
      return futureUnaryCall(channel.newCall(METHOD_SEND_MESSAGE, callOptions), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<if4031.common.StatusResponse>
        leaveChannel(if4031.common.ChannelRequest request) {
      return futureUnaryCall(channel.newCall(METHOD_LEAVE_CHANNEL, callOptions), request);
    }
  }

  public static io.grpc.ServerServiceDefinition bindService(final IRCService serviceImpl) {
    return io.grpc.ServerServiceDefinition.builder("if4031.IRCService")
        .addMethod(
            io.grpc.ServerMethodDefinition.create(
                METHOD_LOGIN,
                asyncUnaryCall(
                    new io.grpc.stub.ServerCalls.UnaryMethod<
                        if4031.common.LoginRequest, if4031.common.LoginResponse>() {
                      @java.lang.Override
                      public void invoke(
                          if4031.common.LoginRequest request,
                          io.grpc.stub.StreamObserver<if4031.common.LoginResponse>
                              responseObserver) {
                        serviceImpl.login(request, responseObserver);
                      }
                    })))
        .addMethod(
            io.grpc.ServerMethodDefinition.create(
                METHOD_CHANGE_NICKNAME,
                asyncUnaryCall(
                    new io.grpc.stub.ServerCalls.UnaryMethod<
                        if4031.common.ChangeNickRequest, if4031.common.StatusResponse>() {
                      @java.lang.Override
                      public void invoke(
                          if4031.common.ChangeNickRequest request,
                          io.grpc.stub.StreamObserver<if4031.common.StatusResponse>
                              responseObserver) {
                        serviceImpl.changeNickname(request, responseObserver);
                      }
                    })))
        .addMethod(
            io.grpc.ServerMethodDefinition.create(
                METHOD_LOGOUT,
                asyncUnaryCall(
                    new io.grpc.stub.ServerCalls.UnaryMethod<
                        if4031.common.ActionRequest, if4031.common.StatusResponse>() {
                      @java.lang.Override
                      public void invoke(
                          if4031.common.ActionRequest request,
                          io.grpc.stub.StreamObserver<if4031.common.StatusResponse>
                              responseObserver) {
                        serviceImpl.logout(request, responseObserver);
                      }
                    })))
        .addMethod(
            io.grpc.ServerMethodDefinition.create(
                METHOD_JOIN_CHANNEL,
                asyncUnaryCall(
                    new io.grpc.stub.ServerCalls.UnaryMethod<
                        if4031.common.ChannelRequest, if4031.common.StatusResponse>() {
                      @java.lang.Override
                      public void invoke(
                          if4031.common.ChannelRequest request,
                          io.grpc.stub.StreamObserver<if4031.common.StatusResponse>
                              responseObserver) {
                        serviceImpl.joinChannel(request, responseObserver);
                      }
                    })))
        .addMethod(
            io.grpc.ServerMethodDefinition.create(
                METHOD_GET_MESSAGE,
                asyncUnaryCall(
                    new io.grpc.stub.ServerCalls.UnaryMethod<
                        if4031.common.ActionRequest, if4031.common.MessagesResponse>() {
                      @java.lang.Override
                      public void invoke(
                          if4031.common.ActionRequest request,
                          io.grpc.stub.StreamObserver<if4031.common.MessagesResponse>
                              responseObserver) {
                        serviceImpl.getMessage(request, responseObserver);
                      }
                    })))
        .addMethod(
            io.grpc.ServerMethodDefinition.create(
                METHOD_SEND_MESSAGE_TO_CHANNEL,
                asyncUnaryCall(
                    new io.grpc.stub.ServerCalls.UnaryMethod<
                        if4031.common.ChannelMessageRequest, if4031.common.MessagesResponse>() {
                      @java.lang.Override
                      public void invoke(
                          if4031.common.ChannelMessageRequest request,
                          io.grpc.stub.StreamObserver<if4031.common.MessagesResponse>
                              responseObserver) {
                        serviceImpl.sendMessageToChannel(request, responseObserver);
                      }
                    })))
        .addMethod(
            io.grpc.ServerMethodDefinition.create(
                METHOD_SEND_MESSAGE,
                asyncUnaryCall(
                    new io.grpc.stub.ServerCalls.UnaryMethod<
                        if4031.common.MessageRequest, if4031.common.MessagesResponse>() {
                      @java.lang.Override
                      public void invoke(
                          if4031.common.MessageRequest request,
                          io.grpc.stub.StreamObserver<if4031.common.MessagesResponse>
                              responseObserver) {
                        serviceImpl.sendMessage(request, responseObserver);
                      }
                    })))
        .addMethod(
            io.grpc.ServerMethodDefinition.create(
                METHOD_LEAVE_CHANNEL,
                asyncUnaryCall(
                    new io.grpc.stub.ServerCalls.UnaryMethod<
                        if4031.common.ChannelRequest, if4031.common.StatusResponse>() {
                      @java.lang.Override
                      public void invoke(
                          if4031.common.ChannelRequest request,
                          io.grpc.stub.StreamObserver<if4031.common.StatusResponse>
                              responseObserver) {
                        serviceImpl.leaveChannel(request, responseObserver);
                      }
                    })))
        .build();
  }
}
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.1.0-SNAPSHOT)",
    comments = "Source: io/grpc/reflection/v1alpha/reflection.proto")
public class ServerReflectionGrpc {

  private ServerReflectionGrpc() {}

  public static final String SERVICE_NAME = "grpc.reflection.v1alpha.ServerReflection";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<
          io.grpc.reflection.v1alpha.ServerReflectionRequest,
          io.grpc.reflection.v1alpha.ServerReflectionResponse>
      METHOD_SERVER_REFLECTION_INFO =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
              generateFullMethodName(
                  "grpc.reflection.v1alpha.ServerReflection", "ServerReflectionInfo"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.reflection.v1alpha.ServerReflectionRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.reflection.v1alpha.ServerReflectionResponse.getDefaultInstance()));

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

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

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

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

    /**
     *
     *
     * <pre>
     * The reflection service is structured as a bidirectional stream, ensuring
     * all related requests go to a single server.
     * </pre>
     */
    public io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionRequest>
        serverReflectionInfo(
            io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionResponse>
                responseObserver) {
      return asyncUnimplementedStreamingCall(METHOD_SERVER_REFLECTION_INFO, responseObserver);
    }

    @java.lang.Override
    public io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
              METHOD_SERVER_REFLECTION_INFO,
              asyncBidiStreamingCall(
                  new MethodHandlers<
                      io.grpc.reflection.v1alpha.ServerReflectionRequest,
                      io.grpc.reflection.v1alpha.ServerReflectionResponse>(
                      this, METHODID_SERVER_REFLECTION_INFO)))
          .build();
    }
  }

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

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

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

    /**
     *
     *
     * <pre>
     * The reflection service is structured as a bidirectional stream, ensuring
     * all related requests go to a single server.
     * </pre>
     */
    public io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionRequest>
        serverReflectionInfo(
            io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionResponse>
                responseObserver) {
      return asyncBidiStreamingCall(
          getChannel().newCall(METHOD_SERVER_REFLECTION_INFO, getCallOptions()), responseObserver);
    }
  }

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

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

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

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

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

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

  private static final int METHODID_SERVER_REFLECTION_INFO = 0;

  private static class MethodHandlers<Req, Resp>
      implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final ServerReflectionImplBase serviceImpl;
    private final int methodId;

    public MethodHandlers(ServerReflectionImplBase 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<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_SERVER_REFLECTION_INFO:
          return (io.grpc.stub.StreamObserver<Req>)
              serviceImpl.serverReflectionInfo(
                  (io.grpc.stub.StreamObserver<io.grpc.reflection.v1alpha.ServerReflectionResponse>)
                      responseObserver);
        default:
          throw new AssertionError();
      }
    }
  }

  private static final class ServerReflectionDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return io.grpc.reflection.v1alpha.ServerReflectionProto.getDescriptor();
    }
  }

  private static io.grpc.ServiceDescriptor serviceDescriptor;

  public static synchronized io.grpc.ServiceDescriptor getServiceDescriptor() {
    if (serviceDescriptor == null) {
      serviceDescriptor =
          new io.grpc.ServiceDescriptor(
              SERVICE_NAME,
              new ServerReflectionDescriptorSupplier(),
              METHOD_SERVER_REFLECTION_INFO);
    }

    return serviceDescriptor;
  }
}
예제 #3
0
@javax.annotation.Generated("by gRPC proto compiler")
public class TestServiceGrpc {

  private TestServiceGrpc() {}

  public static final String SERVICE_NAME = "grpc.testing.TestService";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<
          io.grpc.testing.SimpleRequest, io.grpc.testing.SimpleResponse>
      METHOD_UNARY_CALL =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName("grpc.testing.TestService", "UnaryCall"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.testing.SimpleRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.testing.SimpleResponse.getDefaultInstance()));

  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<
          io.grpc.testing.SimpleRequest, io.grpc.testing.SimpleResponse>
      METHOD_STREAMING_CALL =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
              generateFullMethodName("grpc.testing.TestService", "StreamingCall"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.testing.SimpleRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.testing.SimpleResponse.getDefaultInstance()));

  public static TestServiceStub newStub(io.grpc.Channel channel) {
    return new TestServiceStub(channel);
  }

  public static TestServiceBlockingStub newBlockingStub(io.grpc.Channel channel) {
    return new TestServiceBlockingStub(channel);
  }

  public static TestServiceFutureStub newFutureStub(io.grpc.Channel channel) {
    return new TestServiceFutureStub(channel);
  }

  public static interface TestService {

    public void unaryCall(
        io.grpc.testing.SimpleRequest request,
        io.grpc.stub.StreamObserver<io.grpc.testing.SimpleResponse> responseObserver);

    public io.grpc.stub.StreamObserver<io.grpc.testing.SimpleRequest> streamingCall(
        io.grpc.stub.StreamObserver<io.grpc.testing.SimpleResponse> responseObserver);
  }

  public static interface TestServiceBlockingClient {

    public io.grpc.testing.SimpleResponse unaryCall(io.grpc.testing.SimpleRequest request);
  }

  public static interface TestServiceFutureClient {

    public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.SimpleResponse>
        unaryCall(io.grpc.testing.SimpleRequest request);
  }

  public static class TestServiceStub extends io.grpc.stub.AbstractStub<TestServiceStub>
      implements TestService {
    private TestServiceStub(io.grpc.Channel channel) {
      super(channel);
    }

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

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

    @java.lang.Override
    public void unaryCall(
        io.grpc.testing.SimpleRequest request,
        io.grpc.stub.StreamObserver<io.grpc.testing.SimpleResponse> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public io.grpc.stub.StreamObserver<io.grpc.testing.SimpleRequest> streamingCall(
        io.grpc.stub.StreamObserver<io.grpc.testing.SimpleResponse> responseObserver) {
      return asyncBidiStreamingCall(
          getChannel().newCall(METHOD_STREAMING_CALL, getCallOptions()), responseObserver);
    }
  }

  public static class TestServiceBlockingStub
      extends io.grpc.stub.AbstractStub<TestServiceBlockingStub>
      implements TestServiceBlockingClient {
    private TestServiceBlockingStub(io.grpc.Channel channel) {
      super(channel);
    }

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

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

    @java.lang.Override
    public io.grpc.testing.SimpleResponse unaryCall(io.grpc.testing.SimpleRequest request) {
      return blockingUnaryCall(getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request);
    }
  }

  public static class TestServiceFutureStub extends io.grpc.stub.AbstractStub<TestServiceFutureStub>
      implements TestServiceFutureClient {
    private TestServiceFutureStub(io.grpc.Channel channel) {
      super(channel);
    }

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

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

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.SimpleResponse>
        unaryCall(io.grpc.testing.SimpleRequest request) {
      return futureUnaryCall(getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request);
    }
  }

  private static final int METHODID_UNARY_CALL = 0;
  private static final int METHODID_STREAMING_CALL = 1;

  private static class MethodHandlers<Req, Resp>
      implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final TestService serviceImpl;
    private final int methodId;

    public MethodHandlers(TestService serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_UNARY_CALL:
          serviceImpl.unaryCall(
              (io.grpc.testing.SimpleRequest) request,
              (io.grpc.stub.StreamObserver<io.grpc.testing.SimpleResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_STREAMING_CALL:
          return (io.grpc.stub.StreamObserver<Req>)
              serviceImpl.streamingCall(
                  (io.grpc.stub.StreamObserver<io.grpc.testing.SimpleResponse>) responseObserver);
        default:
          throw new AssertionError();
      }
    }
  }

  public static io.grpc.ServerServiceDefinition bindService(final TestService serviceImpl) {
    return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME)
        .addMethod(
            METHOD_UNARY_CALL,
            asyncUnaryCall(
                new MethodHandlers<io.grpc.testing.SimpleRequest, io.grpc.testing.SimpleResponse>(
                    serviceImpl, METHODID_UNARY_CALL)))
        .addMethod(
            METHOD_STREAMING_CALL,
            asyncBidiStreamingCall(
                new MethodHandlers<io.grpc.testing.SimpleRequest, io.grpc.testing.SimpleResponse>(
                    serviceImpl, METHODID_STREAMING_CALL)))
        .build();
  }
}
예제 #4
0
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.0.3)",
    comments = "Source: coprocess_object.proto")
public class DispatcherGrpc {

  private DispatcherGrpc() {}

  public static final String SERVICE_NAME = "coprocess.Dispatcher";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<
          coprocess.CoprocessObject.Object, coprocess.CoprocessObject.Object>
      METHOD_DISPATCH =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName("coprocess.Dispatcher", "Dispatch"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  coprocess.CoprocessObject.Object.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  coprocess.CoprocessObject.Object.getDefaultInstance()));

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<
          coprocess.CoprocessObject.Event, coprocess.CoprocessObject.EventReply>
      METHOD_DISPATCH_EVENT =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName("coprocess.Dispatcher", "DispatchEvent"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  coprocess.CoprocessObject.Event.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  coprocess.CoprocessObject.EventReply.getDefaultInstance()));

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

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

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

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

    /** */
    public void dispatch(
        coprocess.CoprocessObject.Object request,
        io.grpc.stub.StreamObserver<coprocess.CoprocessObject.Object> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_DISPATCH, responseObserver);
    }

    /** */
    public void dispatchEvent(
        coprocess.CoprocessObject.Event request,
        io.grpc.stub.StreamObserver<coprocess.CoprocessObject.EventReply> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_DISPATCH_EVENT, responseObserver);
    }

    @java.lang.Override
    public io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
              METHOD_DISPATCH,
              asyncUnaryCall(
                  new MethodHandlers<
                      coprocess.CoprocessObject.Object, coprocess.CoprocessObject.Object>(
                      this, METHODID_DISPATCH)))
          .addMethod(
              METHOD_DISPATCH_EVENT,
              asyncUnaryCall(
                  new MethodHandlers<
                      coprocess.CoprocessObject.Event, coprocess.CoprocessObject.EventReply>(
                      this, METHODID_DISPATCH_EVENT)))
          .build();
    }
  }

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

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

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

    /** */
    public void dispatch(
        coprocess.CoprocessObject.Object request,
        io.grpc.stub.StreamObserver<coprocess.CoprocessObject.Object> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_DISPATCH, getCallOptions()), request, responseObserver);
    }

    /** */
    public void dispatchEvent(
        coprocess.CoprocessObject.Event request,
        io.grpc.stub.StreamObserver<coprocess.CoprocessObject.EventReply> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_DISPATCH_EVENT, getCallOptions()), request, responseObserver);
    }
  }

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

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

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

    /** */
    public coprocess.CoprocessObject.Object dispatch(coprocess.CoprocessObject.Object request) {
      return blockingUnaryCall(getChannel(), METHOD_DISPATCH, getCallOptions(), request);
    }

    /** */
    public coprocess.CoprocessObject.EventReply dispatchEvent(
        coprocess.CoprocessObject.Event request) {
      return blockingUnaryCall(getChannel(), METHOD_DISPATCH_EVENT, getCallOptions(), request);
    }
  }

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

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

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

    /** */
    public com.google.common.util.concurrent.ListenableFuture<coprocess.CoprocessObject.Object>
        dispatch(coprocess.CoprocessObject.Object request) {
      return futureUnaryCall(getChannel().newCall(METHOD_DISPATCH, getCallOptions()), request);
    }

    /** */
    public com.google.common.util.concurrent.ListenableFuture<coprocess.CoprocessObject.EventReply>
        dispatchEvent(coprocess.CoprocessObject.Event request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_DISPATCH_EVENT, getCallOptions()), request);
    }
  }

  private static final int METHODID_DISPATCH = 0;
  private static final int METHODID_DISPATCH_EVENT = 1;

  private static class MethodHandlers<Req, Resp>
      implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final DispatcherImplBase serviceImpl;
    private final int methodId;

    public MethodHandlers(DispatcherImplBase 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<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_DISPATCH:
          serviceImpl.dispatch(
              (coprocess.CoprocessObject.Object) request,
              (io.grpc.stub.StreamObserver<coprocess.CoprocessObject.Object>) responseObserver);
          break;
        case METHODID_DISPATCH_EVENT:
          serviceImpl.dispatchEvent(
              (coprocess.CoprocessObject.Event) request,
              (io.grpc.stub.StreamObserver<coprocess.CoprocessObject.EventReply>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    return new io.grpc.ServiceDescriptor(SERVICE_NAME, METHOD_DISPATCH, METHOD_DISPATCH_EVENT);
  }
}
예제 #5
0
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.1.0-SNAPSHOT)",
    comments = "Source: io/grpc/testing/integration/metrics.proto")
public class MetricsServiceGrpc {

  private MetricsServiceGrpc() {}

  public static final String SERVICE_NAME = "grpc.testing.MetricsService";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<
          io.grpc.testing.integration.Metrics.EmptyMessage,
          io.grpc.testing.integration.Metrics.GaugeResponse>
      METHOD_GET_ALL_GAUGES =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
              generateFullMethodName("grpc.testing.MetricsService", "GetAllGauges"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.testing.integration.Metrics.EmptyMessage.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.testing.integration.Metrics.GaugeResponse.getDefaultInstance()));

  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<
          io.grpc.testing.integration.Metrics.GaugeRequest,
          io.grpc.testing.integration.Metrics.GaugeResponse>
      METHOD_GET_GAUGE =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName("grpc.testing.MetricsService", "GetGauge"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.testing.integration.Metrics.GaugeRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  io.grpc.testing.integration.Metrics.GaugeResponse.getDefaultInstance()));

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

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

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

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

    /**
     *
     *
     * <pre>
     * Returns the values of all the gauges that are currently being maintained by
     * the service
     * </pre>
     */
    public void getAllGauges(
        io.grpc.testing.integration.Metrics.EmptyMessage request,
        io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse>
            responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_GET_ALL_GAUGES, responseObserver);
    }

    /**
     *
     *
     * <pre>
     * Returns the value of one gauge
     * </pre>
     */
    public void getGauge(
        io.grpc.testing.integration.Metrics.GaugeRequest request,
        io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse>
            responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_GET_GAUGE, responseObserver);
    }

    @java.lang.Override
    public io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
              METHOD_GET_ALL_GAUGES,
              asyncServerStreamingCall(
                  new MethodHandlers<
                      io.grpc.testing.integration.Metrics.EmptyMessage,
                      io.grpc.testing.integration.Metrics.GaugeResponse>(
                      this, METHODID_GET_ALL_GAUGES)))
          .addMethod(
              METHOD_GET_GAUGE,
              asyncUnaryCall(
                  new MethodHandlers<
                      io.grpc.testing.integration.Metrics.GaugeRequest,
                      io.grpc.testing.integration.Metrics.GaugeResponse>(this, METHODID_GET_GAUGE)))
          .build();
    }
  }

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

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

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

    /**
     *
     *
     * <pre>
     * Returns the values of all the gauges that are currently being maintained by
     * the service
     * </pre>
     */
    public void getAllGauges(
        io.grpc.testing.integration.Metrics.EmptyMessage request,
        io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse>
            responseObserver) {
      asyncServerStreamingCall(
          getChannel().newCall(METHOD_GET_ALL_GAUGES, getCallOptions()), request, responseObserver);
    }

    /**
     *
     *
     * <pre>
     * Returns the value of one gauge
     * </pre>
     */
    public void getGauge(
        io.grpc.testing.integration.Metrics.GaugeRequest request,
        io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse>
            responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_GET_GAUGE, getCallOptions()), request, responseObserver);
    }
  }

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

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

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

    /**
     *
     *
     * <pre>
     * Returns the values of all the gauges that are currently being maintained by
     * the service
     * </pre>
     */
    public java.util.Iterator<io.grpc.testing.integration.Metrics.GaugeResponse> getAllGauges(
        io.grpc.testing.integration.Metrics.EmptyMessage request) {
      return blockingServerStreamingCall(
          getChannel(), METHOD_GET_ALL_GAUGES, getCallOptions(), request);
    }

    /**
     *
     *
     * <pre>
     * Returns the value of one gauge
     * </pre>
     */
    public io.grpc.testing.integration.Metrics.GaugeResponse getGauge(
        io.grpc.testing.integration.Metrics.GaugeRequest request) {
      return blockingUnaryCall(getChannel(), METHOD_GET_GAUGE, getCallOptions(), request);
    }
  }

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

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

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

    /**
     *
     *
     * <pre>
     * Returns the value of one gauge
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<
            io.grpc.testing.integration.Metrics.GaugeResponse>
        getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request) {
      return futureUnaryCall(getChannel().newCall(METHOD_GET_GAUGE, getCallOptions()), request);
    }
  }

  private static final int METHODID_GET_ALL_GAUGES = 0;
  private static final int METHODID_GET_GAUGE = 1;

  private static class MethodHandlers<Req, Resp>
      implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final MetricsServiceImplBase serviceImpl;
    private final int methodId;

    public MethodHandlers(MetricsServiceImplBase 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<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_GET_ALL_GAUGES:
          serviceImpl.getAllGauges(
              (io.grpc.testing.integration.Metrics.EmptyMessage) request,
              (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse>)
                  responseObserver);
          break;
        case METHODID_GET_GAUGE:
          serviceImpl.getGauge(
              (io.grpc.testing.integration.Metrics.GaugeRequest) request,
              (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse>)
                  responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    return new io.grpc.ServiceDescriptor(SERVICE_NAME, METHOD_GET_ALL_GAUGES, METHOD_GET_GAUGE);
  }
}
/**
 *
 *
 * <pre>
 * Service for creating, configuring, and deleting Cloud Bigtable tables.
 * Provides access to the table schemas only, not the data stored within
 * the tables.
 * </pre>
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 0.14.1)",
    comments = "Source: google/bigtable/admin/v2/bigtable_table_admin.proto")
public class BigtableTableAdminGrpc {

  private BigtableTableAdminGrpc() {}

  public static final String SERVICE_NAME = "google.bigtable.admin.v2.BigtableTableAdmin";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<
          com.google.bigtable.admin.v2.CreateTableRequest, com.google.bigtable.admin.v2.Table>
      METHOD_CREATE_TABLE =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin", "CreateTable"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.CreateTableRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.Table.getDefaultInstance()));

  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<
          com.google.bigtable.admin.v2.ListTablesRequest,
          com.google.bigtable.admin.v2.ListTablesResponse>
      METHOD_LIST_TABLES =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin", "ListTables"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.ListTablesRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.ListTablesResponse.getDefaultInstance()));

  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<
          com.google.bigtable.admin.v2.GetTableRequest, com.google.bigtable.admin.v2.Table>
      METHOD_GET_TABLE =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin", "GetTable"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.GetTableRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.Table.getDefaultInstance()));

  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<
          com.google.bigtable.admin.v2.DeleteTableRequest, com.google.protobuf.Empty>
      METHOD_DELETE_TABLE =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin", "DeleteTable"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.DeleteTableRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()));

  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<
          com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest,
          com.google.bigtable.admin.v2.Table>
      METHOD_MODIFY_COLUMN_FAMILIES =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName(
                  "google.bigtable.admin.v2.BigtableTableAdmin", "ModifyColumnFamilies"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.Table.getDefaultInstance()));

  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<
          com.google.bigtable.admin.v2.DropRowRangeRequest, com.google.protobuf.Empty>
      METHOD_DROP_ROW_RANGE =
          io.grpc.MethodDescriptor.create(
              io.grpc.MethodDescriptor.MethodType.UNARY,
              generateFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin", "DropRowRange"),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.bigtable.admin.v2.DropRowRangeRequest.getDefaultInstance()),
              io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()));

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

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

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

  /**
   *
   *
   * <pre>
   * Service for creating, configuring, and deleting Cloud Bigtable tables.
   * Provides access to the table schemas only, not the data stored within
   * the tables.
   * </pre>
   */
  public static interface BigtableTableAdmin {

    /**
     *
     *
     * <pre>
     * Creates a new table in the specified instance.
     * The table can be created with a full set of initial column families,
     * specified in the request.
     * </pre>
     */
    public void createTable(
        com.google.bigtable.admin.v2.CreateTableRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table> responseObserver);

    /**
     *
     *
     * <pre>
     * Lists all tables served from a specified instance.
     * </pre>
     */
    public void listTables(
        com.google.bigtable.admin.v2.ListTablesRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.ListTablesResponse>
            responseObserver);

    /**
     *
     *
     * <pre>
     * Gets metadata information about the specified table.
     * </pre>
     */
    public void getTable(
        com.google.bigtable.admin.v2.GetTableRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table> responseObserver);

    /**
     *
     *
     * <pre>
     * Permanently deletes a specified table and all of its data.
     * </pre>
     */
    public void deleteTable(
        com.google.bigtable.admin.v2.DeleteTableRequest request,
        io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver);

    /**
     *
     *
     * <pre>
     * Atomically performs a series of column family modifications
     * on the specified table.
     * </pre>
     */
    public void modifyColumnFamilies(
        com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table> responseObserver);

    /**
     *
     *
     * <pre>
     * Permanently drop/delete a row range from a specified table. The request can
     * specify whether to delete all rows in a table, or only those that match a
     * particular prefix.
     * </pre>
     */
    public void dropRowRange(
        com.google.bigtable.admin.v2.DropRowRangeRequest request,
        io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver);
  }

  @io.grpc.ExperimentalApi
  public abstract static class AbstractBigtableTableAdmin
      implements BigtableTableAdmin, io.grpc.BindableService {

    @java.lang.Override
    public void createTable(
        com.google.bigtable.admin.v2.CreateTableRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_CREATE_TABLE, responseObserver);
    }

    @java.lang.Override
    public void listTables(
        com.google.bigtable.admin.v2.ListTablesRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.ListTablesResponse>
            responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_LIST_TABLES, responseObserver);
    }

    @java.lang.Override
    public void getTable(
        com.google.bigtable.admin.v2.GetTableRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_GET_TABLE, responseObserver);
    }

    @java.lang.Override
    public void deleteTable(
        com.google.bigtable.admin.v2.DeleteTableRequest request,
        io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_DELETE_TABLE, responseObserver);
    }

    @java.lang.Override
    public void modifyColumnFamilies(
        com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_MODIFY_COLUMN_FAMILIES, responseObserver);
    }

    @java.lang.Override
    public void dropRowRange(
        com.google.bigtable.admin.v2.DropRowRangeRequest request,
        io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_DROP_ROW_RANGE, responseObserver);
    }

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

  /**
   *
   *
   * <pre>
   * Service for creating, configuring, and deleting Cloud Bigtable tables.
   * Provides access to the table schemas only, not the data stored within
   * the tables.
   * </pre>
   */
  public static interface BigtableTableAdminBlockingClient {

    /**
     *
     *
     * <pre>
     * Creates a new table in the specified instance.
     * The table can be created with a full set of initial column families,
     * specified in the request.
     * </pre>
     */
    public com.google.bigtable.admin.v2.Table createTable(
        com.google.bigtable.admin.v2.CreateTableRequest request);

    /**
     *
     *
     * <pre>
     * Lists all tables served from a specified instance.
     * </pre>
     */
    public com.google.bigtable.admin.v2.ListTablesResponse listTables(
        com.google.bigtable.admin.v2.ListTablesRequest request);

    /**
     *
     *
     * <pre>
     * Gets metadata information about the specified table.
     * </pre>
     */
    public com.google.bigtable.admin.v2.Table getTable(
        com.google.bigtable.admin.v2.GetTableRequest request);

    /**
     *
     *
     * <pre>
     * Permanently deletes a specified table and all of its data.
     * </pre>
     */
    public com.google.protobuf.Empty deleteTable(
        com.google.bigtable.admin.v2.DeleteTableRequest request);

    /**
     *
     *
     * <pre>
     * Atomically performs a series of column family modifications
     * on the specified table.
     * </pre>
     */
    public com.google.bigtable.admin.v2.Table modifyColumnFamilies(
        com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request);

    /**
     *
     *
     * <pre>
     * Permanently drop/delete a row range from a specified table. The request can
     * specify whether to delete all rows in a table, or only those that match a
     * particular prefix.
     * </pre>
     */
    public com.google.protobuf.Empty dropRowRange(
        com.google.bigtable.admin.v2.DropRowRangeRequest request);
  }

  /**
   *
   *
   * <pre>
   * Service for creating, configuring, and deleting Cloud Bigtable tables.
   * Provides access to the table schemas only, not the data stored within
   * the tables.
   * </pre>
   */
  public static interface BigtableTableAdminFutureClient {

    /**
     *
     *
     * <pre>
     * Creates a new table in the specified instance.
     * The table can be created with a full set of initial column families,
     * specified in the request.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table>
        createTable(com.google.bigtable.admin.v2.CreateTableRequest request);

    /**
     *
     *
     * <pre>
     * Lists all tables served from a specified instance.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<
            com.google.bigtable.admin.v2.ListTablesResponse>
        listTables(com.google.bigtable.admin.v2.ListTablesRequest request);

    /**
     *
     *
     * <pre>
     * Gets metadata information about the specified table.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table>
        getTable(com.google.bigtable.admin.v2.GetTableRequest request);

    /**
     *
     *
     * <pre>
     * Permanently deletes a specified table and all of its data.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
        deleteTable(com.google.bigtable.admin.v2.DeleteTableRequest request);

    /**
     *
     *
     * <pre>
     * Atomically performs a series of column family modifications
     * on the specified table.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table>
        modifyColumnFamilies(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request);

    /**
     *
     *
     * <pre>
     * Permanently drop/delete a row range from a specified table. The request can
     * specify whether to delete all rows in a table, or only those that match a
     * particular prefix.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
        dropRowRange(com.google.bigtable.admin.v2.DropRowRangeRequest request);
  }

  public static class BigtableTableAdminStub
      extends io.grpc.stub.AbstractStub<BigtableTableAdminStub> implements BigtableTableAdmin {
    private BigtableTableAdminStub(io.grpc.Channel channel) {
      super(channel);
    }

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

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

    @java.lang.Override
    public void createTable(
        com.google.bigtable.admin.v2.CreateTableRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_CREATE_TABLE, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void listTables(
        com.google.bigtable.admin.v2.ListTablesRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.ListTablesResponse>
            responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_LIST_TABLES, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void getTable(
        com.google.bigtable.admin.v2.GetTableRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_GET_TABLE, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void deleteTable(
        com.google.bigtable.admin.v2.DeleteTableRequest request,
        io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_DELETE_TABLE, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void modifyColumnFamilies(
        com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request,
        io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_MODIFY_COLUMN_FAMILIES, getCallOptions()),
          request,
          responseObserver);
    }

    @java.lang.Override
    public void dropRowRange(
        com.google.bigtable.admin.v2.DropRowRangeRequest request,
        io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_DROP_ROW_RANGE, getCallOptions()), request, responseObserver);
    }
  }

  public static class BigtableTableAdminBlockingStub
      extends io.grpc.stub.AbstractStub<BigtableTableAdminBlockingStub>
      implements BigtableTableAdminBlockingClient {
    private BigtableTableAdminBlockingStub(io.grpc.Channel channel) {
      super(channel);
    }

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

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

    @java.lang.Override
    public com.google.bigtable.admin.v2.Table createTable(
        com.google.bigtable.admin.v2.CreateTableRequest request) {
      return blockingUnaryCall(getChannel(), METHOD_CREATE_TABLE, getCallOptions(), request);
    }

    @java.lang.Override
    public com.google.bigtable.admin.v2.ListTablesResponse listTables(
        com.google.bigtable.admin.v2.ListTablesRequest request) {
      return blockingUnaryCall(getChannel(), METHOD_LIST_TABLES, getCallOptions(), request);
    }

    @java.lang.Override
    public com.google.bigtable.admin.v2.Table getTable(
        com.google.bigtable.admin.v2.GetTableRequest request) {
      return blockingUnaryCall(getChannel(), METHOD_GET_TABLE, getCallOptions(), request);
    }

    @java.lang.Override
    public com.google.protobuf.Empty deleteTable(
        com.google.bigtable.admin.v2.DeleteTableRequest request) {
      return blockingUnaryCall(getChannel(), METHOD_DELETE_TABLE, getCallOptions(), request);
    }

    @java.lang.Override
    public com.google.bigtable.admin.v2.Table modifyColumnFamilies(
        com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_MODIFY_COLUMN_FAMILIES, getCallOptions(), request);
    }

    @java.lang.Override
    public com.google.protobuf.Empty dropRowRange(
        com.google.bigtable.admin.v2.DropRowRangeRequest request) {
      return blockingUnaryCall(getChannel(), METHOD_DROP_ROW_RANGE, getCallOptions(), request);
    }
  }

  public static class BigtableTableAdminFutureStub
      extends io.grpc.stub.AbstractStub<BigtableTableAdminFutureStub>
      implements BigtableTableAdminFutureClient {
    private BigtableTableAdminFutureStub(io.grpc.Channel channel) {
      super(channel);
    }

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

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

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table>
        createTable(com.google.bigtable.admin.v2.CreateTableRequest request) {
      return futureUnaryCall(getChannel().newCall(METHOD_CREATE_TABLE, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<
            com.google.bigtable.admin.v2.ListTablesResponse>
        listTables(com.google.bigtable.admin.v2.ListTablesRequest request) {
      return futureUnaryCall(getChannel().newCall(METHOD_LIST_TABLES, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table>
        getTable(com.google.bigtable.admin.v2.GetTableRequest request) {
      return futureUnaryCall(getChannel().newCall(METHOD_GET_TABLE, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
        deleteTable(com.google.bigtable.admin.v2.DeleteTableRequest request) {
      return futureUnaryCall(getChannel().newCall(METHOD_DELETE_TABLE, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.admin.v2.Table>
        modifyColumnFamilies(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_MODIFY_COLUMN_FAMILIES, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
        dropRowRange(com.google.bigtable.admin.v2.DropRowRangeRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_DROP_ROW_RANGE, getCallOptions()), request);
    }
  }

  private static final int METHODID_CREATE_TABLE = 0;
  private static final int METHODID_LIST_TABLES = 1;
  private static final int METHODID_GET_TABLE = 2;
  private static final int METHODID_DELETE_TABLE = 3;
  private static final int METHODID_MODIFY_COLUMN_FAMILIES = 4;
  private static final int METHODID_DROP_ROW_RANGE = 5;

  private static class MethodHandlers<Req, Resp>
      implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
          io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final BigtableTableAdmin serviceImpl;
    private final int methodId;

    public MethodHandlers(BigtableTableAdmin 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<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_CREATE_TABLE:
          serviceImpl.createTable(
              (com.google.bigtable.admin.v2.CreateTableRequest) request,
              (io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table>) responseObserver);
          break;
        case METHODID_LIST_TABLES:
          serviceImpl.listTables(
              (com.google.bigtable.admin.v2.ListTablesRequest) request,
              (io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.ListTablesResponse>)
                  responseObserver);
          break;
        case METHODID_GET_TABLE:
          serviceImpl.getTable(
              (com.google.bigtable.admin.v2.GetTableRequest) request,
              (io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table>) responseObserver);
          break;
        case METHODID_DELETE_TABLE:
          serviceImpl.deleteTable(
              (com.google.bigtable.admin.v2.DeleteTableRequest) request,
              (io.grpc.stub.StreamObserver<com.google.protobuf.Empty>) responseObserver);
          break;
        case METHODID_MODIFY_COLUMN_FAMILIES:
          serviceImpl.modifyColumnFamilies(
              (com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) request,
              (io.grpc.stub.StreamObserver<com.google.bigtable.admin.v2.Table>) responseObserver);
          break;
        case METHODID_DROP_ROW_RANGE:
          serviceImpl.dropRowRange(
              (com.google.bigtable.admin.v2.DropRowRangeRequest) request,
              (io.grpc.stub.StreamObserver<com.google.protobuf.Empty>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  public static io.grpc.ServerServiceDefinition bindService(final BigtableTableAdmin serviceImpl) {
    return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME)
        .addMethod(
            METHOD_CREATE_TABLE,
            asyncUnaryCall(
                new MethodHandlers<
                    com.google.bigtable.admin.v2.CreateTableRequest,
                    com.google.bigtable.admin.v2.Table>(serviceImpl, METHODID_CREATE_TABLE)))
        .addMethod(
            METHOD_LIST_TABLES,
            asyncUnaryCall(
                new MethodHandlers<
                    com.google.bigtable.admin.v2.ListTablesRequest,
                    com.google.bigtable.admin.v2.ListTablesResponse>(
                    serviceImpl, METHODID_LIST_TABLES)))
        .addMethod(
            METHOD_GET_TABLE,
            asyncUnaryCall(
                new MethodHandlers<
                    com.google.bigtable.admin.v2.GetTableRequest,
                    com.google.bigtable.admin.v2.Table>(serviceImpl, METHODID_GET_TABLE)))
        .addMethod(
            METHOD_DELETE_TABLE,
            asyncUnaryCall(
                new MethodHandlers<
                    com.google.bigtable.admin.v2.DeleteTableRequest, com.google.protobuf.Empty>(
                    serviceImpl, METHODID_DELETE_TABLE)))
        .addMethod(
            METHOD_MODIFY_COLUMN_FAMILIES,
            asyncUnaryCall(
                new MethodHandlers<
                    com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest,
                    com.google.bigtable.admin.v2.Table>(
                    serviceImpl, METHODID_MODIFY_COLUMN_FAMILIES)))
        .addMethod(
            METHOD_DROP_ROW_RANGE,
            asyncUnaryCall(
                new MethodHandlers<
                    com.google.bigtable.admin.v2.DropRowRangeRequest, com.google.protobuf.Empty>(
                    serviceImpl, METHODID_DROP_ROW_RANGE)))
        .build();
  }
}