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

io.numaproj.numaflow.sourcetransformer.v1.SourceTransformGrpc Maven / Gradle / Ivy

The newest version!
package io.numaproj.numaflow.sourcetransformer.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.65.0)",
    comments = "Source: sourcetransform/v1/sourcetransformer.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class SourceTransformGrpc {

  private SourceTransformGrpc() {}

  public static final java.lang.String SERVICE_NAME = "sourcetransformer.v1.SourceTransform";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "SourceTransformFn",
      requestType = io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.SourceTransformRequest.class,
      responseType = io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.SourceTransformResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getSourceTransformFnMethod() {
    io.grpc.MethodDescriptor getSourceTransformFnMethod;
    if ((getSourceTransformFnMethod = SourceTransformGrpc.getSourceTransformFnMethod) == null) {
      synchronized (SourceTransformGrpc.class) {
        if ((getSourceTransformFnMethod = SourceTransformGrpc.getSourceTransformFnMethod) == null) {
          SourceTransformGrpc.getSourceTransformFnMethod = getSourceTransformFnMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SourceTransformFn"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.SourceTransformRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.SourceTransformResponse.getDefaultInstance()))
              .setSchemaDescriptor(new SourceTransformMethodDescriptorSupplier("SourceTransformFn"))
              .build();
        }
      }
    }
    return getSourceTransformFnMethod;
  }

  private static volatile io.grpc.MethodDescriptor getIsReadyMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "IsReady",
      requestType = com.google.protobuf.Empty.class,
      responseType = io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.ReadyResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getIsReadyMethod() {
    io.grpc.MethodDescriptor getIsReadyMethod;
    if ((getIsReadyMethod = SourceTransformGrpc.getIsReadyMethod) == null) {
      synchronized (SourceTransformGrpc.class) {
        if ((getIsReadyMethod = SourceTransformGrpc.getIsReadyMethod) == null) {
          SourceTransformGrpc.getIsReadyMethod = getIsReadyMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "IsReady"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.ReadyResponse.getDefaultInstance()))
              .setSchemaDescriptor(new SourceTransformMethodDescriptorSupplier("IsReady"))
              .build();
        }
      }
    }
    return getIsReadyMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     * 
     * SourceTransformFn applies a function to each request element.
     * In addition to map function, SourceTransformFn also supports assigning a new event time to response.
     * SourceTransformFn can be used only at source vertex by source data transformer.
     * 
*/ default io.grpc.stub.StreamObserver sourceTransformFn( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getSourceTransformFnMethod(), responseObserver); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ default void isReady(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIsReadyMethod(), responseObserver); } } /** * Base class for the server implementation of the service SourceTransform. */ public static abstract class SourceTransformImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return SourceTransformGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service SourceTransform. */ public static final class SourceTransformStub extends io.grpc.stub.AbstractAsyncStub { private SourceTransformStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected SourceTransformStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new SourceTransformStub(channel, callOptions); } /** *
     * SourceTransformFn applies a function to each request element.
     * In addition to map function, SourceTransformFn also supports assigning a new event time to response.
     * SourceTransformFn can be used only at source vertex by source data transformer.
     * 
*/ public io.grpc.stub.StreamObserver sourceTransformFn( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getSourceTransformFnMethod(), getCallOptions()), responseObserver); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public void isReady(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getIsReadyMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service SourceTransform. */ public static final class SourceTransformBlockingStub extends io.grpc.stub.AbstractBlockingStub { private SourceTransformBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected SourceTransformBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new SourceTransformBlockingStub(channel, callOptions); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.ReadyResponse isReady(com.google.protobuf.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getIsReadyMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service SourceTransform. */ public static final class SourceTransformFutureStub extends io.grpc.stub.AbstractFutureStub { private SourceTransformFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected SourceTransformFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new SourceTransformFutureStub(channel, callOptions); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture isReady( com.google.protobuf.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getIsReadyMethod(), getCallOptions()), request); } } private static final int METHODID_IS_READY = 0; private static final int METHODID_SOURCE_TRANSFORM_FN = 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_IS_READY: serviceImpl.isReady((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) { case METHODID_SOURCE_TRANSFORM_FN: return (io.grpc.stub.StreamObserver) serviceImpl.sourceTransformFn( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getSourceTransformFnMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.SourceTransformRequest, io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.SourceTransformResponse>( service, METHODID_SOURCE_TRANSFORM_FN))) .addMethod( getIsReadyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.protobuf.Empty, io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.ReadyResponse>( service, METHODID_IS_READY))) .build(); } private static abstract class SourceTransformBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { SourceTransformBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.numaproj.numaflow.sourcetransformer.v1.Sourcetransformer.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("SourceTransform"); } } private static final class SourceTransformFileDescriptorSupplier extends SourceTransformBaseDescriptorSupplier { SourceTransformFileDescriptorSupplier() {} } private static final class SourceTransformMethodDescriptorSupplier extends SourceTransformBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; SourceTransformMethodDescriptorSupplier(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 (SourceTransformGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new SourceTransformFileDescriptorSupplier()) .addMethod(getSourceTransformFnMethod()) .addMethod(getIsReadyMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy