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

cz.proto.ingestion.v2.IngestionWorkerServiceGrpc Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package cz.proto.ingestion.v2;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.47.0)",
    comments = "Source: ingestion_v2.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class IngestionWorkerServiceGrpc {

  private IngestionWorkerServiceGrpc() {}

  public static final String SERVICE_NAME = "cz.proto.ingestion.v2.IngestionWorkerService";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Mutate",
      requestType = cz.proto.ingestion.v2.IngestionV2.MutateRequest.class,
      responseType = cz.proto.ingestion.v2.IngestionV2.MutateResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getMutateMethod() {
    io.grpc.MethodDescriptor getMutateMethod;
    if ((getMutateMethod = IngestionWorkerServiceGrpc.getMutateMethod) == null) {
      synchronized (IngestionWorkerServiceGrpc.class) {
        if ((getMutateMethod = IngestionWorkerServiceGrpc.getMutateMethod) == null) {
          IngestionWorkerServiceGrpc.getMutateMethod = getMutateMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Mutate"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  cz.proto.ingestion.v2.IngestionV2.MutateRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  cz.proto.ingestion.v2.IngestionV2.MutateResponse.getDefaultInstance()))
              .setSchemaDescriptor(new IngestionWorkerServiceMethodDescriptorSupplier("Mutate"))
              .build();
        }
      }
    }
    return getMutateMethod;
  }

  private static volatile io.grpc.MethodDescriptor getMultiMutateMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "MultiMutate",
      requestType = cz.proto.ingestion.v2.IngestionV2.MultiMutateRequest.class,
      responseType = cz.proto.ingestion.v2.IngestionV2.MultiMutateResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getMultiMutateMethod() {
    io.grpc.MethodDescriptor getMultiMutateMethod;
    if ((getMultiMutateMethod = IngestionWorkerServiceGrpc.getMultiMutateMethod) == null) {
      synchronized (IngestionWorkerServiceGrpc.class) {
        if ((getMultiMutateMethod = IngestionWorkerServiceGrpc.getMultiMutateMethod) == null) {
          IngestionWorkerServiceGrpc.getMultiMutateMethod = getMultiMutateMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MultiMutate"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  cz.proto.ingestion.v2.IngestionV2.MultiMutateRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  cz.proto.ingestion.v2.IngestionV2.MultiMutateResponse.getDefaultInstance()))
              .setSchemaDescriptor(new IngestionWorkerServiceMethodDescriptorSupplier("MultiMutate"))
              .build();
        }
      }
    }
    return getMultiMutateMethod;
  }

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

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

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

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

    /**
     */
    public io.grpc.stub.StreamObserver mutate(
        io.grpc.stub.StreamObserver responseObserver) {
      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getMutateMethod(), responseObserver);
    }

    /**
     */
    public io.grpc.stub.StreamObserver multiMutate(
        io.grpc.stub.StreamObserver responseObserver) {
      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getMultiMutateMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getMutateMethod(),
            io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
              new MethodHandlers<
                cz.proto.ingestion.v2.IngestionV2.MutateRequest,
                cz.proto.ingestion.v2.IngestionV2.MutateResponse>(
                  this, METHODID_MUTATE)))
          .addMethod(
            getMultiMutateMethod(),
            io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
              new MethodHandlers<
                cz.proto.ingestion.v2.IngestionV2.MultiMutateRequest,
                cz.proto.ingestion.v2.IngestionV2.MultiMutateResponse>(
                  this, METHODID_MULTI_MUTATE)))
          .build();
    }
  }

  /**
   */
  public static final class IngestionWorkerServiceStub extends io.grpc.stub.AbstractAsyncStub {
    private IngestionWorkerServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public io.grpc.stub.StreamObserver mutate(
        io.grpc.stub.StreamObserver responseObserver) {
      return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
          getChannel().newCall(getMutateMethod(), getCallOptions()), responseObserver);
    }

    /**
     */
    public io.grpc.stub.StreamObserver multiMutate(
        io.grpc.stub.StreamObserver responseObserver) {
      return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
          getChannel().newCall(getMultiMutateMethod(), getCallOptions()), responseObserver);
    }
  }

  /**
   */
  public static final class IngestionWorkerServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
    private IngestionWorkerServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

  /**
   */
  public static final class IngestionWorkerServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
    private IngestionWorkerServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

  private static final int METHODID_MUTATE = 0;
  private static final int METHODID_MULTI_MUTATE = 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 IngestionWorkerServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(IngestionWorkerServiceImplBase 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) {
        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_MUTATE:
          return (io.grpc.stub.StreamObserver) serviceImpl.mutate(
              (io.grpc.stub.StreamObserver) responseObserver);
        case METHODID_MULTI_MUTATE:
          return (io.grpc.stub.StreamObserver) serviceImpl.multiMutate(
              (io.grpc.stub.StreamObserver) responseObserver);
        default:
          throw new AssertionError();
      }
    }
  }

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

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return cz.proto.ingestion.v2.IngestionV2.getDescriptor();
    }

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

  private static final class IngestionWorkerServiceFileDescriptorSupplier
      extends IngestionWorkerServiceBaseDescriptorSupplier {
    IngestionWorkerServiceFileDescriptorSupplier() {}
  }

  private static final class IngestionWorkerServiceMethodDescriptorSupplier
      extends IngestionWorkerServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    IngestionWorkerServiceMethodDescriptorSupplier(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 (IngestionWorkerServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new IngestionWorkerServiceFileDescriptorSupplier())
              .addMethod(getMutateMethod())
              .addMethod(getMultiMutateMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy