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

org.finos.tracdap.api.internal.TracRuntimeApiGrpc Maven / Gradle / Ivy

Go to download

TRAC D.A.P. platform API, contains service API definitions for the TRAC platform services

There is a newer version: 0.6.3
Show newest version
package org.finos.tracdap.api.internal;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.63.0)",
    comments = "Source: tracdap/api/internal/runtime.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TracRuntimeApiGrpc {

  private TracRuntimeApiGrpc() {}

  public static final java.lang.String SERVICE_NAME = "tracdap.api.internal.TracRuntimeApi";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "listJobs",
      requestType = org.finos.tracdap.api.internal.ListJobsRequest.class,
      responseType = org.finos.tracdap.api.internal.ListJobsResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getListJobsMethod() {
    io.grpc.MethodDescriptor getListJobsMethod;
    if ((getListJobsMethod = TracRuntimeApiGrpc.getListJobsMethod) == null) {
      synchronized (TracRuntimeApiGrpc.class) {
        if ((getListJobsMethod = TracRuntimeApiGrpc.getListJobsMethod) == null) {
          TracRuntimeApiGrpc.getListJobsMethod = getListJobsMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "listJobs"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.ListJobsRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.ListJobsResponse.getDefaultInstance()))
              .setSchemaDescriptor(new TracRuntimeApiMethodDescriptorSupplier("listJobs"))
              .build();
        }
      }
    }
    return getListJobsMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetJobStatusMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "getJobStatus",
      requestType = org.finos.tracdap.api.internal.BatchJobStatusRequest.class,
      responseType = org.finos.tracdap.api.internal.JobStatus.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetJobStatusMethod() {
    io.grpc.MethodDescriptor getGetJobStatusMethod;
    if ((getGetJobStatusMethod = TracRuntimeApiGrpc.getGetJobStatusMethod) == null) {
      synchronized (TracRuntimeApiGrpc.class) {
        if ((getGetJobStatusMethod = TracRuntimeApiGrpc.getGetJobStatusMethod) == null) {
          TracRuntimeApiGrpc.getGetJobStatusMethod = getGetJobStatusMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getJobStatus"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.BatchJobStatusRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.JobStatus.getDefaultInstance()))
              .setSchemaDescriptor(new TracRuntimeApiMethodDescriptorSupplier("getJobStatus"))
              .build();
        }
      }
    }
    return getGetJobStatusMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetJobDetailsMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "getJobDetails",
      requestType = org.finos.tracdap.api.internal.BatchJobStatusRequest.class,
      responseType = org.finos.tracdap.api.internal.BatchJobResult.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetJobDetailsMethod() {
    io.grpc.MethodDescriptor getGetJobDetailsMethod;
    if ((getGetJobDetailsMethod = TracRuntimeApiGrpc.getGetJobDetailsMethod) == null) {
      synchronized (TracRuntimeApiGrpc.class) {
        if ((getGetJobDetailsMethod = TracRuntimeApiGrpc.getGetJobDetailsMethod) == null) {
          TracRuntimeApiGrpc.getGetJobDetailsMethod = getGetJobDetailsMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getJobDetails"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.BatchJobStatusRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.BatchJobResult.getDefaultInstance()))
              .setSchemaDescriptor(new TracRuntimeApiMethodDescriptorSupplier("getJobDetails"))
              .build();
        }
      }
    }
    return getGetJobDetailsMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     */
    default void listJobs(org.finos.tracdap.api.internal.ListJobsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListJobsMethod(), responseObserver);
    }

    /**
     */
    default void getJobStatus(org.finos.tracdap.api.internal.BatchJobStatusRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetJobStatusMethod(), responseObserver);
    }

    /**
     */
    default void getJobDetails(org.finos.tracdap.api.internal.BatchJobStatusRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetJobDetailsMethod(), responseObserver);
    }
  }

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

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

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

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

    /**
     */
    public void listJobs(org.finos.tracdap.api.internal.ListJobsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getListJobsMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getJobStatus(org.finos.tracdap.api.internal.BatchJobStatusRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetJobStatusMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getJobDetails(org.finos.tracdap.api.internal.BatchJobStatusRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetJobDetailsMethod(), getCallOptions()), request, responseObserver);
    }
  }

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

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

    /**
     */
    public org.finos.tracdap.api.internal.ListJobsResponse listJobs(org.finos.tracdap.api.internal.ListJobsRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getListJobsMethod(), getCallOptions(), request);
    }

    /**
     */
    public org.finos.tracdap.api.internal.JobStatus getJobStatus(org.finos.tracdap.api.internal.BatchJobStatusRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetJobStatusMethod(), getCallOptions(), request);
    }

    /**
     */
    public org.finos.tracdap.api.internal.BatchJobResult getJobDetails(org.finos.tracdap.api.internal.BatchJobStatusRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetJobDetailsMethod(), getCallOptions(), request);
    }
  }

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

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

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture listJobs(
        org.finos.tracdap.api.internal.ListJobsRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getListJobsMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getJobStatus(
        org.finos.tracdap.api.internal.BatchJobStatusRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetJobStatusMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getJobDetails(
        org.finos.tracdap.api.internal.BatchJobStatusRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetJobDetailsMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_LIST_JOBS = 0;
  private static final int METHODID_GET_JOB_STATUS = 1;
  private static final int METHODID_GET_JOB_DETAILS = 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_LIST_JOBS:
          serviceImpl.listJobs((org.finos.tracdap.api.internal.ListJobsRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_JOB_STATUS:
          serviceImpl.getJobStatus((org.finos.tracdap.api.internal.BatchJobStatusRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_JOB_DETAILS:
          serviceImpl.getJobDetails((org.finos.tracdap.api.internal.BatchJobStatusRequest) 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(
          getListJobsMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              org.finos.tracdap.api.internal.ListJobsRequest,
              org.finos.tracdap.api.internal.ListJobsResponse>(
                service, METHODID_LIST_JOBS)))
        .addMethod(
          getGetJobStatusMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              org.finos.tracdap.api.internal.BatchJobStatusRequest,
              org.finos.tracdap.api.internal.JobStatus>(
                service, METHODID_GET_JOB_STATUS)))
        .addMethod(
          getGetJobDetailsMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              org.finos.tracdap.api.internal.BatchJobStatusRequest,
              org.finos.tracdap.api.internal.BatchJobResult>(
                service, METHODID_GET_JOB_DETAILS)))
        .build();
  }

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

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return org.finos.tracdap.api.internal.Runtime.getDescriptor();
    }

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

  private static final class TracRuntimeApiFileDescriptorSupplier
      extends TracRuntimeApiBaseDescriptorSupplier {
    TracRuntimeApiFileDescriptorSupplier() {}
  }

  private static final class TracRuntimeApiMethodDescriptorSupplier
      extends TracRuntimeApiBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final java.lang.String methodName;

    TracRuntimeApiMethodDescriptorSupplier(java.lang.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 (TracRuntimeApiGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new TracRuntimeApiFileDescriptorSupplier())
              .addMethod(getListJobsMethod())
              .addMethod(getGetJobStatusMethod())
              .addMethod(getGetJobDetailsMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy