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;
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;
/**
*
* Service for managing certificates issued by the CA.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.31.1)",
comments = "Source: ca.proto")
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 static abstract class IstioCertificateServiceImplBase implements io.grpc.BindableService {
/**
*
* Using provided CSR, returns a signed certificate.
*
*/
public void createCertificate(istio.v1.auth.IstioCertificateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getCreateCertificateMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateCertificateMethod(),
asyncUnaryCall(
new MethodHandlers<
istio.v1.auth.IstioCertificateRequest,
istio.v1.auth.IstioCertificateResponse>(
this, METHODID_CREATE_CERTIFICATE)))
.build();
}
}
/**
*
* 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) {
asyncUnaryCall(
getChannel().newCall(getCreateCertificateMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*
* 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 blockingUnaryCall(
getChannel(), getCreateCertificateMethod(), getCallOptions(), request);
}
}
/**
*
* 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 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 IstioCertificateServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(IstioCertificateServiceImplBase 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();
}
}
}
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;
}
}