shade.polaris.io.grpc.lb.v1.LoadBalanceRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polaris-all Show documentation
Show all versions of polaris-all Show documentation
All in one project for polaris-java
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grpc/lb/v1/load_balancer.proto
// Protobuf Java Version: 3.25.1
package io.grpc.lb.v1;
/**
* Protobuf type {@code grpc.lb.v1.LoadBalanceRequest}
*/
public final class LoadBalanceRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.lb.v1.LoadBalanceRequest)
LoadBalanceRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use LoadBalanceRequest.newBuilder() to construct.
private LoadBalanceRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LoadBalanceRequest() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LoadBalanceRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.lb.v1.LoadBalanceRequest.class, io.grpc.lb.v1.LoadBalanceRequest.Builder.class);
}
private int loadBalanceRequestTypeCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object loadBalanceRequestType_;
public enum LoadBalanceRequestTypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
INITIAL_REQUEST(1),
CLIENT_STATS(2),
LOADBALANCEREQUESTTYPE_NOT_SET(0);
private final int value;
private LoadBalanceRequestTypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LoadBalanceRequestTypeCase valueOf(int value) {
return forNumber(value);
}
public static LoadBalanceRequestTypeCase forNumber(int value) {
switch (value) {
case 1: return INITIAL_REQUEST;
case 2: return CLIENT_STATS;
case 0: return LOADBALANCEREQUESTTYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public LoadBalanceRequestTypeCase
getLoadBalanceRequestTypeCase() {
return LoadBalanceRequestTypeCase.forNumber(
loadBalanceRequestTypeCase_);
}
public static final int INITIAL_REQUEST_FIELD_NUMBER = 1;
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
* @return Whether the initialRequest field is set.
*/
@java.lang.Override
public boolean hasInitialRequest() {
return loadBalanceRequestTypeCase_ == 1;
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
* @return The initialRequest.
*/
@java.lang.Override
public io.grpc.lb.v1.InitialLoadBalanceRequest getInitialRequest() {
if (loadBalanceRequestTypeCase_ == 1) {
return (io.grpc.lb.v1.InitialLoadBalanceRequest) loadBalanceRequestType_;
}
return io.grpc.lb.v1.InitialLoadBalanceRequest.getDefaultInstance();
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
*/
@java.lang.Override
public io.grpc.lb.v1.InitialLoadBalanceRequestOrBuilder getInitialRequestOrBuilder() {
if (loadBalanceRequestTypeCase_ == 1) {
return (io.grpc.lb.v1.InitialLoadBalanceRequest) loadBalanceRequestType_;
}
return io.grpc.lb.v1.InitialLoadBalanceRequest.getDefaultInstance();
}
public static final int CLIENT_STATS_FIELD_NUMBER = 2;
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
* @return Whether the clientStats field is set.
*/
@java.lang.Override
public boolean hasClientStats() {
return loadBalanceRequestTypeCase_ == 2;
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
* @return The clientStats.
*/
@java.lang.Override
public io.grpc.lb.v1.ClientStats getClientStats() {
if (loadBalanceRequestTypeCase_ == 2) {
return (io.grpc.lb.v1.ClientStats) loadBalanceRequestType_;
}
return io.grpc.lb.v1.ClientStats.getDefaultInstance();
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
*/
@java.lang.Override
public io.grpc.lb.v1.ClientStatsOrBuilder getClientStatsOrBuilder() {
if (loadBalanceRequestTypeCase_ == 2) {
return (io.grpc.lb.v1.ClientStats) loadBalanceRequestType_;
}
return io.grpc.lb.v1.ClientStats.getDefaultInstance();
}
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 (loadBalanceRequestTypeCase_ == 1) {
output.writeMessage(1, (io.grpc.lb.v1.InitialLoadBalanceRequest) loadBalanceRequestType_);
}
if (loadBalanceRequestTypeCase_ == 2) {
output.writeMessage(2, (io.grpc.lb.v1.ClientStats) loadBalanceRequestType_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (loadBalanceRequestTypeCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (io.grpc.lb.v1.InitialLoadBalanceRequest) loadBalanceRequestType_);
}
if (loadBalanceRequestTypeCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.grpc.lb.v1.ClientStats) loadBalanceRequestType_);
}
size += getUnknownFields().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.grpc.lb.v1.LoadBalanceRequest)) {
return super.equals(obj);
}
io.grpc.lb.v1.LoadBalanceRequest other = (io.grpc.lb.v1.LoadBalanceRequest) obj;
if (!getLoadBalanceRequestTypeCase().equals(other.getLoadBalanceRequestTypeCase())) return false;
switch (loadBalanceRequestTypeCase_) {
case 1:
if (!getInitialRequest()
.equals(other.getInitialRequest())) return false;
break;
case 2:
if (!getClientStats()
.equals(other.getClientStats())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (loadBalanceRequestTypeCase_) {
case 1:
hash = (37 * hash) + INITIAL_REQUEST_FIELD_NUMBER;
hash = (53 * hash) + getInitialRequest().hashCode();
break;
case 2:
hash = (37 * hash) + CLIENT_STATS_FIELD_NUMBER;
hash = (53 * hash) + getClientStats().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.lb.v1.LoadBalanceRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.lb.v1.LoadBalanceRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.lb.v1.LoadBalanceRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.lb.v1.LoadBalanceRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.lb.v1.LoadBalanceRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.lb.v1.LoadBalanceRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.lb.v1.LoadBalanceRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.lb.v1.LoadBalanceRequest 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.grpc.lb.v1.LoadBalanceRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.lb.v1.LoadBalanceRequest 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.grpc.lb.v1.LoadBalanceRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.lb.v1.LoadBalanceRequest 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.grpc.lb.v1.LoadBalanceRequest 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.lb.v1.LoadBalanceRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.lb.v1.LoadBalanceRequest)
io.grpc.lb.v1.LoadBalanceRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.lb.v1.LoadBalanceRequest.class, io.grpc.lb.v1.LoadBalanceRequest.Builder.class);
}
// Construct using io.grpc.lb.v1.LoadBalanceRequest.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (initialRequestBuilder_ != null) {
initialRequestBuilder_.clear();
}
if (clientStatsBuilder_ != null) {
clientStatsBuilder_.clear();
}
loadBalanceRequestTypeCase_ = 0;
loadBalanceRequestType_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceRequest_descriptor;
}
@java.lang.Override
public io.grpc.lb.v1.LoadBalanceRequest getDefaultInstanceForType() {
return io.grpc.lb.v1.LoadBalanceRequest.getDefaultInstance();
}
@java.lang.Override
public io.grpc.lb.v1.LoadBalanceRequest build() {
io.grpc.lb.v1.LoadBalanceRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grpc.lb.v1.LoadBalanceRequest buildPartial() {
io.grpc.lb.v1.LoadBalanceRequest result = new io.grpc.lb.v1.LoadBalanceRequest(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(io.grpc.lb.v1.LoadBalanceRequest result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(io.grpc.lb.v1.LoadBalanceRequest result) {
result.loadBalanceRequestTypeCase_ = loadBalanceRequestTypeCase_;
result.loadBalanceRequestType_ = this.loadBalanceRequestType_;
if (loadBalanceRequestTypeCase_ == 1 &&
initialRequestBuilder_ != null) {
result.loadBalanceRequestType_ = initialRequestBuilder_.build();
}
if (loadBalanceRequestTypeCase_ == 2 &&
clientStatsBuilder_ != null) {
result.loadBalanceRequestType_ = clientStatsBuilder_.build();
}
}
@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.grpc.lb.v1.LoadBalanceRequest) {
return mergeFrom((io.grpc.lb.v1.LoadBalanceRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.lb.v1.LoadBalanceRequest other) {
if (other == io.grpc.lb.v1.LoadBalanceRequest.getDefaultInstance()) return this;
switch (other.getLoadBalanceRequestTypeCase()) {
case INITIAL_REQUEST: {
mergeInitialRequest(other.getInitialRequest());
break;
}
case CLIENT_STATS: {
mergeClientStats(other.getClientStats());
break;
}
case LOADBALANCEREQUESTTYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getInitialRequestFieldBuilder().getBuilder(),
extensionRegistry);
loadBalanceRequestTypeCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getClientStatsFieldBuilder().getBuilder(),
extensionRegistry);
loadBalanceRequestTypeCase_ = 2;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int loadBalanceRequestTypeCase_ = 0;
private java.lang.Object loadBalanceRequestType_;
public LoadBalanceRequestTypeCase
getLoadBalanceRequestTypeCase() {
return LoadBalanceRequestTypeCase.forNumber(
loadBalanceRequestTypeCase_);
}
public Builder clearLoadBalanceRequestType() {
loadBalanceRequestTypeCase_ = 0;
loadBalanceRequestType_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.lb.v1.InitialLoadBalanceRequest, io.grpc.lb.v1.InitialLoadBalanceRequest.Builder, io.grpc.lb.v1.InitialLoadBalanceRequestOrBuilder> initialRequestBuilder_;
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
* @return Whether the initialRequest field is set.
*/
@java.lang.Override
public boolean hasInitialRequest() {
return loadBalanceRequestTypeCase_ == 1;
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
* @return The initialRequest.
*/
@java.lang.Override
public io.grpc.lb.v1.InitialLoadBalanceRequest getInitialRequest() {
if (initialRequestBuilder_ == null) {
if (loadBalanceRequestTypeCase_ == 1) {
return (io.grpc.lb.v1.InitialLoadBalanceRequest) loadBalanceRequestType_;
}
return io.grpc.lb.v1.InitialLoadBalanceRequest.getDefaultInstance();
} else {
if (loadBalanceRequestTypeCase_ == 1) {
return initialRequestBuilder_.getMessage();
}
return io.grpc.lb.v1.InitialLoadBalanceRequest.getDefaultInstance();
}
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
*/
public Builder setInitialRequest(io.grpc.lb.v1.InitialLoadBalanceRequest value) {
if (initialRequestBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loadBalanceRequestType_ = value;
onChanged();
} else {
initialRequestBuilder_.setMessage(value);
}
loadBalanceRequestTypeCase_ = 1;
return this;
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
*/
public Builder setInitialRequest(
io.grpc.lb.v1.InitialLoadBalanceRequest.Builder builderForValue) {
if (initialRequestBuilder_ == null) {
loadBalanceRequestType_ = builderForValue.build();
onChanged();
} else {
initialRequestBuilder_.setMessage(builderForValue.build());
}
loadBalanceRequestTypeCase_ = 1;
return this;
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
*/
public Builder mergeInitialRequest(io.grpc.lb.v1.InitialLoadBalanceRequest value) {
if (initialRequestBuilder_ == null) {
if (loadBalanceRequestTypeCase_ == 1 &&
loadBalanceRequestType_ != io.grpc.lb.v1.InitialLoadBalanceRequest.getDefaultInstance()) {
loadBalanceRequestType_ = io.grpc.lb.v1.InitialLoadBalanceRequest.newBuilder((io.grpc.lb.v1.InitialLoadBalanceRequest) loadBalanceRequestType_)
.mergeFrom(value).buildPartial();
} else {
loadBalanceRequestType_ = value;
}
onChanged();
} else {
if (loadBalanceRequestTypeCase_ == 1) {
initialRequestBuilder_.mergeFrom(value);
} else {
initialRequestBuilder_.setMessage(value);
}
}
loadBalanceRequestTypeCase_ = 1;
return this;
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
*/
public Builder clearInitialRequest() {
if (initialRequestBuilder_ == null) {
if (loadBalanceRequestTypeCase_ == 1) {
loadBalanceRequestTypeCase_ = 0;
loadBalanceRequestType_ = null;
onChanged();
}
} else {
if (loadBalanceRequestTypeCase_ == 1) {
loadBalanceRequestTypeCase_ = 0;
loadBalanceRequestType_ = null;
}
initialRequestBuilder_.clear();
}
return this;
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
*/
public io.grpc.lb.v1.InitialLoadBalanceRequest.Builder getInitialRequestBuilder() {
return getInitialRequestFieldBuilder().getBuilder();
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
*/
@java.lang.Override
public io.grpc.lb.v1.InitialLoadBalanceRequestOrBuilder getInitialRequestOrBuilder() {
if ((loadBalanceRequestTypeCase_ == 1) && (initialRequestBuilder_ != null)) {
return initialRequestBuilder_.getMessageOrBuilder();
} else {
if (loadBalanceRequestTypeCase_ == 1) {
return (io.grpc.lb.v1.InitialLoadBalanceRequest) loadBalanceRequestType_;
}
return io.grpc.lb.v1.InitialLoadBalanceRequest.getDefaultInstance();
}
}
/**
*
* This message should be sent on the first request to the load balancer.
*
*
* .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.lb.v1.InitialLoadBalanceRequest, io.grpc.lb.v1.InitialLoadBalanceRequest.Builder, io.grpc.lb.v1.InitialLoadBalanceRequestOrBuilder>
getInitialRequestFieldBuilder() {
if (initialRequestBuilder_ == null) {
if (!(loadBalanceRequestTypeCase_ == 1)) {
loadBalanceRequestType_ = io.grpc.lb.v1.InitialLoadBalanceRequest.getDefaultInstance();
}
initialRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.grpc.lb.v1.InitialLoadBalanceRequest, io.grpc.lb.v1.InitialLoadBalanceRequest.Builder, io.grpc.lb.v1.InitialLoadBalanceRequestOrBuilder>(
(io.grpc.lb.v1.InitialLoadBalanceRequest) loadBalanceRequestType_,
getParentForChildren(),
isClean());
loadBalanceRequestType_ = null;
}
loadBalanceRequestTypeCase_ = 1;
onChanged();
return initialRequestBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.lb.v1.ClientStats, io.grpc.lb.v1.ClientStats.Builder, io.grpc.lb.v1.ClientStatsOrBuilder> clientStatsBuilder_;
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
* @return Whether the clientStats field is set.
*/
@java.lang.Override
public boolean hasClientStats() {
return loadBalanceRequestTypeCase_ == 2;
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
* @return The clientStats.
*/
@java.lang.Override
public io.grpc.lb.v1.ClientStats getClientStats() {
if (clientStatsBuilder_ == null) {
if (loadBalanceRequestTypeCase_ == 2) {
return (io.grpc.lb.v1.ClientStats) loadBalanceRequestType_;
}
return io.grpc.lb.v1.ClientStats.getDefaultInstance();
} else {
if (loadBalanceRequestTypeCase_ == 2) {
return clientStatsBuilder_.getMessage();
}
return io.grpc.lb.v1.ClientStats.getDefaultInstance();
}
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
*/
public Builder setClientStats(io.grpc.lb.v1.ClientStats value) {
if (clientStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loadBalanceRequestType_ = value;
onChanged();
} else {
clientStatsBuilder_.setMessage(value);
}
loadBalanceRequestTypeCase_ = 2;
return this;
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
*/
public Builder setClientStats(
io.grpc.lb.v1.ClientStats.Builder builderForValue) {
if (clientStatsBuilder_ == null) {
loadBalanceRequestType_ = builderForValue.build();
onChanged();
} else {
clientStatsBuilder_.setMessage(builderForValue.build());
}
loadBalanceRequestTypeCase_ = 2;
return this;
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
*/
public Builder mergeClientStats(io.grpc.lb.v1.ClientStats value) {
if (clientStatsBuilder_ == null) {
if (loadBalanceRequestTypeCase_ == 2 &&
loadBalanceRequestType_ != io.grpc.lb.v1.ClientStats.getDefaultInstance()) {
loadBalanceRequestType_ = io.grpc.lb.v1.ClientStats.newBuilder((io.grpc.lb.v1.ClientStats) loadBalanceRequestType_)
.mergeFrom(value).buildPartial();
} else {
loadBalanceRequestType_ = value;
}
onChanged();
} else {
if (loadBalanceRequestTypeCase_ == 2) {
clientStatsBuilder_.mergeFrom(value);
} else {
clientStatsBuilder_.setMessage(value);
}
}
loadBalanceRequestTypeCase_ = 2;
return this;
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
*/
public Builder clearClientStats() {
if (clientStatsBuilder_ == null) {
if (loadBalanceRequestTypeCase_ == 2) {
loadBalanceRequestTypeCase_ = 0;
loadBalanceRequestType_ = null;
onChanged();
}
} else {
if (loadBalanceRequestTypeCase_ == 2) {
loadBalanceRequestTypeCase_ = 0;
loadBalanceRequestType_ = null;
}
clientStatsBuilder_.clear();
}
return this;
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
*/
public io.grpc.lb.v1.ClientStats.Builder getClientStatsBuilder() {
return getClientStatsFieldBuilder().getBuilder();
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
*/
@java.lang.Override
public io.grpc.lb.v1.ClientStatsOrBuilder getClientStatsOrBuilder() {
if ((loadBalanceRequestTypeCase_ == 2) && (clientStatsBuilder_ != null)) {
return clientStatsBuilder_.getMessageOrBuilder();
} else {
if (loadBalanceRequestTypeCase_ == 2) {
return (io.grpc.lb.v1.ClientStats) loadBalanceRequestType_;
}
return io.grpc.lb.v1.ClientStats.getDefaultInstance();
}
}
/**
*
* The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse.
*
*
* .grpc.lb.v1.ClientStats client_stats = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.lb.v1.ClientStats, io.grpc.lb.v1.ClientStats.Builder, io.grpc.lb.v1.ClientStatsOrBuilder>
getClientStatsFieldBuilder() {
if (clientStatsBuilder_ == null) {
if (!(loadBalanceRequestTypeCase_ == 2)) {
loadBalanceRequestType_ = io.grpc.lb.v1.ClientStats.getDefaultInstance();
}
clientStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.grpc.lb.v1.ClientStats, io.grpc.lb.v1.ClientStats.Builder, io.grpc.lb.v1.ClientStatsOrBuilder>(
(io.grpc.lb.v1.ClientStats) loadBalanceRequestType_,
getParentForChildren(),
isClean());
loadBalanceRequestType_ = null;
}
loadBalanceRequestTypeCase_ = 2;
onChanged();
return clientStatsBuilder_;
}
@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.lb.v1.LoadBalanceRequest)
}
// @@protoc_insertion_point(class_scope:grpc.lb.v1.LoadBalanceRequest)
private static final io.grpc.lb.v1.LoadBalanceRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.lb.v1.LoadBalanceRequest();
}
public static io.grpc.lb.v1.LoadBalanceRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LoadBalanceRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.grpc.lb.v1.LoadBalanceRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy