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

com.wavesplatform.api.grpc.BlockchainApiGrpc Maven / Gradle / Ivy

package com.wavesplatform.api.grpc;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.54.0)",
    comments = "Source: waves/node/grpc/blockchain_api.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class BlockchainApiGrpc {

  private BlockchainApiGrpc() {}

  public static final String SERVICE_NAME = "waves.node.grpc.BlockchainApi";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetActivationStatus",
      requestType = com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusRequest.class,
      responseType = com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetActivationStatusMethod() {
    io.grpc.MethodDescriptor getGetActivationStatusMethod;
    if ((getGetActivationStatusMethod = BlockchainApiGrpc.getGetActivationStatusMethod) == null) {
      synchronized (BlockchainApiGrpc.class) {
        if ((getGetActivationStatusMethod = BlockchainApiGrpc.getGetActivationStatusMethod) == null) {
          BlockchainApiGrpc.getGetActivationStatusMethod = getGetActivationStatusMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetActivationStatus"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BlockchainApiMethodDescriptorSupplier("GetActivationStatus"))
              .build();
        }
      }
    }
    return getGetActivationStatusMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetBaseTargetMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetBaseTarget",
      requestType = com.google.protobuf.Empty.class,
      responseType = com.wavesplatform.api.grpc.BlockchainApiOuterClass.BaseTargetResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetBaseTargetMethod() {
    io.grpc.MethodDescriptor getGetBaseTargetMethod;
    if ((getGetBaseTargetMethod = BlockchainApiGrpc.getGetBaseTargetMethod) == null) {
      synchronized (BlockchainApiGrpc.class) {
        if ((getGetBaseTargetMethod = BlockchainApiGrpc.getGetBaseTargetMethod) == null) {
          BlockchainApiGrpc.getGetBaseTargetMethod = getGetBaseTargetMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBaseTarget"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.BlockchainApiOuterClass.BaseTargetResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BlockchainApiMethodDescriptorSupplier("GetBaseTarget"))
              .build();
        }
      }
    }
    return getGetBaseTargetMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetCumulativeScoreMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetCumulativeScore",
      requestType = com.google.protobuf.Empty.class,
      responseType = com.wavesplatform.api.grpc.BlockchainApiOuterClass.ScoreResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetCumulativeScoreMethod() {
    io.grpc.MethodDescriptor getGetCumulativeScoreMethod;
    if ((getGetCumulativeScoreMethod = BlockchainApiGrpc.getGetCumulativeScoreMethod) == null) {
      synchronized (BlockchainApiGrpc.class) {
        if ((getGetCumulativeScoreMethod = BlockchainApiGrpc.getGetCumulativeScoreMethod) == null) {
          BlockchainApiGrpc.getGetCumulativeScoreMethod = getGetCumulativeScoreMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCumulativeScore"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.BlockchainApiOuterClass.ScoreResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BlockchainApiMethodDescriptorSupplier("GetCumulativeScore"))
              .build();
        }
      }
    }
    return getGetCumulativeScoreMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     */
    default void getActivationStatus(com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetActivationStatusMethod(), responseObserver);
    }

    /**
     */
    default void getBaseTarget(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBaseTargetMethod(), responseObserver);
    }

    /**
     */
    default void getCumulativeScore(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetCumulativeScoreMethod(), responseObserver);
    }
  }

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

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

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

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

    /**
     */
    public void getActivationStatus(com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetActivationStatusMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getBaseTarget(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetBaseTargetMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getCumulativeScore(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetCumulativeScoreMethod(), getCallOptions()), request, responseObserver);
    }
  }

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

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

    /**
     */
    public com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusResponse getActivationStatus(com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetActivationStatusMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.wavesplatform.api.grpc.BlockchainApiOuterClass.BaseTargetResponse getBaseTarget(com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetBaseTargetMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.wavesplatform.api.grpc.BlockchainApiOuterClass.ScoreResponse getCumulativeScore(com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetCumulativeScoreMethod(), getCallOptions(), request);
    }
  }

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

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

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getActivationStatus(
        com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetActivationStatusMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getBaseTarget(
        com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetBaseTargetMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getCumulativeScore(
        com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetCumulativeScoreMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_GET_ACTIVATION_STATUS = 0;
  private static final int METHODID_GET_BASE_TARGET = 1;
  private static final int METHODID_GET_CUMULATIVE_SCORE = 2;

  private static final class MethodHandlers implements
      io.grpc.stub.ServerCalls.UnaryMethod,
      io.grpc.stub.ServerCalls.ServerStreamingMethod,
      io.grpc.stub.ServerCalls.ClientStreamingMethod,
      io.grpc.stub.ServerCalls.BidiStreamingMethod {
    private final AsyncService serviceImpl;
    private final int methodId;

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

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
      switch (methodId) {
        case METHODID_GET_ACTIVATION_STATUS:
          serviceImpl.getActivationStatus((com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_BASE_TARGET:
          serviceImpl.getBaseTarget((com.google.protobuf.Empty) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_CUMULATIVE_SCORE:
          serviceImpl.getCumulativeScore((com.google.protobuf.Empty) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

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

  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
        .addMethod(
          getGetActivationStatusMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusRequest,
              com.wavesplatform.api.grpc.BlockchainApiOuterClass.ActivationStatusResponse>(
                service, METHODID_GET_ACTIVATION_STATUS)))
        .addMethod(
          getGetBaseTargetMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.google.protobuf.Empty,
              com.wavesplatform.api.grpc.BlockchainApiOuterClass.BaseTargetResponse>(
                service, METHODID_GET_BASE_TARGET)))
        .addMethod(
          getGetCumulativeScoreMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.google.protobuf.Empty,
              com.wavesplatform.api.grpc.BlockchainApiOuterClass.ScoreResponse>(
                service, METHODID_GET_CUMULATIVE_SCORE)))
        .build();
  }

  private static abstract class BlockchainApiBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    BlockchainApiBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.wavesplatform.api.grpc.BlockchainApiOuterClass.getDescriptor();
    }

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

  private static final class BlockchainApiFileDescriptorSupplier
      extends BlockchainApiBaseDescriptorSupplier {
    BlockchainApiFileDescriptorSupplier() {}
  }

  private static final class BlockchainApiMethodDescriptorSupplier
      extends BlockchainApiBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    BlockchainApiMethodDescriptorSupplier(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 (BlockchainApiGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new BlockchainApiFileDescriptorSupplier())
              .addMethod(getGetActivationStatusMethod())
              .addMethod(getGetBaseTargetMethod())
              .addMethod(getGetCumulativeScoreMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy