diff --git a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/Health.java b/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/Health.java deleted file mode 100644 index 2895d37f44..0000000000 --- a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/Health.java +++ /dev/null @@ -1,1158 +0,0 @@ -// Generated by ServiceTalk proto compiler -package io.servicetalk.health.v1; - -import io.servicetalk.concurrent.BlockingIterable; -import io.servicetalk.concurrent.api.AsyncCloseable; -import io.servicetalk.concurrent.api.Completable; -import io.servicetalk.concurrent.api.Publisher; -import io.servicetalk.concurrent.api.Single; -import io.servicetalk.data.protobuf.ProtobufSerializerFactory; -import io.servicetalk.encoding.api.BufferDecoderGroup; -import io.servicetalk.encoding.api.BufferEncoder; -import io.servicetalk.encoding.api.ContentCodec; -import io.servicetalk.encoding.api.EmptyBufferDecoderGroup; -import io.servicetalk.encoding.api.Identity; -import io.servicetalk.grpc.api.BlockingGrpcClient; -import io.servicetalk.grpc.api.BlockingGrpcService; -import io.servicetalk.grpc.api.DefaultGrpcClientMetadata; -import io.servicetalk.grpc.api.GrpcBindableService; -import io.servicetalk.grpc.api.GrpcClient; -import io.servicetalk.grpc.api.GrpcClientCallFactory; -import io.servicetalk.grpc.api.GrpcClientFactory; -import io.servicetalk.grpc.api.GrpcClientMetadata; -import io.servicetalk.grpc.api.GrpcExecutionContext; -import io.servicetalk.grpc.api.GrpcExecutionStrategy; -import io.servicetalk.grpc.api.GrpcPayloadWriter; -import io.servicetalk.grpc.api.GrpcRoutes; -import io.servicetalk.grpc.api.GrpcSerializationProvider; -import io.servicetalk.grpc.api.GrpcService; -import io.servicetalk.grpc.api.GrpcServiceContext; -import io.servicetalk.grpc.api.GrpcServiceFactory; -import io.servicetalk.grpc.api.MethodDescriptor; -import io.servicetalk.grpc.api.MethodDescriptors; -import io.servicetalk.grpc.protobuf.ProtoBufSerializationProviderBuilder; -import io.servicetalk.router.api.RouteExecutionStrategyFactory; -import java.lang.Deprecated; -import java.lang.Exception; -import java.lang.FunctionalInterface; -import java.lang.Override; -import java.lang.String; -import java.time.Duration; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Objects; - -/** - * Class for Health Service - */ -public final class Health { - private static final MethodDescriptor CheckRpc_MD = MethodDescriptors.newMethodDescriptor("/grpc.health.v1.Health/Check", "check", false, false, HealthCheckRequest.class, "+proto", ProtobufSerializerFactory.PROTOBUF.serializerDeserializer(HealthCheckRequest.parser()), HealthCheckRequest::getSerializedSize, false, true, HealthCheckResponse.class, "+proto", ProtobufSerializerFactory.PROTOBUF.serializerDeserializer(HealthCheckResponse.parser()), HealthCheckResponse::getSerializedSize); - - private static final MethodDescriptor BlockingCheckRpc_MD = MethodDescriptors.newMethodDescriptor("/grpc.health.v1.Health/Check", "check", false, false, HealthCheckRequest.class, "+proto", ProtobufSerializerFactory.PROTOBUF.serializerDeserializer(HealthCheckRequest.parser()), HealthCheckRequest::getSerializedSize, false, false, HealthCheckResponse.class, "+proto", ProtobufSerializerFactory.PROTOBUF.serializerDeserializer(HealthCheckResponse.parser()), HealthCheckResponse::getSerializedSize); - - private static final MethodDescriptor WatchRpc_MD = MethodDescriptors.newMethodDescriptor("/grpc.health.v1.Health/Watch", "watch", false, false, HealthCheckRequest.class, "+proto", ProtobufSerializerFactory.PROTOBUF.serializerDeserializer(HealthCheckRequest.parser()), HealthCheckRequest::getSerializedSize, true, true, HealthCheckResponse.class, "+proto", ProtobufSerializerFactory.PROTOBUF.serializerDeserializer(HealthCheckResponse.parser()), HealthCheckResponse::getSerializedSize); - - private static final MethodDescriptor BlockingWatchRpc_MD = MethodDescriptors.newMethodDescriptor("/grpc.health.v1.Health/Watch", "watch", false, false, HealthCheckRequest.class, "+proto", ProtobufSerializerFactory.PROTOBUF.serializerDeserializer(HealthCheckRequest.parser()), HealthCheckRequest::getSerializedSize, true, false, HealthCheckResponse.class, "+proto", ProtobufSerializerFactory.PROTOBUF.serializerDeserializer(HealthCheckResponse.parser()), HealthCheckResponse::getSerializedSize); - - private static final Collection> ASYNC_METHOD_DESCRIPTORS = Collections.unmodifiableList(Arrays.asList(CheckRpc_MD, WatchRpc_MD)); - - private static final Collection> BLOCKING_METHOD_DESCRIPTORS = Collections.unmodifiableList(Arrays.asList(BlockingCheckRpc_MD, BlockingWatchRpc_MD)); - - private Health() { - // no instances - } - - private static GrpcSerializationProvider initSerializationProvider( - final List supportedMessageCodings) { - ProtoBufSerializationProviderBuilder builder = new ProtoBufSerializationProviderBuilder(); - builder.supportedMessageCodings(supportedMessageCodings); - builder.registerMessageType(HealthCheckRequest.class, HealthCheckRequest.parser()); - builder.registerMessageType(HealthCheckResponse.class, HealthCheckResponse.parser()); - return builder.build(); - } - - private static boolean isSupportedMessageCodingsEmpty( - final List supportedMessageCodings) { - return supportedMessageCodings.isEmpty() || (supportedMessageCodings.size() == 1 && Identity.identity().equals(supportedMessageCodings.get(0))); - } - - @FunctionalInterface - public interface CheckRpc extends GrpcService { - /** - * @deprecated Use {@link #methodDescriptor}. - */ - @Deprecated - String PATH = "/grpc.health.v1.Health/Check"; - - static MethodDescriptor methodDescriptor() { - return CheckRpc_MD; - } - - /** - *
-         *  If the requested service is unknown, the call will fail with status
-         *  NOT_FOUND.
-         * 
- * - * @param ctx context associated with this service and request. - * @param request the request from the client. - * @return a {@link Single} which sends the response to the client when it terminates. - */ - Single check(GrpcServiceContext ctx, HealthCheckRequest request); - } - - @FunctionalInterface - public interface BlockingCheckRpc extends BlockingGrpcService { - /** - * @deprecated Use {@link #methodDescriptor}. - */ - @Deprecated - String PATH = "/grpc.health.v1.Health/Check"; - - static MethodDescriptor methodDescriptor() { - return BlockingCheckRpc_MD; - } - - /** - *
-         *  If the requested service is unknown, the call will fail with status
-         *  NOT_FOUND.
-         * 
- * - * @param ctx context associated with this service and request. - * @param request the request from the client. - * @return the response to send to the client - * @throws Exception if an unexpected application error occurs. - * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer. - */ - HealthCheckResponse check(GrpcServiceContext ctx, HealthCheckRequest request) throws - Exception; - } - - @FunctionalInterface - public interface WatchRpc extends GrpcService { - /** - * @deprecated Use {@link #methodDescriptor}. - */ - @Deprecated - String PATH = "/grpc.health.v1.Health/Watch"; - - static MethodDescriptor methodDescriptor() { - return WatchRpc_MD; - } - - /** - *
-         *  Performs a watch for the serving status of the requested service.
-         *  The server will immediately send back a message indicating the current
-         *  serving status.  It will then subsequently send a new message whenever
-         *  the service's serving status changes.
-         *
-         *  If the requested service is unknown when the call is received, the
-         *  server will send a message setting the serving status to
-         *  SERVICE_UNKNOWN but will *not* terminate the call.  If at some
-         *  future point, the serving status of the service becomes known, the
-         *  server will send a new message with the service's serving status.
-         *
-         *  If the call terminates with status UNIMPLEMENTED, then clients
-         *  should assume this method is not supported and should not retry the
-         *  call.  If the call terminates with any other status (including OK),
-         *  clients should retry the call with appropriate exponential backoff.
-         * 
- * - * @param ctx context associated with this service and request. - * @param request the request from the client. - * @return used to write a stream of type {@link HealthCheckResponse} to the client. - */ - Publisher watch(GrpcServiceContext ctx, HealthCheckRequest request); - } - - @FunctionalInterface - public interface BlockingWatchRpc extends BlockingGrpcService { - /** - * @deprecated Use {@link #methodDescriptor}. - */ - @Deprecated - String PATH = "/grpc.health.v1.Health/Watch"; - - static MethodDescriptor methodDescriptor() { - return BlockingWatchRpc_MD; - } - - /** - *
-         *  Performs a watch for the serving status of the requested service.
-         *  The server will immediately send back a message indicating the current
-         *  serving status.  It will then subsequently send a new message whenever
-         *  the service's serving status changes.
-         *
-         *  If the requested service is unknown when the call is received, the
-         *  server will send a message setting the serving status to
-         *  SERVICE_UNKNOWN but will *not* terminate the call.  If at some
-         *  future point, the serving status of the service becomes known, the
-         *  server will send a new message with the service's serving status.
-         *
-         *  If the call terminates with status UNIMPLEMENTED, then clients
-         *  should assume this method is not supported and should not retry the
-         *  call.  If the call terminates with any other status (including OK),
-         *  clients should retry the call with appropriate exponential backoff.
-         * 
- * - * @param ctx context associated with this service and request. - * @param request the request from the client. - * @param responseWriter used to write a stream of type {@link HealthCheckResponse} to the server. - * The implementation of this method is responsible for calling {@link GrpcPayloadWriter#close()}. - * @throws Exception if an unexpected application error occurs. - * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer. - */ - void watch(GrpcServiceContext ctx, HealthCheckRequest request, - GrpcPayloadWriter responseWriter) throws Exception; - } - - public interface HealthService extends GrpcBindableService, CheckRpc, WatchRpc { - /** - * Makes a {@link ServiceFactory} bound to this instance implementing {@link HealthService} - */ - @Override - default ServiceFactory bindService() { - return new ServiceFactory(this); - } - - @Override - default Collection> methodDescriptors() { - return ASYNC_METHOD_DESCRIPTORS; - } - } - - public interface BlockingHealthService extends GrpcBindableService, BlockingCheckRpc, BlockingWatchRpc { - /** - * Makes a {@link ServiceFactory} bound to this instance implementing {@link BlockingHealthService} - */ - @Override - default ServiceFactory bindService() { - return new ServiceFactory(this); - } - - @Override - default Collection> methodDescriptors() { - return BLOCKING_METHOD_DESCRIPTORS; - } - } - - public static final class ServiceFactory extends GrpcServiceFactory { - /** - * Create a new instance. - * - * @param service a service to handle incoming requests - */ - public ServiceFactory(final HealthService service) { - this(new ServiceFactory.Builder().check(service).watch(service)); - } - - /** - * Create a new instance. - * - * @param service a service to handle incoming requests - * @param supportedMessageCodings the set of allowed encodings - * @deprecated Use {@link Builder#Builder()}, {@link Builder#bufferDecoderGroup(BufferDecoderGroup)}, and {@link Builder#bufferEncoders(List)}. - */ - @Deprecated - public ServiceFactory(final HealthService service, - final List supportedMessageCodings) { - this(new ServiceFactory.Builder(supportedMessageCodings).check(service).watch(service)); - } - - /** - * Create a new instance. - * - * @param service a service to handle incoming requests - * @param strategyFactory a factory that creates an execution strategy for different {@link io.servicetalk.router.api.RouteExecutionStrategy#id() id}s - */ - public ServiceFactory(final HealthService service, - final RouteExecutionStrategyFactory strategyFactory) { - this(new ServiceFactory.Builder(strategyFactory).check(service).watch(service)); - } - - /** - * Create a new instance. - * - * @param service a service to handle incoming requests - * @param strategyFactory a factory that creates an execution strategy for different {@link io.servicetalk.router.api.RouteExecutionStrategy#id() id}s - * @param supportedMessageCodings the set of allowed encodings - * @deprecated Use {@link Builder#Builder(RouteExecutionStrategyFactory)}, {@link Builder#bufferDecoderGroup(BufferDecoderGroup)}, and {@link Builder#bufferEncoders(List)}. - */ - @Deprecated - public ServiceFactory(final HealthService service, - final RouteExecutionStrategyFactory strategyFactory, - final List supportedMessageCodings) { - this(new ServiceFactory.Builder(strategyFactory, supportedMessageCodings).check(service).watch(service)); - } - - /** - * Create a new instance. - * - * @param service a service to handle incoming requests - */ - public ServiceFactory(final BlockingHealthService service) { - this(new ServiceFactory.Builder().checkBlocking(service).watchBlocking(service)); - } - - /** - * Create a new instance. - * - * @param service a service to handle incoming requests - * @param supportedMessageCodings the set of allowed encodings - * @deprecated Use {@link Builder#Builder()}, {@link Builder#bufferDecoderGroup(BufferDecoderGroup)}, and {@link Builder#bufferEncoders(List)}. - */ - @Deprecated - public ServiceFactory(final BlockingHealthService service, - final List supportedMessageCodings) { - this(new ServiceFactory.Builder(supportedMessageCodings).checkBlocking(service).watchBlocking(service)); - } - - /** - * Create a new instance. - * - * @param service a service to handle incoming requests - * @param strategyFactory a factory that creates an execution strategy for different {@link io.servicetalk.router.api.RouteExecutionStrategy#id() id}s - */ - public ServiceFactory(final BlockingHealthService service, - final RouteExecutionStrategyFactory strategyFactory) { - this(new ServiceFactory.Builder(strategyFactory).checkBlocking(service).watchBlocking(service)); - } - - /** - * Create a new instance. - * - * @param service a service to handle incoming requests - * @param strategyFactory a factory that creates an execution strategy for different {@link io.servicetalk.router.api.RouteExecutionStrategy#id() id}s - * @param supportedMessageCodings the set of allowed encodings - * @deprecated Use {@link Builder#Builder(RouteExecutionStrategyFactory)}, {@link Builder#bufferDecoderGroup(BufferDecoderGroup)}, and {@link Builder#bufferEncoders(List)}. - */ - @Deprecated - public ServiceFactory(final BlockingHealthService service, - final RouteExecutionStrategyFactory strategyFactory, - final List supportedMessageCodings) { - this(new ServiceFactory.Builder(strategyFactory, supportedMessageCodings).checkBlocking(service).watchBlocking(service)); - } - - private ServiceFactory(final ServiceFactory.Builder builder) { - super(builder); - } - - public static final class Builder extends GrpcRoutes { - private final List supportedMessageCodings; - - private BufferDecoderGroup bufferDecoderGroup = EmptyBufferDecoderGroup.INSTANCE; - - private List bufferEncoders = Collections.emptyList(); - - /** - * Create a new instance. - */ - public Builder() { - this(Collections.emptyList()); - } - - /** - * Create a new instance. - * - * @param supportedMessageCodings the set of allowed encodings - * @deprecated Use {@link #bufferDecoderGroup(BufferDecoderGroup)} and {@link #bufferEncoders(List)}. - */ - @Deprecated - public Builder(final List supportedMessageCodings) { - this.supportedMessageCodings = supportedMessageCodings; - } - - /** - * Create a new instance. - * - * @param strategyFactory a factory that creates an execution strategy for different {@link io.servicetalk.router.api.RouteExecutionStrategy#id() id}s - */ - public Builder( - final RouteExecutionStrategyFactory strategyFactory) { - this(strategyFactory, Collections.emptyList()); - } - - /** - * Create a new instance. - * - * @param strategyFactory a factory that creates an execution strategy for different {@link io.servicetalk.router.api.RouteExecutionStrategy#id() id}s - * @param supportedMessageCodings the set of allowed encodings - * @deprecated Use {@link #Builder(RouteExecutionStrategyFactory)}, {@link #bufferDecoderGroup(BufferDecoderGroup)}, and {@link #bufferEncoders(List)}. - */ - @Deprecated - public Builder( - final RouteExecutionStrategyFactory strategyFactory, - final List supportedMessageCodings) { - super(strategyFactory); - this.supportedMessageCodings = supportedMessageCodings; - } - - public ServiceFactory.Builder bufferDecoderGroup( - final BufferDecoderGroup bufferDecoderGroup) { - this.bufferDecoderGroup = Objects.requireNonNull(bufferDecoderGroup); - return this; - } - - public ServiceFactory.Builder bufferEncoders(final List bufferEncoders) { - this.bufferEncoders = Objects.requireNonNull(bufferEncoders); - return this; - } - - public ServiceFactory build() { - return new ServiceFactory(this); - } - - @Override - protected ServiceFactory.Builder.HealthServiceFromRoutes newServiceFromRoutes( - final GrpcRoutes.AllGrpcRoutes routes) { - return new ServiceFactory.Builder.HealthServiceFromRoutes(routes); - } - - public ServiceFactory.Builder check(final CheckRpc rpc) { - if (supportedMessageCodings.isEmpty()) { - addRoute(rpc.getClass(), CheckRpc.methodDescriptor(), bufferDecoderGroup, bufferEncoders, io.servicetalk.grpc.api.GrpcRoutes.Route.wrap(rpc::check, rpc)); - } else { - addRoute(CheckRpc.PATH, rpc.getClass(), "check", io.servicetalk.grpc.api.GrpcRoutes.Route.wrap(rpc::check, rpc), HealthCheckRequest.class, HealthCheckResponse.class, initSerializationProvider(supportedMessageCodings)); - } - return this; - } - - public ServiceFactory.Builder check(final GrpcExecutionStrategy strategy, - final CheckRpc rpc) { - if (supportedMessageCodings.isEmpty()) { - addRoute(strategy, CheckRpc.methodDescriptor(), bufferDecoderGroup, bufferEncoders, io.servicetalk.grpc.api.GrpcRoutes.Route.wrap(rpc::check, rpc)); - } else { - addRoute(CheckRpc.PATH, strategy, io.servicetalk.grpc.api.GrpcRoutes.Route.wrap(rpc::check, rpc), HealthCheckRequest.class, HealthCheckResponse.class, initSerializationProvider(supportedMessageCodings)); - } - return this; - } - - public ServiceFactory.Builder checkBlocking(final BlockingCheckRpc rpc) { - if (supportedMessageCodings.isEmpty()) { - addBlockingRoute(rpc.getClass(), BlockingCheckRpc.methodDescriptor(), bufferDecoderGroup, bufferEncoders, io.servicetalk.grpc.api.GrpcRoutes.BlockingRoute.wrap(rpc::check, rpc)); - } else { - addBlockingRoute(BlockingCheckRpc.PATH, rpc.getClass(), "check", io.servicetalk.grpc.api.GrpcRoutes.BlockingRoute.wrap(rpc::check, rpc), HealthCheckRequest.class, HealthCheckResponse.class, initSerializationProvider(supportedMessageCodings)); - } - return this; - } - - public ServiceFactory.Builder checkBlocking(final GrpcExecutionStrategy strategy, - final BlockingCheckRpc rpc) { - if (supportedMessageCodings.isEmpty()) { - addBlockingRoute(strategy, BlockingCheckRpc.methodDescriptor(), bufferDecoderGroup, bufferEncoders, io.servicetalk.grpc.api.GrpcRoutes.BlockingRoute.wrap(rpc::check, rpc)); - } else { - addBlockingRoute(BlockingCheckRpc.PATH, strategy, io.servicetalk.grpc.api.GrpcRoutes.BlockingRoute.wrap(rpc::check, rpc), HealthCheckRequest.class, HealthCheckResponse.class, initSerializationProvider(supportedMessageCodings)); - } - return this; - } - - public ServiceFactory.Builder watch(final WatchRpc rpc) { - if (supportedMessageCodings.isEmpty()) { - addResponseStreamingRoute(rpc.getClass(), WatchRpc.methodDescriptor(), bufferDecoderGroup, bufferEncoders, io.servicetalk.grpc.api.GrpcRoutes.ResponseStreamingRoute.wrap(rpc::watch, rpc)); - } else { - addResponseStreamingRoute(WatchRpc.PATH, rpc.getClass(), "watch", io.servicetalk.grpc.api.GrpcRoutes.ResponseStreamingRoute.wrap(rpc::watch, rpc), HealthCheckRequest.class, HealthCheckResponse.class, initSerializationProvider(supportedMessageCodings)); - } - return this; - } - - public ServiceFactory.Builder watch(final GrpcExecutionStrategy strategy, - final WatchRpc rpc) { - if (supportedMessageCodings.isEmpty()) { - addResponseStreamingRoute(strategy, WatchRpc.methodDescriptor(), bufferDecoderGroup, bufferEncoders, io.servicetalk.grpc.api.GrpcRoutes.ResponseStreamingRoute.wrap(rpc::watch, rpc)); - } else { - addResponseStreamingRoute(WatchRpc.PATH, strategy, io.servicetalk.grpc.api.GrpcRoutes.ResponseStreamingRoute.wrap(rpc::watch, rpc), HealthCheckRequest.class, HealthCheckResponse.class, initSerializationProvider(supportedMessageCodings)); - } - return this; - } - - public ServiceFactory.Builder watchBlocking(final BlockingWatchRpc rpc) { - if (supportedMessageCodings.isEmpty()) { - addBlockingResponseStreamingRoute(rpc.getClass(), BlockingWatchRpc.methodDescriptor(), bufferDecoderGroup, bufferEncoders, io.servicetalk.grpc.api.GrpcRoutes.BlockingResponseStreamingRoute.wrap(rpc::watch, rpc)); - } else { - addBlockingResponseStreamingRoute(BlockingWatchRpc.PATH, rpc.getClass(), "watch", io.servicetalk.grpc.api.GrpcRoutes.BlockingResponseStreamingRoute.wrap(rpc::watch, rpc), HealthCheckRequest.class, HealthCheckResponse.class, initSerializationProvider(supportedMessageCodings)); - } - return this; - } - - public ServiceFactory.Builder watchBlocking(final GrpcExecutionStrategy strategy, - final BlockingWatchRpc rpc) { - if (supportedMessageCodings.isEmpty()) { - addBlockingResponseStreamingRoute(strategy, BlockingWatchRpc.methodDescriptor(), bufferDecoderGroup, bufferEncoders, io.servicetalk.grpc.api.GrpcRoutes.BlockingResponseStreamingRoute.wrap(rpc::watch, rpc)); - } else { - addBlockingResponseStreamingRoute(BlockingWatchRpc.PATH, strategy, io.servicetalk.grpc.api.GrpcRoutes.BlockingResponseStreamingRoute.wrap(rpc::watch, rpc), HealthCheckRequest.class, HealthCheckResponse.class, initSerializationProvider(supportedMessageCodings)); - } - return this; - } - - public ServiceFactory.Builder addService(final HealthService service) { - registerRoutes(service); - return this; - } - - /** - * Adds a {@link BlockingHealthService} implementation. - * - * @param service the {@link BlockingHealthService} implementation to add. - * @return this. - * @deprecated Use {@link #addBlockingService(BlockingHealthService)}. - */ - @Deprecated - public ServiceFactory.Builder addService(final BlockingHealthService service) { - return addBlockingService(service); - } - - public ServiceFactory.Builder addBlockingService(final BlockingHealthService service) { - checkBlocking(service); - watchBlocking(service); - return this; - } - - @Override - protected void registerRoutes(final HealthService service) { - check(service); - watch(service); - } - - private static final class HealthServiceFromRoutes implements HealthService { - private final AsyncCloseable closeable; - - private final GrpcRoutes.Route check; - - private final GrpcRoutes.ResponseStreamingRoute watch; - - private HealthServiceFromRoutes(final GrpcRoutes.AllGrpcRoutes routes) { - closeable = routes; - check = routes.routeFor(CheckRpc.PATH); - watch = routes.responseStreamingRouteFor(WatchRpc.PATH); - } - - @Override - public Single check(final GrpcServiceContext ctx, - final HealthCheckRequest request) { - return check.handle(ctx, request); - } - - @Override - public Publisher watch(final GrpcServiceContext ctx, - final HealthCheckRequest request) { - return watch.handle(ctx, request); - } - - @Override - public Completable closeAsync() { - return closeable.closeAsync(); - } - - @Override - public Completable closeAsyncGracefully() { - return closeable.closeAsyncGracefully(); - } - } - } - } - - /** - * @deprecated This class will be removed in the future in favor of direct usage of {@link GrpcClientMetadata}. Deprecation of {@link GrpcClientMetadata#path()} renders this type unnecessary. - */ - @Deprecated - public static final class CheckMetadata extends DefaultGrpcClientMetadata { - /** - * @deprecated This class will be removed in the future in favor of direct usage of {@link GrpcClientMetadata}. - */ - @Deprecated - public static final CheckMetadata INSTANCE = new CheckMetadata(); - - private CheckMetadata(final GrpcClientMetadata metadata) { - super(CheckRpc.PATH, metadata); - } - - private CheckMetadata() { - super(CheckRpc.PATH); - } - - public CheckMetadata(final ContentCodec requestEncoding) { - super(CheckRpc.PATH, requestEncoding); - } - - public CheckMetadata(final GrpcExecutionStrategy strategy) { - super(CheckRpc.PATH, strategy); - } - - public CheckMetadata(final Duration timeout) { - super(CheckRpc.PATH, timeout); - } - - public CheckMetadata(final GrpcExecutionStrategy strategy, - final ContentCodec requestEncoding) { - super(CheckRpc.PATH, strategy, requestEncoding); - } - - public CheckMetadata(final GrpcExecutionStrategy strategy, - final ContentCodec requestEncoding, final Duration timeout) { - super(CheckRpc.PATH, strategy, requestEncoding, timeout); - } - } - - /** - * @deprecated This class will be removed in the future in favor of direct usage of {@link GrpcClientMetadata}. Deprecation of {@link GrpcClientMetadata#path()} renders this type unnecessary. - */ - @Deprecated - public static final class WatchMetadata extends DefaultGrpcClientMetadata { - /** - * @deprecated This class will be removed in the future in favor of direct usage of {@link GrpcClientMetadata}. - */ - @Deprecated - public static final WatchMetadata INSTANCE = new WatchMetadata(); - - private WatchMetadata(final GrpcClientMetadata metadata) { - super(WatchRpc.PATH, metadata); - } - - private WatchMetadata() { - super(WatchRpc.PATH); - } - - public WatchMetadata(final ContentCodec requestEncoding) { - super(WatchRpc.PATH, requestEncoding); - } - - public WatchMetadata(final GrpcExecutionStrategy strategy) { - super(WatchRpc.PATH, strategy); - } - - public WatchMetadata(final Duration timeout) { - super(WatchRpc.PATH, timeout); - } - - public WatchMetadata(final GrpcExecutionStrategy strategy, - final ContentCodec requestEncoding) { - super(WatchRpc.PATH, strategy, requestEncoding); - } - - public WatchMetadata(final GrpcExecutionStrategy strategy, - final ContentCodec requestEncoding, final Duration timeout) { - super(WatchRpc.PATH, strategy, requestEncoding, timeout); - } - } - - public interface HealthClient extends GrpcClient { - /** - *
-         *  If the requested service is unknown, the call will fail with status
-         *  NOT_FOUND.
-         * 
- * - * @param request the request to send to the server. - * @return a {@link Single} which completes when the response is received from the server. - */ - Single check(HealthCheckRequest request); - - /** - *
-         *  If the requested service is unknown, the call will fail with status
-         *  NOT_FOUND.
-         * 
- * - * @deprecated Use {@link #check(GrpcClientMetadata,HealthCheckRequest)}. - * @param metadata the metadata associated with this client call. - * @param request the request to send to the server. - * @return a {@link Single} which completes when the response is received from the server. - */ - @Deprecated - Single check(CheckMetadata metadata, HealthCheckRequest request); - - /** - *
-         *  If the requested service is unknown, the call will fail with status
-         *  NOT_FOUND.
-         * 
- * - * @param metadata the metadata associated with this client call. - * @param request the request to send to the server. - * @return a {@link Single} which completes when the response is received from the server. - */ - default Single check(GrpcClientMetadata metadata, - HealthCheckRequest request) { - return check(new CheckMetadata(metadata), request); - } - - /** - *
-         *  Performs a watch for the serving status of the requested service.
-         *  The server will immediately send back a message indicating the current
-         *  serving status.  It will then subsequently send a new message whenever
-         *  the service's serving status changes.
-         *
-         *  If the requested service is unknown when the call is received, the
-         *  server will send a message setting the serving status to
-         *  SERVICE_UNKNOWN but will *not* terminate the call.  If at some
-         *  future point, the serving status of the service becomes known, the
-         *  server will send a new message with the service's serving status.
-         *
-         *  If the call terminates with status UNIMPLEMENTED, then clients
-         *  should assume this method is not supported and should not retry the
-         *  call.  If the call terminates with any other status (including OK),
-         *  clients should retry the call with appropriate exponential backoff.
-         * 
- * - * @param request the request to send to the server. - * @return used to read a stream of type {@link HealthCheckResponse} from the server. - */ - Publisher watch(HealthCheckRequest request); - - /** - *
-         *  Performs a watch for the serving status of the requested service.
-         *  The server will immediately send back a message indicating the current
-         *  serving status.  It will then subsequently send a new message whenever
-         *  the service's serving status changes.
-         *
-         *  If the requested service is unknown when the call is received, the
-         *  server will send a message setting the serving status to
-         *  SERVICE_UNKNOWN but will *not* terminate the call.  If at some
-         *  future point, the serving status of the service becomes known, the
-         *  server will send a new message with the service's serving status.
-         *
-         *  If the call terminates with status UNIMPLEMENTED, then clients
-         *  should assume this method is not supported and should not retry the
-         *  call.  If the call terminates with any other status (including OK),
-         *  clients should retry the call with appropriate exponential backoff.
-         * 
- * - * @deprecated Use {@link #watch(GrpcClientMetadata,HealthCheckRequest)}. - * @param metadata the metadata associated with this client call. - * @param request the request to send to the server. - * @return used to read a stream of type {@link HealthCheckResponse} from the server. - */ - @Deprecated - Publisher watch(WatchMetadata metadata, HealthCheckRequest request); - - /** - *
-         *  Performs a watch for the serving status of the requested service.
-         *  The server will immediately send back a message indicating the current
-         *  serving status.  It will then subsequently send a new message whenever
-         *  the service's serving status changes.
-         *
-         *  If the requested service is unknown when the call is received, the
-         *  server will send a message setting the serving status to
-         *  SERVICE_UNKNOWN but will *not* terminate the call.  If at some
-         *  future point, the serving status of the service becomes known, the
-         *  server will send a new message with the service's serving status.
-         *
-         *  If the call terminates with status UNIMPLEMENTED, then clients
-         *  should assume this method is not supported and should not retry the
-         *  call.  If the call terminates with any other status (including OK),
-         *  clients should retry the call with appropriate exponential backoff.
-         * 
- * - * @param metadata the metadata associated with this client call. - * @param request the request to send to the server. - * @return used to read a stream of type {@link HealthCheckResponse} from the server. - */ - default Publisher watch(GrpcClientMetadata metadata, - HealthCheckRequest request) { - return watch(new WatchMetadata(metadata), request); - } - } - - public interface BlockingHealthClient extends BlockingGrpcClient { - /** - *
-         *  If the requested service is unknown, the call will fail with status
-         *  NOT_FOUND.
-         * 
- * - * @param request the request from the client. - * @return the response from the server. - * @throws Exception if an unexpected application error occurs. - * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer. - */ - HealthCheckResponse check(HealthCheckRequest request) throws Exception; - - /** - *
-         *  If the requested service is unknown, the call will fail with status
-         *  NOT_FOUND.
-         * 
- * - * @deprecated Use {@link #check(GrpcClientMetadata,HealthCheckRequest)}. - * @param metadata the metadata associated with this client call. - * @param request the request from the client. - * @return the response from the server. - * @throws Exception if an unexpected application error occurs. - * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer. - */ - @Deprecated - HealthCheckResponse check(CheckMetadata metadata, HealthCheckRequest request) throws - Exception; - - /** - *
-         *  If the requested service is unknown, the call will fail with status
-         *  NOT_FOUND.
-         * 
- * - * @param metadata the metadata associated with this client call. - * @param request the request from the client. - * @return the response from the server. - * @throws Exception if an unexpected application error occurs. - * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer. - */ - default HealthCheckResponse check(GrpcClientMetadata metadata, HealthCheckRequest request) - throws Exception { - return check(new CheckMetadata(metadata), request); - } - - /** - *
-         *  Performs a watch for the serving status of the requested service.
-         *  The server will immediately send back a message indicating the current
-         *  serving status.  It will then subsequently send a new message whenever
-         *  the service's serving status changes.
-         *
-         *  If the requested service is unknown when the call is received, the
-         *  server will send a message setting the serving status to
-         *  SERVICE_UNKNOWN but will *not* terminate the call.  If at some
-         *  future point, the serving status of the service becomes known, the
-         *  server will send a new message with the service's serving status.
-         *
-         *  If the call terminates with status UNIMPLEMENTED, then clients
-         *  should assume this method is not supported and should not retry the
-         *  call.  If the call terminates with any other status (including OK),
-         *  clients should retry the call with appropriate exponential backoff.
-         * 
- * - * @param request the request from the client. - * @return used to read the response stream of type {@link HealthCheckResponse} from the server. - * @throws Exception if an unexpected application error occurs. - * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer. - */ - BlockingIterable watch(HealthCheckRequest request) throws Exception; - - /** - *
-         *  Performs a watch for the serving status of the requested service.
-         *  The server will immediately send back a message indicating the current
-         *  serving status.  It will then subsequently send a new message whenever
-         *  the service's serving status changes.
-         *
-         *  If the requested service is unknown when the call is received, the
-         *  server will send a message setting the serving status to
-         *  SERVICE_UNKNOWN but will *not* terminate the call.  If at some
-         *  future point, the serving status of the service becomes known, the
-         *  server will send a new message with the service's serving status.
-         *
-         *  If the call terminates with status UNIMPLEMENTED, then clients
-         *  should assume this method is not supported and should not retry the
-         *  call.  If the call terminates with any other status (including OK),
-         *  clients should retry the call with appropriate exponential backoff.
-         * 
- * - * @deprecated Use {@link #watch(GrpcClientMetadata,HealthCheckRequest)}. - * @param metadata the metadata associated with this client call. - * @param request the request from the client. - * @return used to read the response stream of type {@link HealthCheckResponse} from the server. - * @throws Exception if an unexpected application error occurs. - * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer. - */ - @Deprecated - BlockingIterable watch(WatchMetadata metadata, - HealthCheckRequest request) throws Exception; - - /** - *
-         *  Performs a watch for the serving status of the requested service.
-         *  The server will immediately send back a message indicating the current
-         *  serving status.  It will then subsequently send a new message whenever
-         *  the service's serving status changes.
-         *
-         *  If the requested service is unknown when the call is received, the
-         *  server will send a message setting the serving status to
-         *  SERVICE_UNKNOWN but will *not* terminate the call.  If at some
-         *  future point, the serving status of the service becomes known, the
-         *  server will send a new message with the service's serving status.
-         *
-         *  If the call terminates with status UNIMPLEMENTED, then clients
-         *  should assume this method is not supported and should not retry the
-         *  call.  If the call terminates with any other status (including OK),
-         *  clients should retry the call with appropriate exponential backoff.
-         * 
- * - * @param metadata the metadata associated with this client call. - * @param request the request from the client. - * @return used to read the response stream of type {@link HealthCheckResponse} from the server. - * @throws Exception if an unexpected application error occurs. - * @throws io.servicetalk.grpc.api.GrpcStatusException if an expected application exception occurs. Its contents will be serialized and propagated to the peer. - */ - default BlockingIterable watch(GrpcClientMetadata metadata, - HealthCheckRequest request) throws Exception { - return watch(new WatchMetadata(metadata), request); - } - } - - public static class ClientFactory extends GrpcClientFactory { - @Override - protected HealthClient newClient(final GrpcClientCallFactory factory) { - return new DefaultHealthClient(factory, supportedMessageCodings(), bufferDecoderGroup()); - } - - @Override - protected BlockingHealthClient newBlockingClient(final GrpcClientCallFactory factory) { - return new DefaultBlockingHealthClient(factory, supportedMessageCodings(), bufferDecoderGroup()); - } - - private static final class DefaultHealthClient implements HealthClient { - private final GrpcClientCallFactory factory; - - private final List supportedMessageCodings; - - private final BufferDecoderGroup bufferDecoderGroup; - - private final GrpcClientCallFactory.ClientCall checkCall; - - private final GrpcClientCallFactory.ResponseStreamingClientCall watchCall; - - private DefaultHealthClient(final GrpcClientCallFactory factory, - final List supportedMessageCodings, - final BufferDecoderGroup bufferDecoderGroup) { - this.factory = factory; - this.supportedMessageCodings = supportedMessageCodings; - this.bufferDecoderGroup = bufferDecoderGroup; - if (supportedMessageCodings.isEmpty()) { - checkCall = factory.newCall(CheckRpc.methodDescriptor(), bufferDecoderGroup); - } else { - checkCall = factory.newCall(initSerializationProvider(supportedMessageCodings), HealthCheckRequest.class, HealthCheckResponse.class); - } - if (supportedMessageCodings.isEmpty()) { - watchCall = factory.newResponseStreamingCall(WatchRpc.methodDescriptor(), bufferDecoderGroup); - } else { - watchCall = factory.newResponseStreamingCall(initSerializationProvider(supportedMessageCodings), HealthCheckRequest.class, HealthCheckResponse.class); - } - } - - @Override - public BlockingHealthClient asBlockingClient() { - return new DefaultBlockingHealthClient(factory, supportedMessageCodings, bufferDecoderGroup); - } - - @Override - public GrpcExecutionContext executionContext() { - return factory.executionContext(); - } - - @Override - public Completable onClose() { - return factory.onClose(); - } - - @Override - public Completable closeAsync() { - return factory.closeAsync(); - } - - @Override - public Completable closeAsyncGracefully() { - return factory.closeAsyncGracefully(); - } - - @Override - public void close() throws Exception { - factory.closeAsync().toFuture().get(); - } - - @Override - public void closeGracefully() throws Exception { - factory.closeAsyncGracefully().toFuture().get(); - } - - @Override - public Single check(final HealthCheckRequest request) { - return check(supportedMessageCodings.isEmpty() ? DefaultGrpcClientMetadata.INSTANCE : CheckMetadata.INSTANCE, request); - } - - @Deprecated - @Override - public Single check(final CheckMetadata metadata, - final HealthCheckRequest request) { - return checkCall.request(metadata, request); - } - - @Override - public Single check(final GrpcClientMetadata metadata, - final HealthCheckRequest request) { - return checkCall.request(metadata, request); - } - - @Override - public Publisher watch(final HealthCheckRequest request) { - return watch(supportedMessageCodings.isEmpty() ? DefaultGrpcClientMetadata.INSTANCE : WatchMetadata.INSTANCE, request); - } - - @Deprecated - @Override - public Publisher watch(final WatchMetadata metadata, - final HealthCheckRequest request) { - return watchCall.request(metadata, request); - } - - @Override - public Publisher watch(final GrpcClientMetadata metadata, - final HealthCheckRequest request) { - return watchCall.request(metadata, request); - } - } - - private static final class DefaultBlockingHealthClient implements BlockingHealthClient { - private final GrpcClientCallFactory factory; - - private final List supportedMessageCodings; - - private final BufferDecoderGroup bufferDecoderGroup; - - private final GrpcClientCallFactory.BlockingClientCall checkCall; - - private final GrpcClientCallFactory.BlockingResponseStreamingClientCall watchCall; - - private DefaultBlockingHealthClient(final GrpcClientCallFactory factory, - final List supportedMessageCodings, - final BufferDecoderGroup bufferDecoderGroup) { - this.factory = factory; - this.supportedMessageCodings = supportedMessageCodings; - this.bufferDecoderGroup = bufferDecoderGroup; - if (supportedMessageCodings.isEmpty()) { - checkCall = factory.newBlockingCall(BlockingCheckRpc.methodDescriptor(), bufferDecoderGroup); - } else { - checkCall = factory.newBlockingCall(initSerializationProvider(supportedMessageCodings), HealthCheckRequest.class, HealthCheckResponse.class); - } - if (supportedMessageCodings.isEmpty()) { - watchCall = factory.newBlockingResponseStreamingCall(BlockingWatchRpc.methodDescriptor(), bufferDecoderGroup); - } else { - watchCall = factory.newBlockingResponseStreamingCall(initSerializationProvider(supportedMessageCodings), HealthCheckRequest.class, HealthCheckResponse.class); - } - } - - @Override - public HealthClient asClient() { - return new DefaultHealthClient(factory, supportedMessageCodings, bufferDecoderGroup); - } - - @Override - public GrpcExecutionContext executionContext() { - return factory.executionContext(); - } - - @Override - public void close() throws Exception { - factory.closeAsync().toFuture().get(); - } - - @Override - public void closeGracefully() throws Exception { - factory.closeAsyncGracefully().toFuture().get(); - } - - @Override - public HealthCheckResponse check(final HealthCheckRequest request) throws Exception { - return check(supportedMessageCodings.isEmpty() ? DefaultGrpcClientMetadata.INSTANCE : CheckMetadata.INSTANCE, request); - } - - @Deprecated - @Override - public HealthCheckResponse check(final CheckMetadata metadata, - final HealthCheckRequest request) throws Exception { - return checkCall.request(metadata, request); - } - - @Override - public HealthCheckResponse check(final GrpcClientMetadata metadata, - final HealthCheckRequest request) throws Exception { - return checkCall.request(metadata, request); - } - - @Override - public BlockingIterable watch(final HealthCheckRequest request) - throws Exception { - return watch(supportedMessageCodings.isEmpty() ? DefaultGrpcClientMetadata.INSTANCE : WatchMetadata.INSTANCE, request); - } - - @Deprecated - @Override - public BlockingIterable watch(final WatchMetadata metadata, - final HealthCheckRequest request) throws Exception { - return watchCall.request(metadata, request); - } - - @Override - public BlockingIterable watch(final GrpcClientMetadata metadata, - final HealthCheckRequest request) throws Exception { - return watchCall.request(metadata, request); - } - } - - private static final class HealthClientToBlockingHealthClient implements BlockingHealthClient { - private final HealthClient client; - - private HealthClientToBlockingHealthClient(final HealthClient client) { - this.client = client; - } - - @Override - public HealthClient asClient() { - return client; - } - - @Override - public GrpcExecutionContext executionContext() { - return client.executionContext(); - } - - @Override - public void close() throws Exception { - client.close(); - } - - @Override - public HealthCheckResponse check(final HealthCheckRequest request) throws Exception { - return client.check(request).toFuture().get(); - } - - @Deprecated - @Override - public HealthCheckResponse check(final CheckMetadata metadata, - final HealthCheckRequest request) throws Exception { - return client.check(metadata, request).toFuture().get(); - } - - @Override - public HealthCheckResponse check(final GrpcClientMetadata metadata, - final HealthCheckRequest request) throws Exception { - return client.check(metadata, request).toFuture().get(); - } - - @Override - public BlockingIterable watch(final HealthCheckRequest request) - throws Exception { - return client.watch(request).toIterable(); - } - - @Deprecated - @Override - public BlockingIterable watch(final WatchMetadata metadata, - final HealthCheckRequest request) throws Exception { - return client.watch(metadata, request).toIterable(); - } - - @Override - public BlockingIterable watch(final GrpcClientMetadata metadata, - final HealthCheckRequest request) throws Exception { - return client.watch(metadata, request).toIterable(); - } - } - } -} diff --git a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckRequest.java b/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckRequest.java deleted file mode 100644 index 2f3cb0b8c6..0000000000 --- a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckRequest.java +++ /dev/null @@ -1,557 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpc/health/v1/health.proto - -package io.servicetalk.health.v1; - -/** - * Protobuf type {@code grpc.health.v1.HealthCheckRequest} - */ -public final class HealthCheckRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.health.v1.HealthCheckRequest) - HealthCheckRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use HealthCheckRequest.newBuilder() to construct. - private HealthCheckRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HealthCheckRequest() { - service_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HealthCheckRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HealthCheckRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - service_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.servicetalk.health.v1.HealthCheckRequest.class, io.servicetalk.health.v1.HealthCheckRequest.Builder.class); - } - - public static final int SERVICE_FIELD_NUMBER = 1; - private volatile java.lang.Object service_; - /** - * string service = 1; - * @return The service. - */ - @java.lang.Override - public java.lang.String getService() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } - } - /** - * string service = 1; - * @return The bytes for service. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.servicetalk.health.v1.HealthCheckRequest)) { - return super.equals(obj); - } - io.servicetalk.health.v1.HealthCheckRequest other = (io.servicetalk.health.v1.HealthCheckRequest) obj; - - if (!getService() - .equals(other.getService())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.servicetalk.health.v1.HealthCheckRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.servicetalk.health.v1.HealthCheckRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grpc.health.v1.HealthCheckRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.health.v1.HealthCheckRequest) - io.servicetalk.health.v1.HealthCheckRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.servicetalk.health.v1.HealthCheckRequest.class, io.servicetalk.health.v1.HealthCheckRequest.Builder.class); - } - - // Construct using io.servicetalk.health.v1.HealthCheckRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - service_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckRequest_descriptor; - } - - @java.lang.Override - public io.servicetalk.health.v1.HealthCheckRequest getDefaultInstanceForType() { - return io.servicetalk.health.v1.HealthCheckRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.servicetalk.health.v1.HealthCheckRequest build() { - io.servicetalk.health.v1.HealthCheckRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.servicetalk.health.v1.HealthCheckRequest buildPartial() { - io.servicetalk.health.v1.HealthCheckRequest result = new io.servicetalk.health.v1.HealthCheckRequest(this); - result.service_ = service_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.servicetalk.health.v1.HealthCheckRequest) { - return mergeFrom((io.servicetalk.health.v1.HealthCheckRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.servicetalk.health.v1.HealthCheckRequest other) { - if (other == io.servicetalk.health.v1.HealthCheckRequest.getDefaultInstance()) return this; - if (!other.getService().isEmpty()) { - service_ = other.service_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - io.servicetalk.health.v1.HealthCheckRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.servicetalk.health.v1.HealthCheckRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object service_ = ""; - /** - * string service = 1; - * @return The service. - */ - public java.lang.String getService() { - java.lang.Object ref = service_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - service_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string service = 1; - * @return The bytes for service. - */ - public com.google.protobuf.ByteString - getServiceBytes() { - java.lang.Object ref = service_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - service_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string service = 1; - * @param value The service to set. - * @return This builder for chaining. - */ - public Builder setService( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - service_ = value; - onChanged(); - return this; - } - /** - * string service = 1; - * @return This builder for chaining. - */ - public Builder clearService() { - - service_ = getDefaultInstance().getService(); - onChanged(); - return this; - } - /** - * string service = 1; - * @param value The bytes for service to set. - * @return This builder for chaining. - */ - public Builder setServiceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - service_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.health.v1.HealthCheckRequest) - } - - // @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckRequest) - private static final io.servicetalk.health.v1.HealthCheckRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.servicetalk.health.v1.HealthCheckRequest(); - } - - public static io.servicetalk.health.v1.HealthCheckRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HealthCheckRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthCheckRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.servicetalk.health.v1.HealthCheckRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckRequestOrBuilder.java b/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckRequestOrBuilder.java deleted file mode 100644 index 63b74c6b07..0000000000 --- a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckRequestOrBuilder.java +++ /dev/null @@ -1,21 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpc/health/v1/health.proto - -package io.servicetalk.health.v1; - -public interface HealthCheckRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.health.v1.HealthCheckRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string service = 1; - * @return The service. - */ - java.lang.String getService(); - /** - * string service = 1; - * @return The bytes for service. - */ - com.google.protobuf.ByteString - getServiceBytes(); -} diff --git a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckResponse.java b/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckResponse.java deleted file mode 100644 index a279abf9a9..0000000000 --- a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckResponse.java +++ /dev/null @@ -1,649 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpc/health/v1/health.proto - -package io.servicetalk.health.v1; - -/** - * Protobuf type {@code grpc.health.v1.HealthCheckResponse} - */ -public final class HealthCheckResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:grpc.health.v1.HealthCheckResponse) - HealthCheckResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use HealthCheckResponse.newBuilder() to construct. - private HealthCheckResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HealthCheckResponse() { - status_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HealthCheckResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HealthCheckResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - status_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.servicetalk.health.v1.HealthCheckResponse.class, io.servicetalk.health.v1.HealthCheckResponse.Builder.class); - } - - /** - * Protobuf enum {@code grpc.health.v1.HealthCheckResponse.ServingStatus} - */ - public enum ServingStatus - implements com.google.protobuf.ProtocolMessageEnum { - /** - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - * SERVING = 1; - */ - SERVING(1), - /** - * NOT_SERVING = 2; - */ - NOT_SERVING(2), - /** - *
-     * Used only by the Watch method.
-     * 
- * - * SERVICE_UNKNOWN = 3; - */ - SERVICE_UNKNOWN(3), - UNRECOGNIZED(-1), - ; - - /** - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - * SERVING = 1; - */ - public static final int SERVING_VALUE = 1; - /** - * NOT_SERVING = 2; - */ - public static final int NOT_SERVING_VALUE = 2; - /** - *
-     * Used only by the Watch method.
-     * 
- * - * SERVICE_UNKNOWN = 3; - */ - public static final int SERVICE_UNKNOWN_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ServingStatus valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ServingStatus forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return SERVING; - case 2: return NOT_SERVING; - case 3: return SERVICE_UNKNOWN; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ServingStatus> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ServingStatus findValueByNumber(int number) { - return ServingStatus.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.servicetalk.health.v1.HealthCheckResponse.getDescriptor().getEnumTypes().get(0); - } - - private static final ServingStatus[] VALUES = values(); - - public static ServingStatus valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ServingStatus(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:grpc.health.v1.HealthCheckResponse.ServingStatus) - } - - public static final int STATUS_FIELD_NUMBER = 1; - private int status_; - /** - * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; - * @return The enum numeric value on the wire for status. - */ - @java.lang.Override public int getStatusValue() { - return status_; - } - /** - * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; - * @return The status. - */ - @java.lang.Override public io.servicetalk.health.v1.HealthCheckResponse.ServingStatus getStatus() { - @SuppressWarnings("deprecation") - io.servicetalk.health.v1.HealthCheckResponse.ServingStatus result = io.servicetalk.health.v1.HealthCheckResponse.ServingStatus.valueOf(status_); - return result == null ? io.servicetalk.health.v1.HealthCheckResponse.ServingStatus.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (status_ != io.servicetalk.health.v1.HealthCheckResponse.ServingStatus.UNKNOWN.getNumber()) { - output.writeEnum(1, status_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (status_ != io.servicetalk.health.v1.HealthCheckResponse.ServingStatus.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, status_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.servicetalk.health.v1.HealthCheckResponse)) { - return super.equals(obj); - } - io.servicetalk.health.v1.HealthCheckResponse other = (io.servicetalk.health.v1.HealthCheckResponse) obj; - - if (status_ != other.status_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + status_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.servicetalk.health.v1.HealthCheckResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.servicetalk.health.v1.HealthCheckResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code grpc.health.v1.HealthCheckResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:grpc.health.v1.HealthCheckResponse) - io.servicetalk.health.v1.HealthCheckResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.servicetalk.health.v1.HealthCheckResponse.class, io.servicetalk.health.v1.HealthCheckResponse.Builder.class); - } - - // Construct using io.servicetalk.health.v1.HealthCheckResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - status_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.servicetalk.health.v1.HealthProto.internal_static_grpc_health_v1_HealthCheckResponse_descriptor; - } - - @java.lang.Override - public io.servicetalk.health.v1.HealthCheckResponse getDefaultInstanceForType() { - return io.servicetalk.health.v1.HealthCheckResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.servicetalk.health.v1.HealthCheckResponse build() { - io.servicetalk.health.v1.HealthCheckResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.servicetalk.health.v1.HealthCheckResponse buildPartial() { - io.servicetalk.health.v1.HealthCheckResponse result = new io.servicetalk.health.v1.HealthCheckResponse(this); - result.status_ = status_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.servicetalk.health.v1.HealthCheckResponse) { - return mergeFrom((io.servicetalk.health.v1.HealthCheckResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.servicetalk.health.v1.HealthCheckResponse other) { - if (other == io.servicetalk.health.v1.HealthCheckResponse.getDefaultInstance()) return this; - if (other.status_ != 0) { - setStatusValue(other.getStatusValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - io.servicetalk.health.v1.HealthCheckResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.servicetalk.health.v1.HealthCheckResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int status_ = 0; - /** - * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; - * @return The enum numeric value on the wire for status. - */ - @java.lang.Override public int getStatusValue() { - return status_; - } - /** - * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; - * @param value The enum numeric value on the wire for status to set. - * @return This builder for chaining. - */ - public Builder setStatusValue(int value) { - - status_ = value; - onChanged(); - return this; - } - /** - * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; - * @return The status. - */ - @java.lang.Override - public io.servicetalk.health.v1.HealthCheckResponse.ServingStatus getStatus() { - @SuppressWarnings("deprecation") - io.servicetalk.health.v1.HealthCheckResponse.ServingStatus result = io.servicetalk.health.v1.HealthCheckResponse.ServingStatus.valueOf(status_); - return result == null ? io.servicetalk.health.v1.HealthCheckResponse.ServingStatus.UNRECOGNIZED : result; - } - /** - * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; - * @param value The status to set. - * @return This builder for chaining. - */ - public Builder setStatus(io.servicetalk.health.v1.HealthCheckResponse.ServingStatus value) { - if (value == null) { - throw new NullPointerException(); - } - - status_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; - * @return This builder for chaining. - */ - public Builder clearStatus() { - - status_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:grpc.health.v1.HealthCheckResponse) - } - - // @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckResponse) - private static final io.servicetalk.health.v1.HealthCheckResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.servicetalk.health.v1.HealthCheckResponse(); - } - - public static io.servicetalk.health.v1.HealthCheckResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HealthCheckResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthCheckResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.servicetalk.health.v1.HealthCheckResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckResponseOrBuilder.java b/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckResponseOrBuilder.java deleted file mode 100644 index 246d4006de..0000000000 --- a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthCheckResponseOrBuilder.java +++ /dev/null @@ -1,20 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpc/health/v1/health.proto - -package io.servicetalk.health.v1; - -public interface HealthCheckResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:grpc.health.v1.HealthCheckResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; - * @return The enum numeric value on the wire for status. - */ - int getStatusValue(); - /** - * .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1; - * @return The status. - */ - io.servicetalk.health.v1.HealthCheckResponse.ServingStatus getStatus(); -} diff --git a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthProto.java b/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthProto.java deleted file mode 100644 index ea3b691c42..0000000000 --- a/servicetalk-grpc-health/src/generated/main/java/io/servicetalk/health/v1/HealthProto.java +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpc/health/v1/health.proto - -package io.servicetalk.health.v1; - -public final class HealthProto { - private HealthProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_health_v1_HealthCheckRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_health_v1_HealthCheckRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_grpc_health_v1_HealthCheckResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_grpc_health_v1_HealthCheckResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033grpc/health/v1/health.proto\022\016grpc.heal" + - "th.v1\"%\n\022HealthCheckRequest\022\017\n\007service\030\001" + - " \001(\t\"\251\001\n\023HealthCheckResponse\022A\n\006status\030\001" + - " \001(\01621.grpc.health.v1.HealthCheckRespons" + - "e.ServingStatus\"O\n\rServingStatus\022\013\n\007UNKN" + - "OWN\020\000\022\013\n\007SERVING\020\001\022\017\n\013NOT_SERVING\020\002\022\023\n\017S" + - "ERVICE_UNKNOWN\020\0032\256\001\n\006Health\022P\n\005Check\022\".g" + - "rpc.health.v1.HealthCheckRequest\032#.grpc." + - "health.v1.HealthCheckResponse\022R\n\005Watch\022\"" + - ".grpc.health.v1.HealthCheckRequest\032#.grp" + - "c.health.v1.HealthCheckResponse0\001Bh\n\030io." + - "servicetalk.health.v1B\013HealthProtoP\001Z,go" + - "ogle.golang.org/grpc/health/grpc_health_" + - "v1\252\002\016Grpc.Health.V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_grpc_health_v1_HealthCheckRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_grpc_health_v1_HealthCheckRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_health_v1_HealthCheckRequest_descriptor, - new java.lang.String[] { "Service", }); - internal_static_grpc_health_v1_HealthCheckResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_grpc_health_v1_HealthCheckResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_grpc_health_v1_HealthCheckResponse_descriptor, - new java.lang.String[] { "Status", }); - } - - // @@protoc_insertion_point(outer_class_scope) -}