
io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/endpoint/v3/load_report.proto
package io.envoyproxy.envoy.config.endpoint.v3;
/**
*
* These are stats Envoy reports to the management server at a frequency defined by
* :ref:`LoadStatsResponse.load_reporting_interval<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.load_reporting_interval>`.
* Stats per upstream region/zone and optionally per subzone.
* [#next-free-field: 9]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.UpstreamLocalityStats}
*/
public final class UpstreamLocalityStats extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.endpoint.v3.UpstreamLocalityStats)
UpstreamLocalityStatsOrBuilder {
private static final long serialVersionUID = 0L;
// Use UpstreamLocalityStats.newBuilder() to construct.
private UpstreamLocalityStats(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private UpstreamLocalityStats() {
loadMetricStats_ = java.util.Collections.emptyList();
upstreamEndpointStats_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new UpstreamLocalityStats();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private UpstreamLocalityStats(
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: {
io.envoyproxy.envoy.config.core.v3.Locality.Builder subBuilder = null;
if (locality_ != null) {
subBuilder = locality_.toBuilder();
}
locality_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.Locality.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(locality_);
locality_ = subBuilder.buildPartial();
}
break;
}
case 16: {
totalSuccessfulRequests_ = input.readUInt64();
break;
}
case 24: {
totalRequestsInProgress_ = input.readUInt64();
break;
}
case 32: {
totalErrorRequests_ = input.readUInt64();
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
loadMetricStats_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
loadMetricStats_.add(
input.readMessage(io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.parser(), extensionRegistry));
break;
}
case 48: {
priority_ = input.readUInt32();
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
upstreamEndpointStats_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
upstreamEndpointStats_.add(
input.readMessage(io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.parser(), extensionRegistry));
break;
}
case 64: {
totalIssuedRequests_ = input.readUInt64();
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)) {
loadMetricStats_ = java.util.Collections.unmodifiableList(loadMetricStats_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
upstreamEndpointStats_ = java.util.Collections.unmodifiableList(upstreamEndpointStats_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.LoadReportProto.internal_static_envoy_config_endpoint_v3_UpstreamLocalityStats_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.LoadReportProto.internal_static_envoy_config_endpoint_v3_UpstreamLocalityStats_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats.class, io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats.Builder.class);
}
public static final int LOCALITY_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.config.core.v3.Locality locality_;
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
* @return Whether the locality field is set.
*/
@java.lang.Override
public boolean hasLocality() {
return locality_ != null;
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
* @return The locality.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.Locality getLocality() {
return locality_ == null ? io.envoyproxy.envoy.config.core.v3.Locality.getDefaultInstance() : locality_;
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder getLocalityOrBuilder() {
return getLocality();
}
public static final int TOTAL_SUCCESSFUL_REQUESTS_FIELD_NUMBER = 2;
private long totalSuccessfulRequests_;
/**
*
* The total number of requests successfully completed by the endpoints in the
* locality.
*
*
* uint64 total_successful_requests = 2;
* @return The totalSuccessfulRequests.
*/
@java.lang.Override
public long getTotalSuccessfulRequests() {
return totalSuccessfulRequests_;
}
public static final int TOTAL_REQUESTS_IN_PROGRESS_FIELD_NUMBER = 3;
private long totalRequestsInProgress_;
/**
*
* The total number of unfinished requests
*
*
* uint64 total_requests_in_progress = 3;
* @return The totalRequestsInProgress.
*/
@java.lang.Override
public long getTotalRequestsInProgress() {
return totalRequestsInProgress_;
}
public static final int TOTAL_ERROR_REQUESTS_FIELD_NUMBER = 4;
private long totalErrorRequests_;
/**
*
* The total number of requests that failed due to errors at the endpoint,
* aggregated over all endpoints in the locality.
*
*
* uint64 total_error_requests = 4;
* @return The totalErrorRequests.
*/
@java.lang.Override
public long getTotalErrorRequests() {
return totalErrorRequests_;
}
public static final int TOTAL_ISSUED_REQUESTS_FIELD_NUMBER = 8;
private long totalIssuedRequests_;
/**
*
* The total number of requests that were issued by this Envoy since
* the last report. This information is aggregated over all the
* upstream endpoints in the locality.
*
*
* uint64 total_issued_requests = 8;
* @return The totalIssuedRequests.
*/
@java.lang.Override
public long getTotalIssuedRequests() {
return totalIssuedRequests_;
}
public static final int LOAD_METRIC_STATS_FIELD_NUMBER = 5;
private java.util.List loadMetricStats_;
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
@java.lang.Override
public java.util.List getLoadMetricStatsList() {
return loadMetricStats_;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStatsOrBuilder>
getLoadMetricStatsOrBuilderList() {
return loadMetricStats_;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
@java.lang.Override
public int getLoadMetricStatsCount() {
return loadMetricStats_.size();
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats getLoadMetricStats(int index) {
return loadMetricStats_.get(index);
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStatsOrBuilder getLoadMetricStatsOrBuilder(
int index) {
return loadMetricStats_.get(index);
}
public static final int UPSTREAM_ENDPOINT_STATS_FIELD_NUMBER = 7;
private java.util.List upstreamEndpointStats_;
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
@java.lang.Override
public java.util.List getUpstreamEndpointStatsList() {
return upstreamEndpointStats_;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStatsOrBuilder>
getUpstreamEndpointStatsOrBuilderList() {
return upstreamEndpointStats_;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
@java.lang.Override
public int getUpstreamEndpointStatsCount() {
return upstreamEndpointStats_.size();
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats getUpstreamEndpointStats(int index) {
return upstreamEndpointStats_.get(index);
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStatsOrBuilder getUpstreamEndpointStatsOrBuilder(
int index) {
return upstreamEndpointStats_.get(index);
}
public static final int PRIORITY_FIELD_NUMBER = 6;
private int priority_;
/**
*
* [#not-implemented-hide:] The priority of the endpoint group these metrics
* were collected from.
*
*
* uint32 priority = 6;
* @return The priority.
*/
@java.lang.Override
public int getPriority() {
return priority_;
}
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 (locality_ != null) {
output.writeMessage(1, getLocality());
}
if (totalSuccessfulRequests_ != 0L) {
output.writeUInt64(2, totalSuccessfulRequests_);
}
if (totalRequestsInProgress_ != 0L) {
output.writeUInt64(3, totalRequestsInProgress_);
}
if (totalErrorRequests_ != 0L) {
output.writeUInt64(4, totalErrorRequests_);
}
for (int i = 0; i < loadMetricStats_.size(); i++) {
output.writeMessage(5, loadMetricStats_.get(i));
}
if (priority_ != 0) {
output.writeUInt32(6, priority_);
}
for (int i = 0; i < upstreamEndpointStats_.size(); i++) {
output.writeMessage(7, upstreamEndpointStats_.get(i));
}
if (totalIssuedRequests_ != 0L) {
output.writeUInt64(8, totalIssuedRequests_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (locality_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getLocality());
}
if (totalSuccessfulRequests_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, totalSuccessfulRequests_);
}
if (totalRequestsInProgress_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, totalRequestsInProgress_);
}
if (totalErrorRequests_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, totalErrorRequests_);
}
for (int i = 0; i < loadMetricStats_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, loadMetricStats_.get(i));
}
if (priority_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(6, priority_);
}
for (int i = 0; i < upstreamEndpointStats_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, upstreamEndpointStats_.get(i));
}
if (totalIssuedRequests_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(8, totalIssuedRequests_);
}
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.config.endpoint.v3.UpstreamLocalityStats)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats other = (io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats) obj;
if (hasLocality() != other.hasLocality()) return false;
if (hasLocality()) {
if (!getLocality()
.equals(other.getLocality())) return false;
}
if (getTotalSuccessfulRequests()
!= other.getTotalSuccessfulRequests()) return false;
if (getTotalRequestsInProgress()
!= other.getTotalRequestsInProgress()) return false;
if (getTotalErrorRequests()
!= other.getTotalErrorRequests()) return false;
if (getTotalIssuedRequests()
!= other.getTotalIssuedRequests()) return false;
if (!getLoadMetricStatsList()
.equals(other.getLoadMetricStatsList())) return false;
if (!getUpstreamEndpointStatsList()
.equals(other.getUpstreamEndpointStatsList())) return false;
if (getPriority()
!= other.getPriority()) 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 (hasLocality()) {
hash = (37 * hash) + LOCALITY_FIELD_NUMBER;
hash = (53 * hash) + getLocality().hashCode();
}
hash = (37 * hash) + TOTAL_SUCCESSFUL_REQUESTS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTotalSuccessfulRequests());
hash = (37 * hash) + TOTAL_REQUESTS_IN_PROGRESS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTotalRequestsInProgress());
hash = (37 * hash) + TOTAL_ERROR_REQUESTS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTotalErrorRequests());
hash = (37 * hash) + TOTAL_ISSUED_REQUESTS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTotalIssuedRequests());
if (getLoadMetricStatsCount() > 0) {
hash = (37 * hash) + LOAD_METRIC_STATS_FIELD_NUMBER;
hash = (53 * hash) + getLoadMetricStatsList().hashCode();
}
if (getUpstreamEndpointStatsCount() > 0) {
hash = (37 * hash) + UPSTREAM_ENDPOINT_STATS_FIELD_NUMBER;
hash = (53 * hash) + getUpstreamEndpointStatsList().hashCode();
}
hash = (37 * hash) + PRIORITY_FIELD_NUMBER;
hash = (53 * hash) + getPriority();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats 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.config.endpoint.v3.UpstreamLocalityStats parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats 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.config.endpoint.v3.UpstreamLocalityStats parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats 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.config.endpoint.v3.UpstreamLocalityStats parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats 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.config.endpoint.v3.UpstreamLocalityStats parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats 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.config.endpoint.v3.UpstreamLocalityStats 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;
}
/**
*
* These are stats Envoy reports to the management server at a frequency defined by
* :ref:`LoadStatsResponse.load_reporting_interval<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.load_reporting_interval>`.
* Stats per upstream region/zone and optionally per subzone.
* [#next-free-field: 9]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.UpstreamLocalityStats}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.endpoint.v3.UpstreamLocalityStats)
io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStatsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.LoadReportProto.internal_static_envoy_config_endpoint_v3_UpstreamLocalityStats_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.LoadReportProto.internal_static_envoy_config_endpoint_v3_UpstreamLocalityStats_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats.class, io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLoadMetricStatsFieldBuilder();
getUpstreamEndpointStatsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (localityBuilder_ == null) {
locality_ = null;
} else {
locality_ = null;
localityBuilder_ = null;
}
totalSuccessfulRequests_ = 0L;
totalRequestsInProgress_ = 0L;
totalErrorRequests_ = 0L;
totalIssuedRequests_ = 0L;
if (loadMetricStatsBuilder_ == null) {
loadMetricStats_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
loadMetricStatsBuilder_.clear();
}
if (upstreamEndpointStatsBuilder_ == null) {
upstreamEndpointStats_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
upstreamEndpointStatsBuilder_.clear();
}
priority_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.endpoint.v3.LoadReportProto.internal_static_envoy_config_endpoint_v3_UpstreamLocalityStats_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats build() {
io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats buildPartial() {
io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats result = new io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats(this);
int from_bitField0_ = bitField0_;
if (localityBuilder_ == null) {
result.locality_ = locality_;
} else {
result.locality_ = localityBuilder_.build();
}
result.totalSuccessfulRequests_ = totalSuccessfulRequests_;
result.totalRequestsInProgress_ = totalRequestsInProgress_;
result.totalErrorRequests_ = totalErrorRequests_;
result.totalIssuedRequests_ = totalIssuedRequests_;
if (loadMetricStatsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
loadMetricStats_ = java.util.Collections.unmodifiableList(loadMetricStats_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.loadMetricStats_ = loadMetricStats_;
} else {
result.loadMetricStats_ = loadMetricStatsBuilder_.build();
}
if (upstreamEndpointStatsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
upstreamEndpointStats_ = java.util.Collections.unmodifiableList(upstreamEndpointStats_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.upstreamEndpointStats_ = upstreamEndpointStats_;
} else {
result.upstreamEndpointStats_ = upstreamEndpointStatsBuilder_.build();
}
result.priority_ = priority_;
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.config.endpoint.v3.UpstreamLocalityStats) {
return mergeFrom((io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats other) {
if (other == io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats.getDefaultInstance()) return this;
if (other.hasLocality()) {
mergeLocality(other.getLocality());
}
if (other.getTotalSuccessfulRequests() != 0L) {
setTotalSuccessfulRequests(other.getTotalSuccessfulRequests());
}
if (other.getTotalRequestsInProgress() != 0L) {
setTotalRequestsInProgress(other.getTotalRequestsInProgress());
}
if (other.getTotalErrorRequests() != 0L) {
setTotalErrorRequests(other.getTotalErrorRequests());
}
if (other.getTotalIssuedRequests() != 0L) {
setTotalIssuedRequests(other.getTotalIssuedRequests());
}
if (loadMetricStatsBuilder_ == null) {
if (!other.loadMetricStats_.isEmpty()) {
if (loadMetricStats_.isEmpty()) {
loadMetricStats_ = other.loadMetricStats_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLoadMetricStatsIsMutable();
loadMetricStats_.addAll(other.loadMetricStats_);
}
onChanged();
}
} else {
if (!other.loadMetricStats_.isEmpty()) {
if (loadMetricStatsBuilder_.isEmpty()) {
loadMetricStatsBuilder_.dispose();
loadMetricStatsBuilder_ = null;
loadMetricStats_ = other.loadMetricStats_;
bitField0_ = (bitField0_ & ~0x00000001);
loadMetricStatsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLoadMetricStatsFieldBuilder() : null;
} else {
loadMetricStatsBuilder_.addAllMessages(other.loadMetricStats_);
}
}
}
if (upstreamEndpointStatsBuilder_ == null) {
if (!other.upstreamEndpointStats_.isEmpty()) {
if (upstreamEndpointStats_.isEmpty()) {
upstreamEndpointStats_ = other.upstreamEndpointStats_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureUpstreamEndpointStatsIsMutable();
upstreamEndpointStats_.addAll(other.upstreamEndpointStats_);
}
onChanged();
}
} else {
if (!other.upstreamEndpointStats_.isEmpty()) {
if (upstreamEndpointStatsBuilder_.isEmpty()) {
upstreamEndpointStatsBuilder_.dispose();
upstreamEndpointStatsBuilder_ = null;
upstreamEndpointStats_ = other.upstreamEndpointStats_;
bitField0_ = (bitField0_ & ~0x00000002);
upstreamEndpointStatsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getUpstreamEndpointStatsFieldBuilder() : null;
} else {
upstreamEndpointStatsBuilder_.addAllMessages(other.upstreamEndpointStats_);
}
}
}
if (other.getPriority() != 0) {
setPriority(other.getPriority());
}
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.config.endpoint.v3.UpstreamLocalityStats parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.envoyproxy.envoy.config.core.v3.Locality locality_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Locality, io.envoyproxy.envoy.config.core.v3.Locality.Builder, io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder> localityBuilder_;
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
* @return Whether the locality field is set.
*/
public boolean hasLocality() {
return localityBuilder_ != null || locality_ != null;
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
* @return The locality.
*/
public io.envoyproxy.envoy.config.core.v3.Locality getLocality() {
if (localityBuilder_ == null) {
return locality_ == null ? io.envoyproxy.envoy.config.core.v3.Locality.getDefaultInstance() : locality_;
} else {
return localityBuilder_.getMessage();
}
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public Builder setLocality(io.envoyproxy.envoy.config.core.v3.Locality value) {
if (localityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
locality_ = value;
onChanged();
} else {
localityBuilder_.setMessage(value);
}
return this;
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public Builder setLocality(
io.envoyproxy.envoy.config.core.v3.Locality.Builder builderForValue) {
if (localityBuilder_ == null) {
locality_ = builderForValue.build();
onChanged();
} else {
localityBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public Builder mergeLocality(io.envoyproxy.envoy.config.core.v3.Locality value) {
if (localityBuilder_ == null) {
if (locality_ != null) {
locality_ =
io.envoyproxy.envoy.config.core.v3.Locality.newBuilder(locality_).mergeFrom(value).buildPartial();
} else {
locality_ = value;
}
onChanged();
} else {
localityBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public Builder clearLocality() {
if (localityBuilder_ == null) {
locality_ = null;
onChanged();
} else {
locality_ = null;
localityBuilder_ = null;
}
return this;
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public io.envoyproxy.envoy.config.core.v3.Locality.Builder getLocalityBuilder() {
onChanged();
return getLocalityFieldBuilder().getBuilder();
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder getLocalityOrBuilder() {
if (localityBuilder_ != null) {
return localityBuilder_.getMessageOrBuilder();
} else {
return locality_ == null ?
io.envoyproxy.envoy.config.core.v3.Locality.getDefaultInstance() : locality_;
}
}
/**
*
* Name of zone, region and optionally endpoint group these metrics were
* collected from. Zone and region names could be empty if unknown.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Locality, io.envoyproxy.envoy.config.core.v3.Locality.Builder, io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder>
getLocalityFieldBuilder() {
if (localityBuilder_ == null) {
localityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Locality, io.envoyproxy.envoy.config.core.v3.Locality.Builder, io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder>(
getLocality(),
getParentForChildren(),
isClean());
locality_ = null;
}
return localityBuilder_;
}
private long totalSuccessfulRequests_ ;
/**
*
* The total number of requests successfully completed by the endpoints in the
* locality.
*
*
* uint64 total_successful_requests = 2;
* @return The totalSuccessfulRequests.
*/
@java.lang.Override
public long getTotalSuccessfulRequests() {
return totalSuccessfulRequests_;
}
/**
*
* The total number of requests successfully completed by the endpoints in the
* locality.
*
*
* uint64 total_successful_requests = 2;
* @param value The totalSuccessfulRequests to set.
* @return This builder for chaining.
*/
public Builder setTotalSuccessfulRequests(long value) {
totalSuccessfulRequests_ = value;
onChanged();
return this;
}
/**
*
* The total number of requests successfully completed by the endpoints in the
* locality.
*
*
* uint64 total_successful_requests = 2;
* @return This builder for chaining.
*/
public Builder clearTotalSuccessfulRequests() {
totalSuccessfulRequests_ = 0L;
onChanged();
return this;
}
private long totalRequestsInProgress_ ;
/**
*
* The total number of unfinished requests
*
*
* uint64 total_requests_in_progress = 3;
* @return The totalRequestsInProgress.
*/
@java.lang.Override
public long getTotalRequestsInProgress() {
return totalRequestsInProgress_;
}
/**
*
* The total number of unfinished requests
*
*
* uint64 total_requests_in_progress = 3;
* @param value The totalRequestsInProgress to set.
* @return This builder for chaining.
*/
public Builder setTotalRequestsInProgress(long value) {
totalRequestsInProgress_ = value;
onChanged();
return this;
}
/**
*
* The total number of unfinished requests
*
*
* uint64 total_requests_in_progress = 3;
* @return This builder for chaining.
*/
public Builder clearTotalRequestsInProgress() {
totalRequestsInProgress_ = 0L;
onChanged();
return this;
}
private long totalErrorRequests_ ;
/**
*
* The total number of requests that failed due to errors at the endpoint,
* aggregated over all endpoints in the locality.
*
*
* uint64 total_error_requests = 4;
* @return The totalErrorRequests.
*/
@java.lang.Override
public long getTotalErrorRequests() {
return totalErrorRequests_;
}
/**
*
* The total number of requests that failed due to errors at the endpoint,
* aggregated over all endpoints in the locality.
*
*
* uint64 total_error_requests = 4;
* @param value The totalErrorRequests to set.
* @return This builder for chaining.
*/
public Builder setTotalErrorRequests(long value) {
totalErrorRequests_ = value;
onChanged();
return this;
}
/**
*
* The total number of requests that failed due to errors at the endpoint,
* aggregated over all endpoints in the locality.
*
*
* uint64 total_error_requests = 4;
* @return This builder for chaining.
*/
public Builder clearTotalErrorRequests() {
totalErrorRequests_ = 0L;
onChanged();
return this;
}
private long totalIssuedRequests_ ;
/**
*
* The total number of requests that were issued by this Envoy since
* the last report. This information is aggregated over all the
* upstream endpoints in the locality.
*
*
* uint64 total_issued_requests = 8;
* @return The totalIssuedRequests.
*/
@java.lang.Override
public long getTotalIssuedRequests() {
return totalIssuedRequests_;
}
/**
*
* The total number of requests that were issued by this Envoy since
* the last report. This information is aggregated over all the
* upstream endpoints in the locality.
*
*
* uint64 total_issued_requests = 8;
* @param value The totalIssuedRequests to set.
* @return This builder for chaining.
*/
public Builder setTotalIssuedRequests(long value) {
totalIssuedRequests_ = value;
onChanged();
return this;
}
/**
*
* The total number of requests that were issued by this Envoy since
* the last report. This information is aggregated over all the
* upstream endpoints in the locality.
*
*
* uint64 total_issued_requests = 8;
* @return This builder for chaining.
*/
public Builder clearTotalIssuedRequests() {
totalIssuedRequests_ = 0L;
onChanged();
return this;
}
private java.util.List loadMetricStats_ =
java.util.Collections.emptyList();
private void ensureLoadMetricStatsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
loadMetricStats_ = new java.util.ArrayList(loadMetricStats_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.Builder, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStatsOrBuilder> loadMetricStatsBuilder_;
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public java.util.List getLoadMetricStatsList() {
if (loadMetricStatsBuilder_ == null) {
return java.util.Collections.unmodifiableList(loadMetricStats_);
} else {
return loadMetricStatsBuilder_.getMessageList();
}
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public int getLoadMetricStatsCount() {
if (loadMetricStatsBuilder_ == null) {
return loadMetricStats_.size();
} else {
return loadMetricStatsBuilder_.getCount();
}
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats getLoadMetricStats(int index) {
if (loadMetricStatsBuilder_ == null) {
return loadMetricStats_.get(index);
} else {
return loadMetricStatsBuilder_.getMessage(index);
}
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public Builder setLoadMetricStats(
int index, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats value) {
if (loadMetricStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLoadMetricStatsIsMutable();
loadMetricStats_.set(index, value);
onChanged();
} else {
loadMetricStatsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public Builder setLoadMetricStats(
int index, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.Builder builderForValue) {
if (loadMetricStatsBuilder_ == null) {
ensureLoadMetricStatsIsMutable();
loadMetricStats_.set(index, builderForValue.build());
onChanged();
} else {
loadMetricStatsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public Builder addLoadMetricStats(io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats value) {
if (loadMetricStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLoadMetricStatsIsMutable();
loadMetricStats_.add(value);
onChanged();
} else {
loadMetricStatsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public Builder addLoadMetricStats(
int index, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats value) {
if (loadMetricStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLoadMetricStatsIsMutable();
loadMetricStats_.add(index, value);
onChanged();
} else {
loadMetricStatsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public Builder addLoadMetricStats(
io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.Builder builderForValue) {
if (loadMetricStatsBuilder_ == null) {
ensureLoadMetricStatsIsMutable();
loadMetricStats_.add(builderForValue.build());
onChanged();
} else {
loadMetricStatsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public Builder addLoadMetricStats(
int index, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.Builder builderForValue) {
if (loadMetricStatsBuilder_ == null) {
ensureLoadMetricStatsIsMutable();
loadMetricStats_.add(index, builderForValue.build());
onChanged();
} else {
loadMetricStatsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public Builder addAllLoadMetricStats(
java.lang.Iterable extends io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats> values) {
if (loadMetricStatsBuilder_ == null) {
ensureLoadMetricStatsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, loadMetricStats_);
onChanged();
} else {
loadMetricStatsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public Builder clearLoadMetricStats() {
if (loadMetricStatsBuilder_ == null) {
loadMetricStats_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
loadMetricStatsBuilder_.clear();
}
return this;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public Builder removeLoadMetricStats(int index) {
if (loadMetricStatsBuilder_ == null) {
ensureLoadMetricStatsIsMutable();
loadMetricStats_.remove(index);
onChanged();
} else {
loadMetricStatsBuilder_.remove(index);
}
return this;
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.Builder getLoadMetricStatsBuilder(
int index) {
return getLoadMetricStatsFieldBuilder().getBuilder(index);
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStatsOrBuilder getLoadMetricStatsOrBuilder(
int index) {
if (loadMetricStatsBuilder_ == null) {
return loadMetricStats_.get(index); } else {
return loadMetricStatsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStatsOrBuilder>
getLoadMetricStatsOrBuilderList() {
if (loadMetricStatsBuilder_ != null) {
return loadMetricStatsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(loadMetricStats_);
}
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.Builder addLoadMetricStatsBuilder() {
return getLoadMetricStatsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.getDefaultInstance());
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.Builder addLoadMetricStatsBuilder(
int index) {
return getLoadMetricStatsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.getDefaultInstance());
}
/**
*
* Stats for multi-dimensional load balancing.
*
*
* repeated .envoy.config.endpoint.v3.EndpointLoadMetricStats load_metric_stats = 5;
*/
public java.util.List
getLoadMetricStatsBuilderList() {
return getLoadMetricStatsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.Builder, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStatsOrBuilder>
getLoadMetricStatsFieldBuilder() {
if (loadMetricStatsBuilder_ == null) {
loadMetricStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStats.Builder, io.envoyproxy.envoy.config.endpoint.v3.EndpointLoadMetricStatsOrBuilder>(
loadMetricStats_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
loadMetricStats_ = null;
}
return loadMetricStatsBuilder_;
}
private java.util.List upstreamEndpointStats_ =
java.util.Collections.emptyList();
private void ensureUpstreamEndpointStatsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
upstreamEndpointStats_ = new java.util.ArrayList(upstreamEndpointStats_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.Builder, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStatsOrBuilder> upstreamEndpointStatsBuilder_;
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public java.util.List getUpstreamEndpointStatsList() {
if (upstreamEndpointStatsBuilder_ == null) {
return java.util.Collections.unmodifiableList(upstreamEndpointStats_);
} else {
return upstreamEndpointStatsBuilder_.getMessageList();
}
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public int getUpstreamEndpointStatsCount() {
if (upstreamEndpointStatsBuilder_ == null) {
return upstreamEndpointStats_.size();
} else {
return upstreamEndpointStatsBuilder_.getCount();
}
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats getUpstreamEndpointStats(int index) {
if (upstreamEndpointStatsBuilder_ == null) {
return upstreamEndpointStats_.get(index);
} else {
return upstreamEndpointStatsBuilder_.getMessage(index);
}
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public Builder setUpstreamEndpointStats(
int index, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats value) {
if (upstreamEndpointStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpstreamEndpointStatsIsMutable();
upstreamEndpointStats_.set(index, value);
onChanged();
} else {
upstreamEndpointStatsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public Builder setUpstreamEndpointStats(
int index, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.Builder builderForValue) {
if (upstreamEndpointStatsBuilder_ == null) {
ensureUpstreamEndpointStatsIsMutable();
upstreamEndpointStats_.set(index, builderForValue.build());
onChanged();
} else {
upstreamEndpointStatsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public Builder addUpstreamEndpointStats(io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats value) {
if (upstreamEndpointStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpstreamEndpointStatsIsMutable();
upstreamEndpointStats_.add(value);
onChanged();
} else {
upstreamEndpointStatsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public Builder addUpstreamEndpointStats(
int index, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats value) {
if (upstreamEndpointStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpstreamEndpointStatsIsMutable();
upstreamEndpointStats_.add(index, value);
onChanged();
} else {
upstreamEndpointStatsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public Builder addUpstreamEndpointStats(
io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.Builder builderForValue) {
if (upstreamEndpointStatsBuilder_ == null) {
ensureUpstreamEndpointStatsIsMutable();
upstreamEndpointStats_.add(builderForValue.build());
onChanged();
} else {
upstreamEndpointStatsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public Builder addUpstreamEndpointStats(
int index, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.Builder builderForValue) {
if (upstreamEndpointStatsBuilder_ == null) {
ensureUpstreamEndpointStatsIsMutable();
upstreamEndpointStats_.add(index, builderForValue.build());
onChanged();
} else {
upstreamEndpointStatsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public Builder addAllUpstreamEndpointStats(
java.lang.Iterable extends io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats> values) {
if (upstreamEndpointStatsBuilder_ == null) {
ensureUpstreamEndpointStatsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, upstreamEndpointStats_);
onChanged();
} else {
upstreamEndpointStatsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public Builder clearUpstreamEndpointStats() {
if (upstreamEndpointStatsBuilder_ == null) {
upstreamEndpointStats_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
upstreamEndpointStatsBuilder_.clear();
}
return this;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public Builder removeUpstreamEndpointStats(int index) {
if (upstreamEndpointStatsBuilder_ == null) {
ensureUpstreamEndpointStatsIsMutable();
upstreamEndpointStats_.remove(index);
onChanged();
} else {
upstreamEndpointStatsBuilder_.remove(index);
}
return this;
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.Builder getUpstreamEndpointStatsBuilder(
int index) {
return getUpstreamEndpointStatsFieldBuilder().getBuilder(index);
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStatsOrBuilder getUpstreamEndpointStatsOrBuilder(
int index) {
if (upstreamEndpointStatsBuilder_ == null) {
return upstreamEndpointStats_.get(index); } else {
return upstreamEndpointStatsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStatsOrBuilder>
getUpstreamEndpointStatsOrBuilderList() {
if (upstreamEndpointStatsBuilder_ != null) {
return upstreamEndpointStatsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(upstreamEndpointStats_);
}
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.Builder addUpstreamEndpointStatsBuilder() {
return getUpstreamEndpointStatsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.getDefaultInstance());
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.Builder addUpstreamEndpointStatsBuilder(
int index) {
return getUpstreamEndpointStatsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.getDefaultInstance());
}
/**
*
* Endpoint granularity stats information for this locality. This information
* is populated if the Server requests it by setting
* :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
*
*
* repeated .envoy.config.endpoint.v3.UpstreamEndpointStats upstream_endpoint_stats = 7;
*/
public java.util.List
getUpstreamEndpointStatsBuilderList() {
return getUpstreamEndpointStatsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.Builder, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStatsOrBuilder>
getUpstreamEndpointStatsFieldBuilder() {
if (upstreamEndpointStatsBuilder_ == null) {
upstreamEndpointStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStats.Builder, io.envoyproxy.envoy.config.endpoint.v3.UpstreamEndpointStatsOrBuilder>(
upstreamEndpointStats_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
upstreamEndpointStats_ = null;
}
return upstreamEndpointStatsBuilder_;
}
private int priority_ ;
/**
*
* [#not-implemented-hide:] The priority of the endpoint group these metrics
* were collected from.
*
*
* uint32 priority = 6;
* @return The priority.
*/
@java.lang.Override
public int getPriority() {
return priority_;
}
/**
*
* [#not-implemented-hide:] The priority of the endpoint group these metrics
* were collected from.
*
*
* uint32 priority = 6;
* @param value The priority to set.
* @return This builder for chaining.
*/
public Builder setPriority(int value) {
priority_ = value;
onChanged();
return this;
}
/**
*
* [#not-implemented-hide:] The priority of the endpoint group these metrics
* were collected from.
*
*
* uint32 priority = 6;
* @return This builder for chaining.
*/
public Builder clearPriority() {
priority_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.endpoint.v3.UpstreamLocalityStats)
}
// @@protoc_insertion_point(class_scope:envoy.config.endpoint.v3.UpstreamLocalityStats)
private static final io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats();
}
public static io.envoyproxy.envoy.config.endpoint.v3.UpstreamLocalityStats getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public UpstreamLocalityStats parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new UpstreamLocalityStats(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.config.endpoint.v3.UpstreamLocalityStats getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy