yandex.cloud.api.ai.llm.v1alpha.TokenizerServiceGrpc Maven / Gradle / Ivy
package yandex.cloud.api.ai.llm.v1alpha;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.43.2)",
comments = "Source: yandex/cloud/ai/llm/v1alpha/llm_service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TokenizerServiceGrpc {
private TokenizerServiceGrpc() {}
public static final String SERVICE_NAME = "yandex.cloud.ai.llm.v1alpha.TokenizerService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getTokenizeMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Tokenize",
requestType = yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeRequest.class,
responseType = yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getTokenizeMethod() {
io.grpc.MethodDescriptor getTokenizeMethod;
if ((getTokenizeMethod = TokenizerServiceGrpc.getTokenizeMethod) == null) {
synchronized (TokenizerServiceGrpc.class) {
if ((getTokenizeMethod = TokenizerServiceGrpc.getTokenizeMethod) == null) {
TokenizerServiceGrpc.getTokenizeMethod = getTokenizeMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Tokenize"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeResponse.getDefaultInstance()))
.setSchemaDescriptor(new TokenizerServiceMethodDescriptorSupplier("Tokenize"))
.build();
}
}
}
return getTokenizeMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static TokenizerServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public TokenizerServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TokenizerServiceStub(channel, callOptions);
}
};
return TokenizerServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static TokenizerServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public TokenizerServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TokenizerServiceBlockingStub(channel, callOptions);
}
};
return TokenizerServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static TokenizerServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public TokenizerServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TokenizerServiceFutureStub(channel, callOptions);
}
};
return TokenizerServiceFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class TokenizerServiceImplBase implements io.grpc.BindableService {
/**
*/
public void tokenize(yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTokenizeMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getTokenizeMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeRequest,
yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeResponse>(
this, METHODID_TOKENIZE)))
.build();
}
}
/**
*/
public static final class TokenizerServiceStub extends io.grpc.stub.AbstractAsyncStub {
private TokenizerServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TokenizerServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TokenizerServiceStub(channel, callOptions);
}
/**
*/
public void tokenize(yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getTokenizeMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class TokenizerServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private TokenizerServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TokenizerServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TokenizerServiceBlockingStub(channel, callOptions);
}
/**
*/
public yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeResponse tokenize(yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getTokenizeMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class TokenizerServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private TokenizerServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TokenizerServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TokenizerServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture tokenize(
yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getTokenizeMethod(), getCallOptions()), request);
}
}
private static final int METHODID_TOKENIZE = 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 TokenizerServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(TokenizerServiceImplBase 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_TOKENIZE:
serviceImpl.tokenize((yandex.cloud.api.ai.llm.v1alpha.LlmService.TokenizeRequest) 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 TokenizerServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
TokenizerServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return yandex.cloud.api.ai.llm.v1alpha.LlmService.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("TokenizerService");
}
}
private static final class TokenizerServiceFileDescriptorSupplier
extends TokenizerServiceBaseDescriptorSupplier {
TokenizerServiceFileDescriptorSupplier() {}
}
private static final class TokenizerServiceMethodDescriptorSupplier
extends TokenizerServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
TokenizerServiceMethodDescriptorSupplier(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 (TokenizerServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new TokenizerServiceFileDescriptorSupplier())
.addMethod(getTokenizeMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy