io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/service/load_stats/v3/lrs.proto
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.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LoadStatsResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LoadStatsResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
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();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
clusters_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
clusters_.add(s);
break;
}
case 18: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (loadReportingInterval_ != null) {
subBuilder = loadReportingInterval_.toBuilder();
}
loadReportingInterval_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(loadReportingInterval_);
loadReportingInterval_ = subBuilder.buildPartial();
}
break;
}
case 24: {
reportEndpointGranularity_ = input.readBool();
break;
}
case 32: {
sendAllClusters_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
clusters_ = clusters_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
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);
}
public static final int CLUSTERS_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList clusters_;
/**
*
* 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_;
/**
*
* 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 loadReportingInterval_ != null;
}
/**
*
* 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 getLoadReportingInterval();
}
public static final int REPORT_ENDPOINT_GRANULARITY_FIELD_NUMBER = 3;
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_;
}
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 (loadReportingInterval_ != null) {
output.writeMessage(2, getLoadReportingInterval());
}
if (reportEndpointGranularity_ != false) {
output.writeBool(3, reportEndpointGranularity_);
}
if (sendAllClusters_ != false) {
output.writeBool(4, sendAllClusters_);
}
unknownFields.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 (loadReportingInterval_ != null) {
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 += 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.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 (!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();
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) + unknownFields.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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
clusters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
sendAllClusters_ = false;
if (loadReportingIntervalBuilder_ == null) {
loadReportingInterval_ = null;
} else {
loadReportingInterval_ = null;
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);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
clusters_ = clusters_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.clusters_ = clusters_;
result.sendAllClusters_ = sendAllClusters_;
if (loadReportingIntervalBuilder_ == null) {
result.loadReportingInterval_ = loadReportingInterval_;
} else {
result.loadReportingInterval_ = loadReportingIntervalBuilder_.build();
}
result.reportEndpointGranularity_ = reportEndpointGranularity_;
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.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_ = (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.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.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList clusters_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureClustersIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
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() {
return clusters_.getUnmodifiableView();
}
/**
*
* 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);
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);
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_);
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.EMPTY;
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);
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;
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() {
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 loadReportingIntervalBuilder_ != null || loadReportingInterval_ != null;
}
/**
*
* 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;
onChanged();
} else {
loadReportingIntervalBuilder_.setMessage(value);
}
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();
onChanged();
} else {
loadReportingIntervalBuilder_.setMessage(builderForValue.build());
}
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 (loadReportingInterval_ != null) {
loadReportingInterval_ =
com.google.protobuf.Duration.newBuilder(loadReportingInterval_).mergeFrom(value).buildPartial();
} else {
loadReportingInterval_ = value;
}
onChanged();
} else {
loadReportingIntervalBuilder_.mergeFrom(value);
}
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() {
if (loadReportingIntervalBuilder_ == null) {
loadReportingInterval_ = null;
onChanged();
} else {
loadReportingInterval_ = null;
loadReportingIntervalBuilder_ = null;
}
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() {
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;
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() {
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 {
return new LoadStatsResponse(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.envoyproxy.envoy.service.load_stats.v3.LoadStatsResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}