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

com.yandex.ydb.scripting.v1.ScriptingServiceGrpc Maven / Gradle / Ivy

The newest version!
package com.yandex.ydb.scripting.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.43.2)",
    comments = "Source: ydb/public/api/grpc/ydb_scripting_v1.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ScriptingServiceGrpc {

  private ScriptingServiceGrpc() {}

  public static final String SERVICE_NAME = "Ydb.Scripting.V1.ScriptingService";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "ExecuteYql",
      requestType = com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest.class,
      responseType = com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getExecuteYqlMethod() {
    io.grpc.MethodDescriptor getExecuteYqlMethod;
    if ((getExecuteYqlMethod = ScriptingServiceGrpc.getExecuteYqlMethod) == null) {
      synchronized (ScriptingServiceGrpc.class) {
        if ((getExecuteYqlMethod = ScriptingServiceGrpc.getExecuteYqlMethod) == null) {
          ScriptingServiceGrpc.getExecuteYqlMethod = getExecuteYqlMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteYql"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlResponse.getDefaultInstance()))
              .setSchemaDescriptor(new ScriptingServiceMethodDescriptorSupplier("ExecuteYql"))
              .build();
        }
      }
    }
    return getExecuteYqlMethod;
  }

  private static volatile io.grpc.MethodDescriptor getStreamExecuteYqlMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "StreamExecuteYql",
      requestType = com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest.class,
      responseType = com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlPartialResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getStreamExecuteYqlMethod() {
    io.grpc.MethodDescriptor getStreamExecuteYqlMethod;
    if ((getStreamExecuteYqlMethod = ScriptingServiceGrpc.getStreamExecuteYqlMethod) == null) {
      synchronized (ScriptingServiceGrpc.class) {
        if ((getStreamExecuteYqlMethod = ScriptingServiceGrpc.getStreamExecuteYqlMethod) == null) {
          ScriptingServiceGrpc.getStreamExecuteYqlMethod = getStreamExecuteYqlMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamExecuteYql"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlPartialResponse.getDefaultInstance()))
              .setSchemaDescriptor(new ScriptingServiceMethodDescriptorSupplier("StreamExecuteYql"))
              .build();
        }
      }
    }
    return getStreamExecuteYqlMethod;
  }

  private static volatile io.grpc.MethodDescriptor getExplainYqlMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "ExplainYql",
      requestType = com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlRequest.class,
      responseType = com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getExplainYqlMethod() {
    io.grpc.MethodDescriptor getExplainYqlMethod;
    if ((getExplainYqlMethod = ScriptingServiceGrpc.getExplainYqlMethod) == null) {
      synchronized (ScriptingServiceGrpc.class) {
        if ((getExplainYqlMethod = ScriptingServiceGrpc.getExplainYqlMethod) == null) {
          ScriptingServiceGrpc.getExplainYqlMethod = getExplainYqlMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExplainYql"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlResponse.getDefaultInstance()))
              .setSchemaDescriptor(new ScriptingServiceMethodDescriptorSupplier("ExplainYql"))
              .build();
        }
      }
    }
    return getExplainYqlMethod;
  }

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

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

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

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

    /**
     */
    public void executeYql(com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExecuteYqlMethod(), responseObserver);
    }

    /**
     * 
     * Executes yql request with streaming result.
     * 
*/ public void streamExecuteYql(com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStreamExecuteYqlMethod(), responseObserver); } /** */ public void explainYql(com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExplainYqlMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getExecuteYqlMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest, com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlResponse>( this, METHODID_EXECUTE_YQL))) .addMethod( getStreamExecuteYqlMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest, com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlPartialResponse>( this, METHODID_STREAM_EXECUTE_YQL))) .addMethod( getExplainYqlMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlRequest, com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlResponse>( this, METHODID_EXPLAIN_YQL))) .build(); } } /** */ public static final class ScriptingServiceStub extends io.grpc.stub.AbstractAsyncStub { private ScriptingServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ScriptingServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ScriptingServiceStub(channel, callOptions); } /** */ public void executeYql(com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getExecuteYqlMethod(), getCallOptions()), request, responseObserver); } /** *
     * Executes yql request with streaming result.
     * 
*/ public void streamExecuteYql(com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getStreamExecuteYqlMethod(), getCallOptions()), request, responseObserver); } /** */ public void explainYql(com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getExplainYqlMethod(), getCallOptions()), request, responseObserver); } } /** */ public static final class ScriptingServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private ScriptingServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ScriptingServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ScriptingServiceBlockingStub(channel, callOptions); } /** */ public com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlResponse executeYql(com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getExecuteYqlMethod(), getCallOptions(), request); } /** *
     * Executes yql request with streaming result.
     * 
*/ public java.util.Iterator streamExecuteYql( com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getStreamExecuteYqlMethod(), getCallOptions(), request); } /** */ public com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlResponse explainYql(com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getExplainYqlMethod(), getCallOptions(), request); } } /** */ public static final class ScriptingServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private ScriptingServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ScriptingServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ScriptingServiceFutureStub(channel, callOptions); } /** */ public com.google.common.util.concurrent.ListenableFuture executeYql( com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getExecuteYqlMethod(), getCallOptions()), request); } /** */ public com.google.common.util.concurrent.ListenableFuture explainYql( com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getExplainYqlMethod(), getCallOptions()), request); } } private static final int METHODID_EXECUTE_YQL = 0; private static final int METHODID_STREAM_EXECUTE_YQL = 1; private static final int METHODID_EXPLAIN_YQL = 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 ScriptingServiceImplBase serviceImpl; private final int methodId; MethodHandlers(ScriptingServiceImplBase 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_EXECUTE_YQL: serviceImpl.executeYql((com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_STREAM_EXECUTE_YQL: serviceImpl.streamExecuteYql((com.yandex.ydb.scripting.ScriptingProtos.ExecuteYqlRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_EXPLAIN_YQL: serviceImpl.explainYql((com.yandex.ydb.scripting.ScriptingProtos.ExplainYqlRequest) 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 ScriptingServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ScriptingServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.yandex.ydb.scripting.v1.YdbScriptingV1.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("ScriptingService"); } } private static final class ScriptingServiceFileDescriptorSupplier extends ScriptingServiceBaseDescriptorSupplier { ScriptingServiceFileDescriptorSupplier() {} } private static final class ScriptingServiceMethodDescriptorSupplier extends ScriptingServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; ScriptingServiceMethodDescriptorSupplier(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 (ScriptingServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ScriptingServiceFileDescriptorSupplier()) .addMethod(getExecuteYqlMethod()) .addMethod(getStreamExecuteYqlMethod()) .addMethod(getExplainYqlMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy