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

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

There is a newer version: 1.5.2
Show newest version
package com.wavesplatform.api.grpc;

import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.25.0)",
    comments = "Source: waves/node/grpc/accounts_api.proto")
public final class AccountsApiGrpc {

  private AccountsApiGrpc() {}

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

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetBalances",
      requestType = com.wavesplatform.api.grpc.AccountsApiOuterClass.BalancesRequest.class,
      responseType = com.wavesplatform.api.grpc.AccountsApiOuterClass.BalanceResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getGetBalancesMethod() {
    io.grpc.MethodDescriptor getGetBalancesMethod;
    if ((getGetBalancesMethod = AccountsApiGrpc.getGetBalancesMethod) == null) {
      synchronized (AccountsApiGrpc.class) {
        if ((getGetBalancesMethod = AccountsApiGrpc.getGetBalancesMethod) == null) {
          AccountsApiGrpc.getGetBalancesMethod = getGetBalancesMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBalances"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AccountsApiOuterClass.BalancesRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AccountsApiOuterClass.BalanceResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AccountsApiMethodDescriptorSupplier("GetBalances"))
              .build();
        }
      }
    }
    return getGetBalancesMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetScriptMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetScript",
      requestType = com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest.class,
      responseType = com.wavesplatform.api.grpc.AccountsApiOuterClass.ScriptData.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetScriptMethod() {
    io.grpc.MethodDescriptor getGetScriptMethod;
    if ((getGetScriptMethod = AccountsApiGrpc.getGetScriptMethod) == null) {
      synchronized (AccountsApiGrpc.class) {
        if ((getGetScriptMethod = AccountsApiGrpc.getGetScriptMethod) == null) {
          AccountsApiGrpc.getGetScriptMethod = getGetScriptMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetScript"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AccountsApiOuterClass.ScriptData.getDefaultInstance()))
              .setSchemaDescriptor(new AccountsApiMethodDescriptorSupplier("GetScript"))
              .build();
        }
      }
    }
    return getGetScriptMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetActiveLeasesMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetActiveLeases",
      requestType = com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest.class,
      responseType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getGetActiveLeasesMethod() {
    io.grpc.MethodDescriptor getGetActiveLeasesMethod;
    if ((getGetActiveLeasesMethod = AccountsApiGrpc.getGetActiveLeasesMethod) == null) {
      synchronized (AccountsApiGrpc.class) {
        if ((getGetActiveLeasesMethod = AccountsApiGrpc.getGetActiveLeasesMethod) == null) {
          AccountsApiGrpc.getGetActiveLeasesMethod = getGetActiveLeasesMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetActiveLeases"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AccountsApiMethodDescriptorSupplier("GetActiveLeases"))
              .build();
        }
      }
    }
    return getGetActiveLeasesMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetDataEntriesMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetDataEntries",
      requestType = com.wavesplatform.api.grpc.AccountsApiOuterClass.DataRequest.class,
      responseType = com.wavesplatform.api.grpc.AccountsApiOuterClass.DataEntryResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getGetDataEntriesMethod() {
    io.grpc.MethodDescriptor getGetDataEntriesMethod;
    if ((getGetDataEntriesMethod = AccountsApiGrpc.getGetDataEntriesMethod) == null) {
      synchronized (AccountsApiGrpc.class) {
        if ((getGetDataEntriesMethod = AccountsApiGrpc.getGetDataEntriesMethod) == null) {
          AccountsApiGrpc.getGetDataEntriesMethod = getGetDataEntriesMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataEntries"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AccountsApiOuterClass.DataRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AccountsApiOuterClass.DataEntryResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AccountsApiMethodDescriptorSupplier("GetDataEntries"))
              .build();
        }
      }
    }
    return getGetDataEntriesMethod;
  }

  private static volatile io.grpc.MethodDescriptor getResolveAliasMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "ResolveAlias",
      requestType = com.google.protobuf.StringValue.class,
      responseType = com.google.protobuf.BytesValue.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getResolveAliasMethod() {
    io.grpc.MethodDescriptor getResolveAliasMethod;
    if ((getResolveAliasMethod = AccountsApiGrpc.getResolveAliasMethod) == null) {
      synchronized (AccountsApiGrpc.class) {
        if ((getResolveAliasMethod = AccountsApiGrpc.getResolveAliasMethod) == null) {
          AccountsApiGrpc.getResolveAliasMethod = getResolveAliasMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResolveAlias"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.StringValue.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.BytesValue.getDefaultInstance()))
              .setSchemaDescriptor(new AccountsApiMethodDescriptorSupplier("ResolveAlias"))
              .build();
        }
      }
    }
    return getResolveAliasMethod;
  }

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

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

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

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

    /**
     */
    public void getBalances(com.wavesplatform.api.grpc.AccountsApiOuterClass.BalancesRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getGetBalancesMethod(), responseObserver);
    }

    /**
     */
    public void getScript(com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getGetScriptMethod(), responseObserver);
    }

    /**
     */
    public void getActiveLeases(com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getGetActiveLeasesMethod(), responseObserver);
    }

    /**
     */
    public void getDataEntries(com.wavesplatform.api.grpc.AccountsApiOuterClass.DataRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getGetDataEntriesMethod(), responseObserver);
    }

    /**
     */
    public void resolveAlias(com.google.protobuf.StringValue request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getResolveAliasMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getGetBalancesMethod(),
            asyncServerStreamingCall(
              new MethodHandlers<
                com.wavesplatform.api.grpc.AccountsApiOuterClass.BalancesRequest,
                com.wavesplatform.api.grpc.AccountsApiOuterClass.BalanceResponse>(
                  this, METHODID_GET_BALANCES)))
          .addMethod(
            getGetScriptMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest,
                com.wavesplatform.api.grpc.AccountsApiOuterClass.ScriptData>(
                  this, METHODID_GET_SCRIPT)))
          .addMethod(
            getGetActiveLeasesMethod(),
            asyncServerStreamingCall(
              new MethodHandlers<
                com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest,
                com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionResponse>(
                  this, METHODID_GET_ACTIVE_LEASES)))
          .addMethod(
            getGetDataEntriesMethod(),
            asyncServerStreamingCall(
              new MethodHandlers<
                com.wavesplatform.api.grpc.AccountsApiOuterClass.DataRequest,
                com.wavesplatform.api.grpc.AccountsApiOuterClass.DataEntryResponse>(
                  this, METHODID_GET_DATA_ENTRIES)))
          .addMethod(
            getResolveAliasMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                com.google.protobuf.StringValue,
                com.google.protobuf.BytesValue>(
                  this, METHODID_RESOLVE_ALIAS)))
          .build();
    }
  }

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

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

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

    /**
     */
    public void getBalances(com.wavesplatform.api.grpc.AccountsApiOuterClass.BalancesRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncServerStreamingCall(
          getChannel().newCall(getGetBalancesMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getScript(com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getGetScriptMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getActiveLeases(com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncServerStreamingCall(
          getChannel().newCall(getGetActiveLeasesMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getDataEntries(com.wavesplatform.api.grpc.AccountsApiOuterClass.DataRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncServerStreamingCall(
          getChannel().newCall(getGetDataEntriesMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void resolveAlias(com.google.protobuf.StringValue request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getResolveAliasMethod(), getCallOptions()), request, responseObserver);
    }
  }

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

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

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

    /**
     */
    public java.util.Iterator getBalances(
        com.wavesplatform.api.grpc.AccountsApiOuterClass.BalancesRequest request) {
      return blockingServerStreamingCall(
          getChannel(), getGetBalancesMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.wavesplatform.api.grpc.AccountsApiOuterClass.ScriptData getScript(com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest request) {
      return blockingUnaryCall(
          getChannel(), getGetScriptMethod(), getCallOptions(), request);
    }

    /**
     */
    public java.util.Iterator getActiveLeases(
        com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest request) {
      return blockingServerStreamingCall(
          getChannel(), getGetActiveLeasesMethod(), getCallOptions(), request);
    }

    /**
     */
    public java.util.Iterator getDataEntries(
        com.wavesplatform.api.grpc.AccountsApiOuterClass.DataRequest request) {
      return blockingServerStreamingCall(
          getChannel(), getGetDataEntriesMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.google.protobuf.BytesValue resolveAlias(com.google.protobuf.StringValue request) {
      return blockingUnaryCall(
          getChannel(), getResolveAliasMethod(), getCallOptions(), request);
    }
  }

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

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

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

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getScript(
        com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest request) {
      return futureUnaryCall(
          getChannel().newCall(getGetScriptMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture resolveAlias(
        com.google.protobuf.StringValue request) {
      return futureUnaryCall(
          getChannel().newCall(getResolveAliasMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_GET_BALANCES = 0;
  private static final int METHODID_GET_SCRIPT = 1;
  private static final int METHODID_GET_ACTIVE_LEASES = 2;
  private static final int METHODID_GET_DATA_ENTRIES = 3;
  private static final int METHODID_RESOLVE_ALIAS = 4;

  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 AccountsApiImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(AccountsApiImplBase 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_BALANCES:
          serviceImpl.getBalances((com.wavesplatform.api.grpc.AccountsApiOuterClass.BalancesRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_SCRIPT:
          serviceImpl.getScript((com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_ACTIVE_LEASES:
          serviceImpl.getActiveLeases((com.wavesplatform.api.grpc.AccountsApiOuterClass.AccountRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_DATA_ENTRIES:
          serviceImpl.getDataEntries((com.wavesplatform.api.grpc.AccountsApiOuterClass.DataRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_RESOLVE_ALIAS:
          serviceImpl.resolveAlias((com.google.protobuf.StringValue) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

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

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

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

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

  private static final class AccountsApiFileDescriptorSupplier
      extends AccountsApiBaseDescriptorSupplier {
    AccountsApiFileDescriptorSupplier() {}
  }

  private static final class AccountsApiMethodDescriptorSupplier
      extends AccountsApiBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    AccountsApiMethodDescriptorSupplier(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 (AccountsApiGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new AccountsApiFileDescriptorSupplier())
              .addMethod(getGetBalancesMethod())
              .addMethod(getGetScriptMethod())
              .addMethod(getGetActiveLeasesMethod())
              .addMethod(getGetDataEntriesMethod())
              .addMethod(getResolveAliasMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy