main.java.com.grpc.health.v1.HealthCheckRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sl-protofiles Show documentation
Show all versions of sl-protofiles Show documentation
StreamLayer Java Protofiles
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/health/v1/health.proto
// Protobuf Java Version: 3.25.3
package com.grpc.health.v1;
/**
* Protobuf type {@code grpc.health.v1.HealthCheckRequest}
*/
public final class HealthCheckRequest extends
com.google.protobuf.GeneratedMessageLite<
HealthCheckRequest, HealthCheckRequest.Builder> implements
// @@protoc_insertion_point(message_implements:grpc.health.v1.HealthCheckRequest)
HealthCheckRequestOrBuilder {
private HealthCheckRequest() {
service_ = "";
}
private int bitField0_;
public static final int SERVICE_FIELD_NUMBER = 1;
private java.lang.String service_;
/**
* optional string service = 1 [json_name = "service"];
* @return Whether the service field is set.
*/
@java.lang.Override
public boolean hasService() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string service = 1 [json_name = "service"];
* @return The service.
*/
@java.lang.Override
public java.lang.String getService() {
return service_;
}
/**
* optional string service = 1 [json_name = "service"];
* @return The bytes for service.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getServiceBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(service_);
}
/**
* optional string service = 1 [json_name = "service"];
* @param value The service to set.
*/
private void setService(
java.lang.String value) {
java.lang.Class> valueClass = value.getClass();
bitField0_ |= 0x00000001;
service_ = value;
}
/**
* optional string service = 1 [json_name = "service"];
*/
private void clearService() {
bitField0_ = (bitField0_ & ~0x00000001);
service_ = getDefaultInstance().getService();
}
/**
* optional string service = 1 [json_name = "service"];
* @param value The bytes for service to set.
*/
private void setServiceBytes(
com.google.protobuf.ByteString value) {
checkByteStringIsUtf8(value);
service_ = value.toStringUtf8();
bitField0_ |= 0x00000001;
}
public static final int TIMEOUT_FIELD_NUMBER = 2;
private int timeout_;
/**
* optional int32 timeout = 2 [json_name = "timeout"];
* @return Whether the timeout field is set.
*/
@java.lang.Override
public boolean hasTimeout() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional int32 timeout = 2 [json_name = "timeout"];
* @return The timeout.
*/
@java.lang.Override
public int getTimeout() {
return timeout_;
}
/**
* optional int32 timeout = 2 [json_name = "timeout"];
* @param value The timeout to set.
*/
private void setTimeout(int value) {
bitField0_ |= 0x00000002;
timeout_ = value;
}
/**
* optional int32 timeout = 2 [json_name = "timeout"];
*/
private void clearTimeout() {
bitField0_ = (bitField0_ & ~0x00000002);
timeout_ = 0;
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.grpc.health.v1.HealthCheckRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.grpc.health.v1.HealthCheckRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.grpc.health.v1.HealthCheckRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.grpc.health.v1.HealthCheckRequest prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* Protobuf type {@code grpc.health.v1.HealthCheckRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.grpc.health.v1.HealthCheckRequest, Builder> implements
// @@protoc_insertion_point(builder_implements:grpc.health.v1.HealthCheckRequest)
com.grpc.health.v1.HealthCheckRequestOrBuilder {
// Construct using com.grpc.health.v1.HealthCheckRequest.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* optional string service = 1 [json_name = "service"];
* @return Whether the service field is set.
*/
@java.lang.Override
public boolean hasService() {
return instance.hasService();
}
/**
* optional string service = 1 [json_name = "service"];
* @return The service.
*/
@java.lang.Override
public java.lang.String getService() {
return instance.getService();
}
/**
* optional string service = 1 [json_name = "service"];
* @return The bytes for service.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getServiceBytes() {
return instance.getServiceBytes();
}
/**
* optional string service = 1 [json_name = "service"];
* @param value The service to set.
* @return This builder for chaining.
*/
public Builder setService(
java.lang.String value) {
copyOnWrite();
instance.setService(value);
return this;
}
/**
* optional string service = 1 [json_name = "service"];
* @return This builder for chaining.
*/
public Builder clearService() {
copyOnWrite();
instance.clearService();
return this;
}
/**
* optional string service = 1 [json_name = "service"];
* @param value The bytes for service to set.
* @return This builder for chaining.
*/
public Builder setServiceBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setServiceBytes(value);
return this;
}
/**
* optional int32 timeout = 2 [json_name = "timeout"];
* @return Whether the timeout field is set.
*/
@java.lang.Override
public boolean hasTimeout() {
return instance.hasTimeout();
}
/**
* optional int32 timeout = 2 [json_name = "timeout"];
* @return The timeout.
*/
@java.lang.Override
public int getTimeout() {
return instance.getTimeout();
}
/**
* optional int32 timeout = 2 [json_name = "timeout"];
* @param value The timeout to set.
* @return This builder for chaining.
*/
public Builder setTimeout(int value) {
copyOnWrite();
instance.setTimeout(value);
return this;
}
/**
* optional int32 timeout = 2 [json_name = "timeout"];
* @return This builder for chaining.
*/
public Builder clearTimeout() {
copyOnWrite();
instance.clearTimeout();
return this;
}
// @@protoc_insertion_point(builder_scope:grpc.health.v1.HealthCheckRequest)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.grpc.health.v1.HealthCheckRequest();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"service_",
"timeout_",
};
java.lang.String info =
"\u0000\u0002\u0000\u0001\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u1208\u0000\u0002" +
"\u1004\u0001";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.grpc.health.v1.HealthCheckRequest.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckRequest)
private static final com.grpc.health.v1.HealthCheckRequest DEFAULT_INSTANCE;
static {
HealthCheckRequest defaultInstance = new HealthCheckRequest();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
HealthCheckRequest.class, defaultInstance);
}
public static com.grpc.health.v1.HealthCheckRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}