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

io.envoyproxy.envoy.service.auth.v3alpha.AuthorizationGrpc Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
package io.envoyproxy.envoy.service.auth.v3alpha;

import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;

/**
 * 
 * A generic interface for performing authorization check on incoming
 * requests to a networked service.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.22.1)", comments = "Source: envoy/service/auth/v3alpha/external_auth.proto") public final class AuthorizationGrpc { private AuthorizationGrpc() {} public static final String SERVICE_NAME = "envoy.service.auth.v3alpha.Authorization"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getCheckMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Check", requestType = io.envoyproxy.envoy.service.auth.v3alpha.CheckRequest.class, responseType = io.envoyproxy.envoy.service.auth.v3alpha.CheckResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getCheckMethod() { io.grpc.MethodDescriptor getCheckMethod; if ((getCheckMethod = AuthorizationGrpc.getCheckMethod) == null) { synchronized (AuthorizationGrpc.class) { if ((getCheckMethod = AuthorizationGrpc.getCheckMethod) == null) { AuthorizationGrpc.getCheckMethod = getCheckMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "envoy.service.auth.v3alpha.Authorization", "Check")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.envoyproxy.envoy.service.auth.v3alpha.CheckRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.envoyproxy.envoy.service.auth.v3alpha.CheckResponse.getDefaultInstance())) .setSchemaDescriptor(new AuthorizationMethodDescriptorSupplier("Check")) .build(); } } } return getCheckMethod; } /** * Creates a new async stub that supports all call types for the service */ public static AuthorizationStub newStub(io.grpc.Channel channel) { return new AuthorizationStub(channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static AuthorizationBlockingStub newBlockingStub( io.grpc.Channel channel) { return new AuthorizationBlockingStub(channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static AuthorizationFutureStub newFutureStub( io.grpc.Channel channel) { return new AuthorizationFutureStub(channel); } /** *
   * A generic interface for performing authorization check on incoming
   * requests to a networked service.
   * 
*/ public static abstract class AuthorizationImplBase implements io.grpc.BindableService { /** *
     * Performs authorization check based on the attributes associated with the
     * incoming request, and returns status `OK` or not `OK`.
     * 
*/ public void check(io.envoyproxy.envoy.service.auth.v3alpha.CheckRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getCheckMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getCheckMethod(), asyncUnaryCall( new MethodHandlers< io.envoyproxy.envoy.service.auth.v3alpha.CheckRequest, io.envoyproxy.envoy.service.auth.v3alpha.CheckResponse>( this, METHODID_CHECK))) .build(); } } /** *
   * A generic interface for performing authorization check on incoming
   * requests to a networked service.
   * 
*/ public static final class AuthorizationStub extends io.grpc.stub.AbstractStub { private AuthorizationStub(io.grpc.Channel channel) { super(channel); } private AuthorizationStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AuthorizationStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AuthorizationStub(channel, callOptions); } /** *
     * Performs authorization check based on the attributes associated with the
     * incoming request, and returns status `OK` or not `OK`.
     * 
*/ public void check(io.envoyproxy.envoy.service.auth.v3alpha.CheckRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getCheckMethod(), getCallOptions()), request, responseObserver); } } /** *
   * A generic interface for performing authorization check on incoming
   * requests to a networked service.
   * 
*/ public static final class AuthorizationBlockingStub extends io.grpc.stub.AbstractStub { private AuthorizationBlockingStub(io.grpc.Channel channel) { super(channel); } private AuthorizationBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AuthorizationBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AuthorizationBlockingStub(channel, callOptions); } /** *
     * Performs authorization check based on the attributes associated with the
     * incoming request, and returns status `OK` or not `OK`.
     * 
*/ public io.envoyproxy.envoy.service.auth.v3alpha.CheckResponse check(io.envoyproxy.envoy.service.auth.v3alpha.CheckRequest request) { return blockingUnaryCall( getChannel(), getCheckMethod(), getCallOptions(), request); } } /** *
   * A generic interface for performing authorization check on incoming
   * requests to a networked service.
   * 
*/ public static final class AuthorizationFutureStub extends io.grpc.stub.AbstractStub { private AuthorizationFutureStub(io.grpc.Channel channel) { super(channel); } private AuthorizationFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AuthorizationFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AuthorizationFutureStub(channel, callOptions); } /** *
     * Performs authorization check based on the attributes associated with the
     * incoming request, and returns status `OK` or not `OK`.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture check( io.envoyproxy.envoy.service.auth.v3alpha.CheckRequest request) { return futureUnaryCall( getChannel().newCall(getCheckMethod(), getCallOptions()), request); } } private static final int METHODID_CHECK = 0; 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 AuthorizationImplBase serviceImpl; private final int methodId; MethodHandlers(AuthorizationImplBase 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_CHECK: serviceImpl.check((io.envoyproxy.envoy.service.auth.v3alpha.CheckRequest) 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(); } } } private static abstract class AuthorizationBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { AuthorizationBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.envoyproxy.envoy.service.auth.v3alpha.ExternalAuthProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Authorization"); } } private static final class AuthorizationFileDescriptorSupplier extends AuthorizationBaseDescriptorSupplier { AuthorizationFileDescriptorSupplier() {} } private static final class AuthorizationMethodDescriptorSupplier extends AuthorizationBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; AuthorizationMethodDescriptorSupplier(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 (AuthorizationGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AuthorizationFileDescriptorSupplier()) .addMethod(getCheckMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy