istio.v1.auth.IstioCertificateServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dubbo Show documentation
Show all versions of dubbo Show documentation
The all in one project of dubbo
package istio.v1.auth;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Service for managing certificates issued by the CA.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.54.0)",
comments = "Source: ca.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class IstioCertificateServiceGrpc {
private IstioCertificateServiceGrpc() {}
public static final String SERVICE_NAME = "istio.v1.auth.IstioCertificateService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getCreateCertificateMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateCertificate",
requestType = istio.v1.auth.IstioCertificateRequest.class,
responseType = istio.v1.auth.IstioCertificateResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCreateCertificateMethod() {
io.grpc.MethodDescriptor getCreateCertificateMethod;
if ((getCreateCertificateMethod = IstioCertificateServiceGrpc.getCreateCertificateMethod) == null) {
synchronized (IstioCertificateServiceGrpc.class) {
if ((getCreateCertificateMethod = IstioCertificateServiceGrpc.getCreateCertificateMethod) == null) {
IstioCertificateServiceGrpc.getCreateCertificateMethod = getCreateCertificateMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCertificate"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
istio.v1.auth.IstioCertificateRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
istio.v1.auth.IstioCertificateResponse.getDefaultInstance()))
.setSchemaDescriptor(new IstioCertificateServiceMethodDescriptorSupplier("CreateCertificate"))
.build();
}
}
}
return getCreateCertificateMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static IstioCertificateServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IstioCertificateServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IstioCertificateServiceStub(channel, callOptions);
}
};
return IstioCertificateServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static IstioCertificateServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IstioCertificateServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IstioCertificateServiceBlockingStub(channel, callOptions);
}
};
return IstioCertificateServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static IstioCertificateServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IstioCertificateServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IstioCertificateServiceFutureStub(channel, callOptions);
}
};
return IstioCertificateServiceFutureStub.newStub(factory, channel);
}
/**
*
* Service for managing certificates issued by the CA.
*
*/
public interface AsyncService {
/**
*
* Using provided CSR, returns a signed certificate.
*
*/
default void createCertificate(istio.v1.auth.IstioCertificateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateCertificateMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service IstioCertificateService.
*
* Service for managing certificates issued by the CA.
*
*/
public static abstract class IstioCertificateServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return IstioCertificateServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service IstioCertificateService.
*
* Service for managing certificates issued by the CA.
*
*/
public static final class IstioCertificateServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private IstioCertificateServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IstioCertificateServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IstioCertificateServiceStub(channel, callOptions);
}
/**
*
* Using provided CSR, returns a signed certificate.
*
*/
public void createCertificate(istio.v1.auth.IstioCertificateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateCertificateMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service IstioCertificateService.
*
* Service for managing certificates issued by the CA.
*
*/
public static final class IstioCertificateServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private IstioCertificateServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IstioCertificateServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IstioCertificateServiceBlockingStub(channel, callOptions);
}
/**
*
* Using provided CSR, returns a signed certificate.
*
*/
public istio.v1.auth.IstioCertificateResponse createCertificate(istio.v1.auth.IstioCertificateRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateCertificateMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service IstioCertificateService.
*
* Service for managing certificates issued by the CA.
*
*/
public static final class IstioCertificateServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private IstioCertificateServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IstioCertificateServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IstioCertificateServiceFutureStub(channel, callOptions);
}
/**
*
* Using provided CSR, returns a signed certificate.
*
*/
public com.google.common.util.concurrent.ListenableFuture createCertificate(
istio.v1.auth.IstioCertificateRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateCertificateMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_CERTIFICATE = 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 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_CREATE_CERTIFICATE:
serviceImpl.createCertificate((istio.v1.auth.IstioCertificateRequest) 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(
getCreateCertificateMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
istio.v1.auth.IstioCertificateRequest,
istio.v1.auth.IstioCertificateResponse>(
service, METHODID_CREATE_CERTIFICATE)))
.build();
}
private static abstract class IstioCertificateServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
IstioCertificateServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return istio.v1.auth.Ca.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("IstioCertificateService");
}
}
private static final class IstioCertificateServiceFileDescriptorSupplier
extends IstioCertificateServiceBaseDescriptorSupplier {
IstioCertificateServiceFileDescriptorSupplier() {}
}
private static final class IstioCertificateServiceMethodDescriptorSupplier
extends IstioCertificateServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
IstioCertificateServiceMethodDescriptorSupplier(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 (IstioCertificateServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new IstioCertificateServiceFileDescriptorSupplier())
.addMethod(getCreateCertificateMethod())
.build();
}
}
}
return result;
}
}