![JAR search and dependency download from the Maven repository](/logo.png)
io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/service/load_stats/v3/lrs.proto
// Protobuf Java Version: 3.25.5
package io.envoyproxy.envoy.service.load_stats.v3;
/**
*
* The management server sends envoy a LoadStatsResponse with all clusters it
* is interested in learning load stats about.
*
*
* Protobuf type {@code envoy.service.load_stats.v3.LoadStatsResponse}
*/
public final class LoadStatsResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.load_stats.v3.LoadStatsResponse)
LoadStatsResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use LoadStatsResponse.newBuilder() to construct.
private LoadStatsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LoadStatsResponse() {
clusters_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LoadStatsResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.load_stats.v3.LrsProto.internal_static_envoy_service_load_stats_v3_LoadStatsResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.load_stats.v3.LrsProto.internal_static_envoy_service_load_stats_v3_LoadStatsResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse.class, io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse.Builder.class);
}
private int bitField0_;
public static final int CLUSTERS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList clusters_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @return A list containing the clusters.
*/
public com.google.protobuf.ProtocolStringList
getClustersList() {
return clusters_;
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @return The count of clusters.
*/
public int getClustersCount() {
return clusters_.size();
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @param index The index of the element to return.
* @return The clusters at the given index.
*/
public java.lang.String getClusters(int index) {
return clusters_.get(index);
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @param index The index of the value to return.
* @return The bytes of the clusters at the given index.
*/
public com.google.protobuf.ByteString
getClustersBytes(int index) {
return clusters_.getByteString(index);
}
public static final int SEND_ALL_CLUSTERS_FIELD_NUMBER = 4;
private boolean sendAllClusters_ = false;
/**
*
* If true, the client should send all clusters it knows about.
* Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their
* :ref:`client_features<envoy_v3_api_field_config.core.v3.Node.client_features>` field will honor this field.
*
*
* bool send_all_clusters = 4;
* @return The sendAllClusters.
*/
@java.lang.Override
public boolean getSendAllClusters() {
return sendAllClusters_;
}
public static final int LOAD_REPORTING_INTERVAL_FIELD_NUMBER = 2;
private com.google.protobuf.Duration loadReportingInterval_;
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
* @return Whether the loadReportingInterval field is set.
*/
@java.lang.Override
public boolean hasLoadReportingInterval() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
* @return The loadReportingInterval.
*/
@java.lang.Override
public com.google.protobuf.Duration getLoadReportingInterval() {
return loadReportingInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : loadReportingInterval_;
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getLoadReportingIntervalOrBuilder() {
return loadReportingInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : loadReportingInterval_;
}
public static final int REPORT_ENDPOINT_GRANULARITY_FIELD_NUMBER = 3;
private boolean reportEndpointGranularity_ = false;
/**
*
* Set to ``true`` if the management server supports endpoint granularity
* report.
*
*
* bool report_endpoint_granularity = 3;
* @return The reportEndpointGranularity.
*/
@java.lang.Override
public boolean getReportEndpointGranularity() {
return reportEndpointGranularity_;
}
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 {
for (int i = 0; i < clusters_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusters_.getRaw(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getLoadReportingInterval());
}
if (reportEndpointGranularity_ != false) {
output.writeBool(3, reportEndpointGranularity_);
}
if (sendAllClusters_ != false) {
output.writeBool(4, sendAllClusters_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < clusters_.size(); i++) {
dataSize += computeStringSizeNoTag(clusters_.getRaw(i));
}
size += dataSize;
size += 1 * getClustersList().size();
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getLoadReportingInterval());
}
if (reportEndpointGranularity_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, reportEndpointGranularity_);
}
if (sendAllClusters_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, sendAllClusters_);
}
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.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse)) {
return super.equals(obj);
}
io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse other = (io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse) obj;
if (!getClustersList()
.equals(other.getClustersList())) return false;
if (getSendAllClusters()
!= other.getSendAllClusters()) return false;
if (hasLoadReportingInterval() != other.hasLoadReportingInterval()) return false;
if (hasLoadReportingInterval()) {
if (!getLoadReportingInterval()
.equals(other.getLoadReportingInterval())) return false;
}
if (getReportEndpointGranularity()
!= other.getReportEndpointGranularity()) return false;
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();
if (getClustersCount() > 0) {
hash = (37 * hash) + CLUSTERS_FIELD_NUMBER;
hash = (53 * hash) + getClustersList().hashCode();
}
hash = (37 * hash) + SEND_ALL_CLUSTERS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSendAllClusters());
if (hasLoadReportingInterval()) {
hash = (37 * hash) + LOAD_REPORTING_INTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getLoadReportingInterval().hashCode();
}
hash = (37 * hash) + REPORT_ENDPOINT_GRANULARITY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getReportEndpointGranularity());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse 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.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse 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.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse 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.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse 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;
}
/**
*
* The management server sends envoy a LoadStatsResponse with all clusters it
* is interested in learning load stats about.
*
*
* Protobuf type {@code envoy.service.load_stats.v3.LoadStatsResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.load_stats.v3.LoadStatsResponse)
io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.load_stats.v3.LrsProto.internal_static_envoy_service_load_stats_v3_LoadStatsResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.load_stats.v3.LrsProto.internal_static_envoy_service_load_stats_v3_LoadStatsResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse.class, io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLoadReportingIntervalFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
clusters_ =
com.google.protobuf.LazyStringArrayList.emptyList();
sendAllClusters_ = false;
loadReportingInterval_ = null;
if (loadReportingIntervalBuilder_ != null) {
loadReportingIntervalBuilder_.dispose();
loadReportingIntervalBuilder_ = null;
}
reportEndpointGranularity_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.service.load_stats.v3.LrsProto.internal_static_envoy_service_load_stats_v3_LoadStatsResponse_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse build() {
io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse buildPartial() {
io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse result = new io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
clusters_.makeImmutable();
result.clusters_ = clusters_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.sendAllClusters_ = sendAllClusters_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.loadReportingInterval_ = loadReportingIntervalBuilder_ == null
? loadReportingInterval_
: loadReportingIntervalBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.reportEndpointGranularity_ = reportEndpointGranularity_;
}
result.bitField0_ |= to_bitField0_;
}
@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.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse) {
return mergeFrom((io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse other) {
if (other == io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse.getDefaultInstance()) return this;
if (!other.clusters_.isEmpty()) {
if (clusters_.isEmpty()) {
clusters_ = other.clusters_;
bitField0_ |= 0x00000001;
} else {
ensureClustersIsMutable();
clusters_.addAll(other.clusters_);
}
onChanged();
}
if (other.getSendAllClusters() != false) {
setSendAllClusters(other.getSendAllClusters());
}
if (other.hasLoadReportingInterval()) {
mergeLoadReportingInterval(other.getLoadReportingInterval());
}
if (other.getReportEndpointGranularity() != false) {
setReportEndpointGranularity(other.getReportEndpointGranularity());
}
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: {
java.lang.String s = input.readStringRequireUtf8();
ensureClustersIsMutable();
clusters_.add(s);
break;
} // case 10
case 18: {
input.readMessage(
getLoadReportingIntervalFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 18
case 24: {
reportEndpointGranularity_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 24
case 32: {
sendAllClusters_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 32
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 bitField0_;
private com.google.protobuf.LazyStringArrayList clusters_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureClustersIsMutable() {
if (!clusters_.isModifiable()) {
clusters_ = new com.google.protobuf.LazyStringArrayList(clusters_);
}
bitField0_ |= 0x00000001;
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @return A list containing the clusters.
*/
public com.google.protobuf.ProtocolStringList
getClustersList() {
clusters_.makeImmutable();
return clusters_;
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @return The count of clusters.
*/
public int getClustersCount() {
return clusters_.size();
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @param index The index of the element to return.
* @return The clusters at the given index.
*/
public java.lang.String getClusters(int index) {
return clusters_.get(index);
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @param index The index of the value to return.
* @return The bytes of the clusters at the given index.
*/
public com.google.protobuf.ByteString
getClustersBytes(int index) {
return clusters_.getByteString(index);
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @param index The index to set the value at.
* @param value The clusters to set.
* @return This builder for chaining.
*/
public Builder setClusters(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureClustersIsMutable();
clusters_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @param value The clusters to add.
* @return This builder for chaining.
*/
public Builder addClusters(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureClustersIsMutable();
clusters_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @param values The clusters to add.
* @return This builder for chaining.
*/
public Builder addAllClusters(
java.lang.Iterable values) {
ensureClustersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, clusters_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @return This builder for chaining.
*/
public Builder clearClusters() {
clusters_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
*
* Clusters to report stats for.
* Not populated if ``send_all_clusters`` is true.
*
*
* repeated string clusters = 1;
* @param value The bytes of the clusters to add.
* @return This builder for chaining.
*/
public Builder addClustersBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureClustersIsMutable();
clusters_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private boolean sendAllClusters_ ;
/**
*
* If true, the client should send all clusters it knows about.
* Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their
* :ref:`client_features<envoy_v3_api_field_config.core.v3.Node.client_features>` field will honor this field.
*
*
* bool send_all_clusters = 4;
* @return The sendAllClusters.
*/
@java.lang.Override
public boolean getSendAllClusters() {
return sendAllClusters_;
}
/**
*
* If true, the client should send all clusters it knows about.
* Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their
* :ref:`client_features<envoy_v3_api_field_config.core.v3.Node.client_features>` field will honor this field.
*
*
* bool send_all_clusters = 4;
* @param value The sendAllClusters to set.
* @return This builder for chaining.
*/
public Builder setSendAllClusters(boolean value) {
sendAllClusters_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If true, the client should send all clusters it knows about.
* Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their
* :ref:`client_features<envoy_v3_api_field_config.core.v3.Node.client_features>` field will honor this field.
*
*
* bool send_all_clusters = 4;
* @return This builder for chaining.
*/
public Builder clearSendAllClusters() {
bitField0_ = (bitField0_ & ~0x00000002);
sendAllClusters_ = false;
onChanged();
return this;
}
private com.google.protobuf.Duration loadReportingInterval_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> loadReportingIntervalBuilder_;
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
* @return Whether the loadReportingInterval field is set.
*/
public boolean hasLoadReportingInterval() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
* @return The loadReportingInterval.
*/
public com.google.protobuf.Duration getLoadReportingInterval() {
if (loadReportingIntervalBuilder_ == null) {
return loadReportingInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : loadReportingInterval_;
} else {
return loadReportingIntervalBuilder_.getMessage();
}
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
*/
public Builder setLoadReportingInterval(com.google.protobuf.Duration value) {
if (loadReportingIntervalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loadReportingInterval_ = value;
} else {
loadReportingIntervalBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
*/
public Builder setLoadReportingInterval(
com.google.protobuf.Duration.Builder builderForValue) {
if (loadReportingIntervalBuilder_ == null) {
loadReportingInterval_ = builderForValue.build();
} else {
loadReportingIntervalBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
*/
public Builder mergeLoadReportingInterval(com.google.protobuf.Duration value) {
if (loadReportingIntervalBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
loadReportingInterval_ != null &&
loadReportingInterval_ != com.google.protobuf.Duration.getDefaultInstance()) {
getLoadReportingIntervalBuilder().mergeFrom(value);
} else {
loadReportingInterval_ = value;
}
} else {
loadReportingIntervalBuilder_.mergeFrom(value);
}
if (loadReportingInterval_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
*/
public Builder clearLoadReportingInterval() {
bitField0_ = (bitField0_ & ~0x00000004);
loadReportingInterval_ = null;
if (loadReportingIntervalBuilder_ != null) {
loadReportingIntervalBuilder_.dispose();
loadReportingIntervalBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
*/
public com.google.protobuf.Duration.Builder getLoadReportingIntervalBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getLoadReportingIntervalFieldBuilder().getBuilder();
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
*/
public com.google.protobuf.DurationOrBuilder getLoadReportingIntervalOrBuilder() {
if (loadReportingIntervalBuilder_ != null) {
return loadReportingIntervalBuilder_.getMessageOrBuilder();
} else {
return loadReportingInterval_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : loadReportingInterval_;
}
}
/**
*
* The minimum interval of time to collect stats over. This is only a minimum for two reasons:
*
* 1. There may be some delay from when the timer fires until stats sampling occurs.
* 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic
* that is observed in between the corresponding previous ``LoadStatsRequest`` and this
* ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period
* of inobservability that might otherwise exists between the messages. New clusters are not
* subject to this consideration.
*
*
* .google.protobuf.Duration load_reporting_interval = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getLoadReportingIntervalFieldBuilder() {
if (loadReportingIntervalBuilder_ == null) {
loadReportingIntervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getLoadReportingInterval(),
getParentForChildren(),
isClean());
loadReportingInterval_ = null;
}
return loadReportingIntervalBuilder_;
}
private boolean reportEndpointGranularity_ ;
/**
*
* Set to ``true`` if the management server supports endpoint granularity
* report.
*
*
* bool report_endpoint_granularity = 3;
* @return The reportEndpointGranularity.
*/
@java.lang.Override
public boolean getReportEndpointGranularity() {
return reportEndpointGranularity_;
}
/**
*
* Set to ``true`` if the management server supports endpoint granularity
* report.
*
*
* bool report_endpoint_granularity = 3;
* @param value The reportEndpointGranularity to set.
* @return This builder for chaining.
*/
public Builder setReportEndpointGranularity(boolean value) {
reportEndpointGranularity_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Set to ``true`` if the management server supports endpoint granularity
* report.
*
*
* bool report_endpoint_granularity = 3;
* @return This builder for chaining.
*/
public Builder clearReportEndpointGranularity() {
bitField0_ = (bitField0_ & ~0x00000008);
reportEndpointGranularity_ = false;
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:envoy.service.load_stats.v3.LoadStatsResponse)
}
// @@protoc_insertion_point(class_scope:envoy.service.load_stats.v3.LoadStatsResponse)
private static final io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse();
}
public static io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LoadStatsResponse 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.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy