tech.ydb.proto.discovery.v1.DiscoveryServiceGrpc Maven / Gradle / Ivy
package tech.ydb.proto.discovery.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.59.1)",
comments = "Source: ydb_discovery_v1.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class DiscoveryServiceGrpc {
private DiscoveryServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "Ydb.Discovery.V1.DiscoveryService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getListEndpointsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListEndpoints",
requestType = tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsRequest.class,
responseType = tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getListEndpointsMethod() {
io.grpc.MethodDescriptor getListEndpointsMethod;
if ((getListEndpointsMethod = DiscoveryServiceGrpc.getListEndpointsMethod) == null) {
synchronized (DiscoveryServiceGrpc.class) {
if ((getListEndpointsMethod = DiscoveryServiceGrpc.getListEndpointsMethod) == null) {
DiscoveryServiceGrpc.getListEndpointsMethod = getListEndpointsMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEndpoints"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsResponse.getDefaultInstance()))
.setSchemaDescriptor(new DiscoveryServiceMethodDescriptorSupplier("ListEndpoints"))
.build();
}
}
}
return getListEndpointsMethod;
}
private static volatile io.grpc.MethodDescriptor getWhoAmIMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "WhoAmI",
requestType = tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIRequest.class,
responseType = tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getWhoAmIMethod() {
io.grpc.MethodDescriptor getWhoAmIMethod;
if ((getWhoAmIMethod = DiscoveryServiceGrpc.getWhoAmIMethod) == null) {
synchronized (DiscoveryServiceGrpc.class) {
if ((getWhoAmIMethod = DiscoveryServiceGrpc.getWhoAmIMethod) == null) {
DiscoveryServiceGrpc.getWhoAmIMethod = getWhoAmIMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "WhoAmI"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIResponse.getDefaultInstance()))
.setSchemaDescriptor(new DiscoveryServiceMethodDescriptorSupplier("WhoAmI"))
.build();
}
}
}
return getWhoAmIMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static DiscoveryServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public DiscoveryServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DiscoveryServiceStub(channel, callOptions);
}
};
return DiscoveryServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static DiscoveryServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public DiscoveryServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DiscoveryServiceBlockingStub(channel, callOptions);
}
};
return DiscoveryServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static DiscoveryServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public DiscoveryServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DiscoveryServiceFutureStub(channel, callOptions);
}
};
return DiscoveryServiceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void listEndpoints(tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListEndpointsMethod(), responseObserver);
}
/**
*/
default void whoAmI(tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getWhoAmIMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service DiscoveryService.
*/
public static abstract class DiscoveryServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return DiscoveryServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service DiscoveryService.
*/
public static final class DiscoveryServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private DiscoveryServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DiscoveryServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DiscoveryServiceStub(channel, callOptions);
}
/**
*/
public void listEndpoints(tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListEndpointsMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void whoAmI(tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getWhoAmIMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service DiscoveryService.
*/
public static final class DiscoveryServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private DiscoveryServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DiscoveryServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DiscoveryServiceBlockingStub(channel, callOptions);
}
/**
*/
public tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsResponse listEndpoints(tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListEndpointsMethod(), getCallOptions(), request);
}
/**
*/
public tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIResponse whoAmI(tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getWhoAmIMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service DiscoveryService.
*/
public static final class DiscoveryServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private DiscoveryServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DiscoveryServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DiscoveryServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture listEndpoints(
tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListEndpointsMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture whoAmI(
tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getWhoAmIMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST_ENDPOINTS = 0;
private static final int METHODID_WHO_AM_I = 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 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_LIST_ENDPOINTS:
serviceImpl.listEndpoints((tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_WHO_AM_I:
serviceImpl.whoAmI((tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIRequest) 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(
getListEndpointsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsRequest,
tech.ydb.proto.discovery.DiscoveryProtos.ListEndpointsResponse>(
service, METHODID_LIST_ENDPOINTS)))
.addMethod(
getWhoAmIMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIRequest,
tech.ydb.proto.discovery.DiscoveryProtos.WhoAmIResponse>(
service, METHODID_WHO_AM_I)))
.build();
}
private static abstract class DiscoveryServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
DiscoveryServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return tech.ydb.proto.discovery.v1.YdbDiscoveryV1.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("DiscoveryService");
}
}
private static final class DiscoveryServiceFileDescriptorSupplier
extends DiscoveryServiceBaseDescriptorSupplier {
DiscoveryServiceFileDescriptorSupplier() {}
}
private static final class DiscoveryServiceMethodDescriptorSupplier
extends DiscoveryServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
DiscoveryServiceMethodDescriptorSupplier(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 (DiscoveryServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new DiscoveryServiceFileDescriptorSupplier())
.addMethod(getListEndpointsMethod())
.addMethod(getWhoAmIMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy