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

com.wavesplatform.api.grpc.AssetsApiGrpc 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;

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

  private AssetsApiGrpc() {}

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

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetInfo",
      requestType = com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest.class,
      responseType = com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetInfoResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetInfoMethod() {
    io.grpc.MethodDescriptor getGetInfoMethod;
    if ((getGetInfoMethod = AssetsApiGrpc.getGetInfoMethod) == null) {
      synchronized (AssetsApiGrpc.class) {
        if ((getGetInfoMethod = AssetsApiGrpc.getGetInfoMethod) == null) {
          AssetsApiGrpc.getGetInfoMethod = getGetInfoMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInfo"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetInfoResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AssetsApiMethodDescriptorSupplier("GetInfo"))
              .build();
        }
      }
    }
    return getGetInfoMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetNFTListMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetNFTList",
      requestType = com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest.class,
      responseType = com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getGetNFTListMethod() {
    io.grpc.MethodDescriptor getGetNFTListMethod;
    if ((getGetNFTListMethod = AssetsApiGrpc.getGetNFTListMethod) == null) {
      synchronized (AssetsApiGrpc.class) {
        if ((getGetNFTListMethod = AssetsApiGrpc.getGetNFTListMethod) == null) {
          AssetsApiGrpc.getGetNFTListMethod = getGetNFTListMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNFTList"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AssetsApiMethodDescriptorSupplier("GetNFTList"))
              .build();
        }
      }
    }
    return getGetNFTListMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     */
    default void getInfo(com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInfoMethod(), responseObserver);
    }

    /**
     */
    default void getNFTList(com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNFTListMethod(), responseObserver);
    }
  }

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

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

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

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

    /**
     */
    public void getInfo(com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetInfoMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getNFTList(com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
          getChannel().newCall(getGetNFTListMethod(), getCallOptions()), request, responseObserver);
    }
  }

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

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

    /**
     */
    public com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetInfoResponse getInfo(com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetInfoMethod(), getCallOptions(), request);
    }

    /**
     */
    public java.util.Iterator getNFTList(
        com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest request) {
      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
          getChannel(), getGetNFTListMethod(), getCallOptions(), request);
    }
  }

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

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

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getInfo(
        com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetInfoMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_GET_INFO = 0;
  private static final int METHODID_GET_NFTLIST = 1;

  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_INFO:
          serviceImpl.getInfo((com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_NFTLIST:
          serviceImpl.getNFTList((com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest) 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(
          getGetInfoMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest,
              com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetInfoResponse>(
                service, METHODID_GET_INFO)))
        .addMethod(
          getGetNFTListMethod(),
          io.grpc.stub.ServerCalls.asyncServerStreamingCall(
            new MethodHandlers<
              com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest,
              com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTResponse>(
                service, METHODID_GET_NFTLIST)))
        .build();
  }

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

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

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

  private static final class AssetsApiFileDescriptorSupplier
      extends AssetsApiBaseDescriptorSupplier {
    AssetsApiFileDescriptorSupplier() {}
  }

  private static final class AssetsApiMethodDescriptorSupplier
      extends AssetsApiBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    AssetsApiMethodDescriptorSupplier(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 (AssetsApiGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new AssetsApiFileDescriptorSupplier())
              .addMethod(getGetInfoMethod())
              .addMethod(getGetNFTListMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy