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

dev.cel.expr.conformance.ConformanceServiceGrpc Maven / Gradle / Ivy

There is a newer version: 1.0.47
Show newest version
package dev.cel.expr.conformance;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Access a CEL implementation from another process or machine.
 * A CEL implementation is decomposed as a parser, a static checker,
 * and an evaluator.  Every CEL implementation is expected to provide
 * a server for this API.  The API will be used for conformance testing
 * and other utilities.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.62.2)", comments = "Source: cel/expr/conformance/conformance_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ConformanceServiceGrpc { private ConformanceServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "cel.expr.conformance.ConformanceService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getParseMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Parse", requestType = dev.cel.expr.conformance.ParseRequest.class, responseType = dev.cel.expr.conformance.ParseResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getParseMethod() { io.grpc.MethodDescriptor getParseMethod; if ((getParseMethod = ConformanceServiceGrpc.getParseMethod) == null) { synchronized (ConformanceServiceGrpc.class) { if ((getParseMethod = ConformanceServiceGrpc.getParseMethod) == null) { ConformanceServiceGrpc.getParseMethod = getParseMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Parse")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( dev.cel.expr.conformance.ParseRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( dev.cel.expr.conformance.ParseResponse.getDefaultInstance())) .setSchemaDescriptor(new ConformanceServiceMethodDescriptorSupplier("Parse")) .build(); } } } return getParseMethod; } private static volatile io.grpc.MethodDescriptor getCheckMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Check", requestType = dev.cel.expr.conformance.CheckRequest.class, responseType = dev.cel.expr.conformance.CheckResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getCheckMethod() { io.grpc.MethodDescriptor getCheckMethod; if ((getCheckMethod = ConformanceServiceGrpc.getCheckMethod) == null) { synchronized (ConformanceServiceGrpc.class) { if ((getCheckMethod = ConformanceServiceGrpc.getCheckMethod) == null) { ConformanceServiceGrpc.getCheckMethod = getCheckMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Check")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( dev.cel.expr.conformance.CheckRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( dev.cel.expr.conformance.CheckResponse.getDefaultInstance())) .setSchemaDescriptor(new ConformanceServiceMethodDescriptorSupplier("Check")) .build(); } } } return getCheckMethod; } private static volatile io.grpc.MethodDescriptor getEvalMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Eval", requestType = dev.cel.expr.conformance.EvalRequest.class, responseType = dev.cel.expr.conformance.EvalResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getEvalMethod() { io.grpc.MethodDescriptor getEvalMethod; if ((getEvalMethod = ConformanceServiceGrpc.getEvalMethod) == null) { synchronized (ConformanceServiceGrpc.class) { if ((getEvalMethod = ConformanceServiceGrpc.getEvalMethod) == null) { ConformanceServiceGrpc.getEvalMethod = getEvalMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Eval")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( dev.cel.expr.conformance.EvalRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( dev.cel.expr.conformance.EvalResponse.getDefaultInstance())) .setSchemaDescriptor(new ConformanceServiceMethodDescriptorSupplier("Eval")) .build(); } } } return getEvalMethod; } /** * Creates a new async stub that supports all call types for the service */ public static ConformanceServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ConformanceServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConformanceServiceStub(channel, callOptions); } }; return ConformanceServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static ConformanceServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ConformanceServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConformanceServiceBlockingStub(channel, callOptions); } }; return ConformanceServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static ConformanceServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ConformanceServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConformanceServiceFutureStub(channel, callOptions); } }; return ConformanceServiceFutureStub.newStub(factory, channel); } /** *
   * Access a CEL implementation from another process or machine.
   * A CEL implementation is decomposed as a parser, a static checker,
   * and an evaluator.  Every CEL implementation is expected to provide
   * a server for this API.  The API will be used for conformance testing
   * and other utilities.
   * 
*/ public interface AsyncService { /** *
     * Transforms CEL source text into a parsed representation.
     * 
*/ default void parse(dev.cel.expr.conformance.ParseRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getParseMethod(), responseObserver); } /** *
     * Runs static checks on a parsed CEL representation and return
     * an annotated representation, or a set of issues.
     * 
*/ default void check(dev.cel.expr.conformance.CheckRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCheckMethod(), responseObserver); } /** *
     * Evaluates a parsed or annotation CEL representation given
     * values of external bindings.
     * 
*/ default void eval(dev.cel.expr.conformance.EvalRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEvalMethod(), responseObserver); } } /** * Base class for the server implementation of the service ConformanceService. *
   * Access a CEL implementation from another process or machine.
   * A CEL implementation is decomposed as a parser, a static checker,
   * and an evaluator.  Every CEL implementation is expected to provide
   * a server for this API.  The API will be used for conformance testing
   * and other utilities.
   * 
*/ public static abstract class ConformanceServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return ConformanceServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service ConformanceService. *
   * Access a CEL implementation from another process or machine.
   * A CEL implementation is decomposed as a parser, a static checker,
   * and an evaluator.  Every CEL implementation is expected to provide
   * a server for this API.  The API will be used for conformance testing
   * and other utilities.
   * 
*/ public static final class ConformanceServiceStub extends io.grpc.stub.AbstractAsyncStub { private ConformanceServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ConformanceServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConformanceServiceStub(channel, callOptions); } /** *
     * Transforms CEL source text into a parsed representation.
     * 
*/ public void parse(dev.cel.expr.conformance.ParseRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getParseMethod(), getCallOptions()), request, responseObserver); } /** *
     * Runs static checks on a parsed CEL representation and return
     * an annotated representation, or a set of issues.
     * 
*/ public void check(dev.cel.expr.conformance.CheckRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCheckMethod(), getCallOptions()), request, responseObserver); } /** *
     * Evaluates a parsed or annotation CEL representation given
     * values of external bindings.
     * 
*/ public void eval(dev.cel.expr.conformance.EvalRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getEvalMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service ConformanceService. *
   * Access a CEL implementation from another process or machine.
   * A CEL implementation is decomposed as a parser, a static checker,
   * and an evaluator.  Every CEL implementation is expected to provide
   * a server for this API.  The API will be used for conformance testing
   * and other utilities.
   * 
*/ public static final class ConformanceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private ConformanceServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ConformanceServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConformanceServiceBlockingStub(channel, callOptions); } /** *
     * Transforms CEL source text into a parsed representation.
     * 
*/ public dev.cel.expr.conformance.ParseResponse parse(dev.cel.expr.conformance.ParseRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getParseMethod(), getCallOptions(), request); } /** *
     * Runs static checks on a parsed CEL representation and return
     * an annotated representation, or a set of issues.
     * 
*/ public dev.cel.expr.conformance.CheckResponse check(dev.cel.expr.conformance.CheckRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCheckMethod(), getCallOptions(), request); } /** *
     * Evaluates a parsed or annotation CEL representation given
     * values of external bindings.
     * 
*/ public dev.cel.expr.conformance.EvalResponse eval(dev.cel.expr.conformance.EvalRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getEvalMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service ConformanceService. *
   * Access a CEL implementation from another process or machine.
   * A CEL implementation is decomposed as a parser, a static checker,
   * and an evaluator.  Every CEL implementation is expected to provide
   * a server for this API.  The API will be used for conformance testing
   * and other utilities.
   * 
*/ public static final class ConformanceServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private ConformanceServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ConformanceServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConformanceServiceFutureStub(channel, callOptions); } /** *
     * Transforms CEL source text into a parsed representation.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture parse( dev.cel.expr.conformance.ParseRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getParseMethod(), getCallOptions()), request); } /** *
     * Runs static checks on a parsed CEL representation and return
     * an annotated representation, or a set of issues.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture check( dev.cel.expr.conformance.CheckRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCheckMethod(), getCallOptions()), request); } /** *
     * Evaluates a parsed or annotation CEL representation given
     * values of external bindings.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture eval( dev.cel.expr.conformance.EvalRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getEvalMethod(), getCallOptions()), request); } } private static final int METHODID_PARSE = 0; private static final int METHODID_CHECK = 1; private static final int METHODID_EVAL = 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_PARSE: serviceImpl.parse((dev.cel.expr.conformance.ParseRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_CHECK: serviceImpl.check((dev.cel.expr.conformance.CheckRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_EVAL: serviceImpl.eval((dev.cel.expr.conformance.EvalRequest) 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( getParseMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< dev.cel.expr.conformance.ParseRequest, dev.cel.expr.conformance.ParseResponse>( service, METHODID_PARSE))) .addMethod( getCheckMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< dev.cel.expr.conformance.CheckRequest, dev.cel.expr.conformance.CheckResponse>( service, METHODID_CHECK))) .addMethod( getEvalMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< dev.cel.expr.conformance.EvalRequest, dev.cel.expr.conformance.EvalResponse>( service, METHODID_EVAL))) .build(); } private static abstract class ConformanceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ConformanceServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return dev.cel.expr.conformance.ConformanceServiceProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("ConformanceService"); } } private static final class ConformanceServiceFileDescriptorSupplier extends ConformanceServiceBaseDescriptorSupplier { ConformanceServiceFileDescriptorSupplier() {} } private static final class ConformanceServiceMethodDescriptorSupplier extends ConformanceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; ConformanceServiceMethodDescriptorSupplier(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 (ConformanceServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ConformanceServiceFileDescriptorSupplier()) .addMethod(getParseMethod()) .addMethod(getCheckMethod()) .addMethod(getEvalMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy