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

io.numaproj.numaflow.function.v1.UserDefinedFunctionGrpc Maven / Gradle / Ivy

package io.numaproj.numaflow.function.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.50.2)",
    comments = "Source: function/v1/udfunction.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class UserDefinedFunctionGrpc {

  private UserDefinedFunctionGrpc() {}

  public static final String SERVICE_NAME = "function.v1.UserDefinedFunction";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "MapFn",
      requestType = io.numaproj.numaflow.function.v1.Udfunction.DatumRequest.class,
      responseType = io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getMapFnMethod() {
    io.grpc.MethodDescriptor getMapFnMethod;
    if ((getMapFnMethod = UserDefinedFunctionGrpc.getMapFnMethod) == null) {
      synchronized (UserDefinedFunctionGrpc.class) {
        if ((getMapFnMethod = UserDefinedFunctionGrpc.getMapFnMethod) == null) {
          UserDefinedFunctionGrpc.getMapFnMethod = getMapFnMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MapFn"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.function.v1.Udfunction.DatumRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList.getDefaultInstance()))
              .setSchemaDescriptor(new UserDefinedFunctionMethodDescriptorSupplier("MapFn"))
              .build();
        }
      }
    }
    return getMapFnMethod;
  }

  private static volatile io.grpc.MethodDescriptor getMapTFnMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "MapTFn",
      requestType = io.numaproj.numaflow.function.v1.Udfunction.DatumRequest.class,
      responseType = io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getMapTFnMethod() {
    io.grpc.MethodDescriptor getMapTFnMethod;
    if ((getMapTFnMethod = UserDefinedFunctionGrpc.getMapTFnMethod) == null) {
      synchronized (UserDefinedFunctionGrpc.class) {
        if ((getMapTFnMethod = UserDefinedFunctionGrpc.getMapTFnMethod) == null) {
          UserDefinedFunctionGrpc.getMapTFnMethod = getMapTFnMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MapTFn"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.function.v1.Udfunction.DatumRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList.getDefaultInstance()))
              .setSchemaDescriptor(new UserDefinedFunctionMethodDescriptorSupplier("MapTFn"))
              .build();
        }
      }
    }
    return getMapTFnMethod;
  }

  private static volatile io.grpc.MethodDescriptor getReduceFnMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "ReduceFn",
      requestType = io.numaproj.numaflow.function.v1.Udfunction.DatumRequest.class,
      responseType = io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getReduceFnMethod() {
    io.grpc.MethodDescriptor getReduceFnMethod;
    if ((getReduceFnMethod = UserDefinedFunctionGrpc.getReduceFnMethod) == null) {
      synchronized (UserDefinedFunctionGrpc.class) {
        if ((getReduceFnMethod = UserDefinedFunctionGrpc.getReduceFnMethod) == null) {
          UserDefinedFunctionGrpc.getReduceFnMethod = getReduceFnMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReduceFn"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.function.v1.Udfunction.DatumRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList.getDefaultInstance()))
              .setSchemaDescriptor(new UserDefinedFunctionMethodDescriptorSupplier("ReduceFn"))
              .build();
        }
      }
    }
    return getReduceFnMethod;
  }

  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.function.v1.Udfunction.ReadyResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getIsReadyMethod() {
    io.grpc.MethodDescriptor getIsReadyMethod;
    if ((getIsReadyMethod = UserDefinedFunctionGrpc.getIsReadyMethod) == null) {
      synchronized (UserDefinedFunctionGrpc.class) {
        if ((getIsReadyMethod = UserDefinedFunctionGrpc.getIsReadyMethod) == null) {
          UserDefinedFunctionGrpc.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.function.v1.Udfunction.ReadyResponse.getDefaultInstance()))
              .setSchemaDescriptor(new UserDefinedFunctionMethodDescriptorSupplier("IsReady"))
              .build();
        }
      }
    }
    return getIsReadyMethod;
  }

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

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

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

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

    /**
     * 
     * MapFn applies a function to each datum element.
     * 
*/ public void mapFn(io.numaproj.numaflow.function.v1.Udfunction.DatumRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMapFnMethod(), responseObserver); } /** *
     * MapTFn applies a function to each datum element.
     * In addition to map function, MapTFn also supports assigning a new event time to datum.
     * MapTFn can be used only at source vertex by source data transformer.
     * 
*/ public void mapTFn(io.numaproj.numaflow.function.v1.Udfunction.DatumRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMapTFnMethod(), responseObserver); } /** *
     * ReduceFn applies a reduce function to a datum stream.
     * 
*/ public io.grpc.stub.StreamObserver reduceFn( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getReduceFnMethod(), responseObserver); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public void isReady(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIsReadyMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getMapFnMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.numaproj.numaflow.function.v1.Udfunction.DatumRequest, io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList>( this, METHODID_MAP_FN))) .addMethod( getMapTFnMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.numaproj.numaflow.function.v1.Udfunction.DatumRequest, io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList>( this, METHODID_MAP_TFN))) .addMethod( getReduceFnMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< io.numaproj.numaflow.function.v1.Udfunction.DatumRequest, io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList>( this, METHODID_REDUCE_FN))) .addMethod( getIsReadyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.protobuf.Empty, io.numaproj.numaflow.function.v1.Udfunction.ReadyResponse>( this, METHODID_IS_READY))) .build(); } } /** */ public static final class UserDefinedFunctionStub extends io.grpc.stub.AbstractAsyncStub { private UserDefinedFunctionStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected UserDefinedFunctionStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UserDefinedFunctionStub(channel, callOptions); } /** *
     * MapFn applies a function to each datum element.
     * 
*/ public void mapFn(io.numaproj.numaflow.function.v1.Udfunction.DatumRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getMapFnMethod(), getCallOptions()), request, responseObserver); } /** *
     * MapTFn applies a function to each datum element.
     * In addition to map function, MapTFn also supports assigning a new event time to datum.
     * MapTFn can be used only at source vertex by source data transformer.
     * 
*/ public void mapTFn(io.numaproj.numaflow.function.v1.Udfunction.DatumRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getMapTFnMethod(), getCallOptions()), request, responseObserver); } /** *
     * ReduceFn applies a reduce function to a datum stream.
     * 
*/ public io.grpc.stub.StreamObserver reduceFn( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getReduceFnMethod(), 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); } } /** */ public static final class UserDefinedFunctionBlockingStub extends io.grpc.stub.AbstractBlockingStub { private UserDefinedFunctionBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected UserDefinedFunctionBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UserDefinedFunctionBlockingStub(channel, callOptions); } /** *
     * MapFn applies a function to each datum element.
     * 
*/ public io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList mapFn(io.numaproj.numaflow.function.v1.Udfunction.DatumRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getMapFnMethod(), getCallOptions(), request); } /** *
     * MapTFn applies a function to each datum element.
     * In addition to map function, MapTFn also supports assigning a new event time to datum.
     * MapTFn can be used only at source vertex by source data transformer.
     * 
*/ public io.numaproj.numaflow.function.v1.Udfunction.DatumResponseList mapTFn(io.numaproj.numaflow.function.v1.Udfunction.DatumRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getMapTFnMethod(), getCallOptions(), request); } /** *
     * IsReady is the heartbeat endpoint for gRPC.
     * 
*/ public io.numaproj.numaflow.function.v1.Udfunction.ReadyResponse isReady(com.google.protobuf.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getIsReadyMethod(), getCallOptions(), request); } } /** */ public static final class UserDefinedFunctionFutureStub extends io.grpc.stub.AbstractFutureStub { private UserDefinedFunctionFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected UserDefinedFunctionFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UserDefinedFunctionFutureStub(channel, callOptions); } /** *
     * MapFn applies a function to each datum element.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture mapFn( io.numaproj.numaflow.function.v1.Udfunction.DatumRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getMapFnMethod(), getCallOptions()), request); } /** *
     * MapTFn applies a function to each datum element.
     * In addition to map function, MapTFn also supports assigning a new event time to datum.
     * MapTFn can be used only at source vertex by source data transformer.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture mapTFn( io.numaproj.numaflow.function.v1.Udfunction.DatumRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getMapTFnMethod(), getCallOptions()), request); } /** *
     * 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_MAP_FN = 0; private static final int METHODID_MAP_TFN = 1; private static final int METHODID_IS_READY = 2; private static final int METHODID_REDUCE_FN = 3; 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 UserDefinedFunctionImplBase serviceImpl; private final int methodId; MethodHandlers(UserDefinedFunctionImplBase 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_MAP_FN: serviceImpl.mapFn((io.numaproj.numaflow.function.v1.Udfunction.DatumRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_MAP_TFN: serviceImpl.mapTFn((io.numaproj.numaflow.function.v1.Udfunction.DatumRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; 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_REDUCE_FN: return (io.grpc.stub.StreamObserver) serviceImpl.reduceFn( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } private static abstract class UserDefinedFunctionBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { UserDefinedFunctionBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.numaproj.numaflow.function.v1.Udfunction.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("UserDefinedFunction"); } } private static final class UserDefinedFunctionFileDescriptorSupplier extends UserDefinedFunctionBaseDescriptorSupplier { UserDefinedFunctionFileDescriptorSupplier() {} } private static final class UserDefinedFunctionMethodDescriptorSupplier extends UserDefinedFunctionBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; UserDefinedFunctionMethodDescriptorSupplier(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 (UserDefinedFunctionGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new UserDefinedFunctionFileDescriptorSupplier()) .addMethod(getMapFnMethod()) .addMethod(getMapTFnMethod()) .addMethod(getReduceFnMethod()) .addMethod(getIsReadyMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy