![JAR search and dependency download from the Maven repository](/logo.png)
com.google.api.servicecontrol.v1.Distribution Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of endpoints-management-protos Show documentation
Show all versions of endpoints-management-protos Show documentation
Contains the generated protocol buffer surface used by Endpoints
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/servicecontrol/v1/distribution.proto
package com.google.api.servicecontrol.v1;
/**
*
* Distribution represents a frequency distribution of double-valued sample
* points. It contains the size of the population of sample points plus
* additional optional information:
* - the arithmetic mean of the samples
* - the minimum and maximum of the samples
* - the sum-squared-deviation of the samples, used to compute variance
* - a histogram of the values of the sample points
*
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution}
*/
public final class Distribution extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.Distribution)
DistributionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Distribution.newBuilder() to construct.
private Distribution(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Distribution() {
bucketCounts_ = emptyLongList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Distribution();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Distribution(
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 8: {
count_ = input.readInt64();
break;
}
case 17: {
mean_ = input.readDouble();
break;
}
case 25: {
minimum_ = input.readDouble();
break;
}
case 33: {
maximum_ = input.readDouble();
break;
}
case 41: {
sumOfSquaredDeviation_ = input.readDouble();
break;
}
case 48: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
bucketCounts_ = newLongList();
mutable_bitField0_ |= 0x00000001;
}
bucketCounts_.addLong(input.readInt64());
break;
}
case 50: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
bucketCounts_ = newLongList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
bucketCounts_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
}
case 58: {
com.google.api.servicecontrol.v1.Distribution.LinearBuckets.Builder subBuilder = null;
if (bucketOptionCase_ == 7) {
subBuilder = ((com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_).toBuilder();
}
bucketOption_ =
input.readMessage(com.google.api.servicecontrol.v1.Distribution.LinearBuckets.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_);
bucketOption_ = subBuilder.buildPartial();
}
bucketOptionCase_ = 7;
break;
}
case 66: {
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.Builder subBuilder = null;
if (bucketOptionCase_ == 8) {
subBuilder = ((com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_).toBuilder();
}
bucketOption_ =
input.readMessage(com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_);
bucketOption_ = subBuilder.buildPartial();
}
bucketOptionCase_ = 8;
break;
}
case 74: {
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.Builder subBuilder = null;
if (bucketOptionCase_ == 9) {
subBuilder = ((com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_).toBuilder();
}
bucketOption_ =
input.readMessage(com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_);
bucketOption_ = subBuilder.buildPartial();
}
bucketOptionCase_ = 9;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
bucketCounts_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.Distribution.class, com.google.api.servicecontrol.v1.Distribution.Builder.class);
}
public interface LinearBucketsOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.api.servicecontrol.v1.Distribution.LinearBuckets)
com.google.protobuf.MessageOrBuilder {
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
int getNumFiniteBuckets();
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
* Must be strictly positive.
*
*
* double width = 2;
*/
double getWidth();
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
*
*
* double offset = 3;
*/
double getOffset();
}
/**
*
* Describing buckets with constant width.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution.LinearBuckets}
*/
public static final class LinearBuckets extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.Distribution.LinearBuckets)
LinearBucketsOrBuilder {
private static final long serialVersionUID = 0L;
// Use LinearBuckets.newBuilder() to construct.
private LinearBuckets(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LinearBuckets() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LinearBuckets();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LinearBuckets(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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 8: {
numFiniteBuckets_ = input.readInt32();
break;
}
case 17: {
width_ = input.readDouble();
break;
}
case 25: {
offset_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_LinearBuckets_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_LinearBuckets_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.Distribution.LinearBuckets.class, com.google.api.servicecontrol.v1.Distribution.LinearBuckets.Builder.class);
}
public static final int NUM_FINITE_BUCKETS_FIELD_NUMBER = 1;
private int numFiniteBuckets_;
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
public int getNumFiniteBuckets() {
return numFiniteBuckets_;
}
public static final int WIDTH_FIELD_NUMBER = 2;
private double width_;
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
* Must be strictly positive.
*
*
* double width = 2;
*/
public double getWidth() {
return width_;
}
public static final int OFFSET_FIELD_NUMBER = 3;
private double offset_;
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
*
*
* double offset = 3;
*/
public double getOffset() {
return offset_;
}
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 (numFiniteBuckets_ != 0) {
output.writeInt32(1, numFiniteBuckets_);
}
if (width_ != 0D) {
output.writeDouble(2, width_);
}
if (offset_ != 0D) {
output.writeDouble(3, offset_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (numFiniteBuckets_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, numFiniteBuckets_);
}
if (width_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, width_);
}
if (offset_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, offset_);
}
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 com.google.api.servicecontrol.v1.Distribution.LinearBuckets)) {
return super.equals(obj);
}
com.google.api.servicecontrol.v1.Distribution.LinearBuckets other = (com.google.api.servicecontrol.v1.Distribution.LinearBuckets) obj;
if (getNumFiniteBuckets()
!= other.getNumFiniteBuckets()) return false;
if (java.lang.Double.doubleToLongBits(getWidth())
!= java.lang.Double.doubleToLongBits(
other.getWidth())) return false;
if (java.lang.Double.doubleToLongBits(getOffset())
!= java.lang.Double.doubleToLongBits(
other.getOffset())) 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();
hash = (37 * hash) + NUM_FINITE_BUCKETS_FIELD_NUMBER;
hash = (53 * hash) + getNumFiniteBuckets();
hash = (37 * hash) + WIDTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getWidth()));
hash = (37 * hash) + OFFSET_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getOffset()));
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets 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 com.google.api.servicecontrol.v1.Distribution.LinearBuckets parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets 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 com.google.api.servicecontrol.v1.Distribution.LinearBuckets parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets 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(com.google.api.servicecontrol.v1.Distribution.LinearBuckets 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;
}
/**
*
* Describing buckets with constant width.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution.LinearBuckets}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.Distribution.LinearBuckets)
com.google.api.servicecontrol.v1.Distribution.LinearBucketsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_LinearBuckets_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_LinearBuckets_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.Distribution.LinearBuckets.class, com.google.api.servicecontrol.v1.Distribution.LinearBuckets.Builder.class);
}
// Construct using com.google.api.servicecontrol.v1.Distribution.LinearBuckets.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();
numFiniteBuckets_ = 0;
width_ = 0D;
offset_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_LinearBuckets_descriptor;
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution.LinearBuckets getDefaultInstanceForType() {
return com.google.api.servicecontrol.v1.Distribution.LinearBuckets.getDefaultInstance();
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution.LinearBuckets build() {
com.google.api.servicecontrol.v1.Distribution.LinearBuckets result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution.LinearBuckets buildPartial() {
com.google.api.servicecontrol.v1.Distribution.LinearBuckets result = new com.google.api.servicecontrol.v1.Distribution.LinearBuckets(this);
result.numFiniteBuckets_ = numFiniteBuckets_;
result.width_ = width_;
result.offset_ = offset_;
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 com.google.api.servicecontrol.v1.Distribution.LinearBuckets) {
return mergeFrom((com.google.api.servicecontrol.v1.Distribution.LinearBuckets)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.servicecontrol.v1.Distribution.LinearBuckets other) {
if (other == com.google.api.servicecontrol.v1.Distribution.LinearBuckets.getDefaultInstance()) return this;
if (other.getNumFiniteBuckets() != 0) {
setNumFiniteBuckets(other.getNumFiniteBuckets());
}
if (other.getWidth() != 0D) {
setWidth(other.getWidth());
}
if (other.getOffset() != 0D) {
setOffset(other.getOffset());
}
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 {
com.google.api.servicecontrol.v1.Distribution.LinearBuckets parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.servicecontrol.v1.Distribution.LinearBuckets) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int numFiniteBuckets_ ;
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
public int getNumFiniteBuckets() {
return numFiniteBuckets_;
}
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
public Builder setNumFiniteBuckets(int value) {
numFiniteBuckets_ = value;
onChanged();
return this;
}
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
public Builder clearNumFiniteBuckets() {
numFiniteBuckets_ = 0;
onChanged();
return this;
}
private double width_ ;
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
* Must be strictly positive.
*
*
* double width = 2;
*/
public double getWidth() {
return width_;
}
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
* Must be strictly positive.
*
*
* double width = 2;
*/
public Builder setWidth(double value) {
width_ = value;
onChanged();
return this;
}
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
* Must be strictly positive.
*
*
* double width = 2;
*/
public Builder clearWidth() {
width_ = 0D;
onChanged();
return this;
}
private double offset_ ;
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
*
*
* double offset = 3;
*/
public double getOffset() {
return offset_;
}
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
*
*
* double offset = 3;
*/
public Builder setOffset(double value) {
offset_ = value;
onChanged();
return this;
}
/**
*
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
*
*
* double offset = 3;
*/
public Builder clearOffset() {
offset_ = 0D;
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:google.api.servicecontrol.v1.Distribution.LinearBuckets)
}
// @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.Distribution.LinearBuckets)
private static final com.google.api.servicecontrol.v1.Distribution.LinearBuckets DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.Distribution.LinearBuckets();
}
public static com.google.api.servicecontrol.v1.Distribution.LinearBuckets getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LinearBuckets parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LinearBuckets(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 com.google.api.servicecontrol.v1.Distribution.LinearBuckets getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExponentialBucketsOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.api.servicecontrol.v1.Distribution.ExponentialBuckets)
com.google.protobuf.MessageOrBuilder {
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
int getNumFiniteBuckets();
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be larger than 1.0.
*
*
* double growth_factor = 2;
*/
double getGrowthFactor();
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be > 0.
*
*
* double scale = 3;
*/
double getScale();
}
/**
*
* Describing buckets with exponentially growing width.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution.ExponentialBuckets}
*/
public static final class ExponentialBuckets extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.Distribution.ExponentialBuckets)
ExponentialBucketsOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExponentialBuckets.newBuilder() to construct.
private ExponentialBuckets(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExponentialBuckets() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ExponentialBuckets();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ExponentialBuckets(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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 8: {
numFiniteBuckets_ = input.readInt32();
break;
}
case 17: {
growthFactor_ = input.readDouble();
break;
}
case 25: {
scale_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExponentialBuckets_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExponentialBuckets_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.class, com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.Builder.class);
}
public static final int NUM_FINITE_BUCKETS_FIELD_NUMBER = 1;
private int numFiniteBuckets_;
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
public int getNumFiniteBuckets() {
return numFiniteBuckets_;
}
public static final int GROWTH_FACTOR_FIELD_NUMBER = 2;
private double growthFactor_;
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be larger than 1.0.
*
*
* double growth_factor = 2;
*/
public double getGrowthFactor() {
return growthFactor_;
}
public static final int SCALE_FIELD_NUMBER = 3;
private double scale_;
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be > 0.
*
*
* double scale = 3;
*/
public double getScale() {
return scale_;
}
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 (numFiniteBuckets_ != 0) {
output.writeInt32(1, numFiniteBuckets_);
}
if (growthFactor_ != 0D) {
output.writeDouble(2, growthFactor_);
}
if (scale_ != 0D) {
output.writeDouble(3, scale_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (numFiniteBuckets_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, numFiniteBuckets_);
}
if (growthFactor_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, growthFactor_);
}
if (scale_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, scale_);
}
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 com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets)) {
return super.equals(obj);
}
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets other = (com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) obj;
if (getNumFiniteBuckets()
!= other.getNumFiniteBuckets()) return false;
if (java.lang.Double.doubleToLongBits(getGrowthFactor())
!= java.lang.Double.doubleToLongBits(
other.getGrowthFactor())) return false;
if (java.lang.Double.doubleToLongBits(getScale())
!= java.lang.Double.doubleToLongBits(
other.getScale())) 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();
hash = (37 * hash) + NUM_FINITE_BUCKETS_FIELD_NUMBER;
hash = (53 * hash) + getNumFiniteBuckets();
hash = (37 * hash) + GROWTH_FACTOR_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getGrowthFactor()));
hash = (37 * hash) + SCALE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getScale()));
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets 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 com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets 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 com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets 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(com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets 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;
}
/**
*
* Describing buckets with exponentially growing width.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution.ExponentialBuckets}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.Distribution.ExponentialBuckets)
com.google.api.servicecontrol.v1.Distribution.ExponentialBucketsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExponentialBuckets_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExponentialBuckets_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.class, com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.Builder.class);
}
// Construct using com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.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();
numFiniteBuckets_ = 0;
growthFactor_ = 0D;
scale_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExponentialBuckets_descriptor;
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets getDefaultInstanceForType() {
return com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.getDefaultInstance();
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets build() {
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets buildPartial() {
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets result = new com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets(this);
result.numFiniteBuckets_ = numFiniteBuckets_;
result.growthFactor_ = growthFactor_;
result.scale_ = scale_;
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 com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) {
return mergeFrom((com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets other) {
if (other == com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.getDefaultInstance()) return this;
if (other.getNumFiniteBuckets() != 0) {
setNumFiniteBuckets(other.getNumFiniteBuckets());
}
if (other.getGrowthFactor() != 0D) {
setGrowthFactor(other.getGrowthFactor());
}
if (other.getScale() != 0D) {
setScale(other.getScale());
}
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 {
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int numFiniteBuckets_ ;
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
public int getNumFiniteBuckets() {
return numFiniteBuckets_;
}
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
public Builder setNumFiniteBuckets(int value) {
numFiniteBuckets_ = value;
onChanged();
return this;
}
/**
*
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
*
* int32 num_finite_buckets = 1;
*/
public Builder clearNumFiniteBuckets() {
numFiniteBuckets_ = 0;
onChanged();
return this;
}
private double growthFactor_ ;
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be larger than 1.0.
*
*
* double growth_factor = 2;
*/
public double getGrowthFactor() {
return growthFactor_;
}
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be larger than 1.0.
*
*
* double growth_factor = 2;
*/
public Builder setGrowthFactor(double value) {
growthFactor_ = value;
onChanged();
return this;
}
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be larger than 1.0.
*
*
* double growth_factor = 2;
*/
public Builder clearGrowthFactor() {
growthFactor_ = 0D;
onChanged();
return this;
}
private double scale_ ;
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be > 0.
*
*
* double scale = 3;
*/
public double getScale() {
return scale_;
}
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be > 0.
*
*
* double scale = 3;
*/
public Builder setScale(double value) {
scale_ = value;
onChanged();
return this;
}
/**
*
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be > 0.
*
*
* double scale = 3;
*/
public Builder clearScale() {
scale_ = 0D;
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:google.api.servicecontrol.v1.Distribution.ExponentialBuckets)
}
// @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.Distribution.ExponentialBuckets)
private static final com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets();
}
public static com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExponentialBuckets parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ExponentialBuckets(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 com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExplicitBucketsOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.api.servicecontrol.v1.Distribution.ExplicitBuckets)
com.google.protobuf.MessageOrBuilder {
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
java.util.List getBoundsList();
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
int getBoundsCount();
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
double getBounds(int index);
}
/**
*
* Describing buckets with arbitrary user-provided width.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution.ExplicitBuckets}
*/
public static final class ExplicitBuckets extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.Distribution.ExplicitBuckets)
ExplicitBucketsOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExplicitBuckets.newBuilder() to construct.
private ExplicitBuckets(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExplicitBuckets() {
bounds_ = emptyDoubleList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ExplicitBuckets();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ExplicitBuckets(
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 9: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
bounds_ = newDoubleList();
mutable_bitField0_ |= 0x00000001;
}
bounds_.addDouble(input.readDouble());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
bounds_ = newDoubleList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
bounds_.addDouble(input.readDouble());
}
input.popLimit(limit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
bounds_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExplicitBuckets_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExplicitBuckets_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.class, com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.Builder.class);
}
public static final int BOUNDS_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.DoubleList bounds_;
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public java.util.List
getBoundsList() {
return bounds_;
}
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public int getBoundsCount() {
return bounds_.size();
}
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public double getBounds(int index) {
return bounds_.getDouble(index);
}
private int boundsMemoizedSerializedSize = -1;
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 {
getSerializedSize();
if (getBoundsList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(boundsMemoizedSerializedSize);
}
for (int i = 0; i < bounds_.size(); i++) {
output.writeDoubleNoTag(bounds_.getDouble(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
dataSize = 8 * getBoundsList().size();
size += dataSize;
if (!getBoundsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
boundsMemoizedSerializedSize = dataSize;
}
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 com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets)) {
return super.equals(obj);
}
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets other = (com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) obj;
if (!getBoundsList()
.equals(other.getBoundsList())) 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 (getBoundsCount() > 0) {
hash = (37 * hash) + BOUNDS_FIELD_NUMBER;
hash = (53 * hash) + getBoundsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets 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 com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets 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 com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets 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(com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets 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;
}
/**
*
* Describing buckets with arbitrary user-provided width.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution.ExplicitBuckets}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.Distribution.ExplicitBuckets)
com.google.api.servicecontrol.v1.Distribution.ExplicitBucketsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExplicitBuckets_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExplicitBuckets_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.class, com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.Builder.class);
}
// Construct using com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.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();
bounds_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_ExplicitBuckets_descriptor;
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets getDefaultInstanceForType() {
return com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.getDefaultInstance();
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets build() {
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets buildPartial() {
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets result = new com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
bounds_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.bounds_ = bounds_;
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 com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) {
return mergeFrom((com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets other) {
if (other == com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.getDefaultInstance()) return this;
if (!other.bounds_.isEmpty()) {
if (bounds_.isEmpty()) {
bounds_ = other.bounds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureBoundsIsMutable();
bounds_.addAll(other.bounds_);
}
onChanged();
}
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 {
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Internal.DoubleList bounds_ = emptyDoubleList();
private void ensureBoundsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
bounds_ = mutableCopy(bounds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public java.util.List
getBoundsList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(bounds_) : bounds_;
}
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public int getBoundsCount() {
return bounds_.size();
}
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public double getBounds(int index) {
return bounds_.getDouble(index);
}
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public Builder setBounds(
int index, double value) {
ensureBoundsIsMutable();
bounds_.setDouble(index, value);
onChanged();
return this;
}
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public Builder addBounds(double value) {
ensureBoundsIsMutable();
bounds_.addDouble(value);
onChanged();
return this;
}
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public Builder addAllBounds(
java.lang.Iterable extends java.lang.Double> values) {
ensureBoundsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, bounds_);
onChanged();
return this;
}
/**
*
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
*
* repeated double bounds = 1;
*/
public Builder clearBounds() {
bounds_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000001);
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:google.api.servicecontrol.v1.Distribution.ExplicitBuckets)
}
// @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.Distribution.ExplicitBuckets)
private static final com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets();
}
public static com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExplicitBuckets parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ExplicitBuckets(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 com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bucketOptionCase_ = 0;
private java.lang.Object bucketOption_;
public enum BucketOptionCase
implements com.google.protobuf.Internal.EnumLite {
LINEAR_BUCKETS(7),
EXPONENTIAL_BUCKETS(8),
EXPLICIT_BUCKETS(9),
BUCKETOPTION_NOT_SET(0);
private final int value;
private BucketOptionCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BucketOptionCase valueOf(int value) {
return forNumber(value);
}
public static BucketOptionCase forNumber(int value) {
switch (value) {
case 7: return LINEAR_BUCKETS;
case 8: return EXPONENTIAL_BUCKETS;
case 9: return EXPLICIT_BUCKETS;
case 0: return BUCKETOPTION_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public BucketOptionCase
getBucketOptionCase() {
return BucketOptionCase.forNumber(
bucketOptionCase_);
}
public static final int COUNT_FIELD_NUMBER = 1;
private long count_;
/**
*
* The total number of samples in the distribution. Must be >= 0.
*
*
* int64 count = 1;
*/
public long getCount() {
return count_;
}
public static final int MEAN_FIELD_NUMBER = 2;
private double mean_;
/**
*
* The arithmetic mean of the samples in the distribution. If `count` is
* zero then this field must be zero.
*
*
* double mean = 2;
*/
public double getMean() {
return mean_;
}
public static final int MINIMUM_FIELD_NUMBER = 3;
private double minimum_;
/**
*
* The minimum of the population of values. Ignored if `count` is zero.
*
*
* double minimum = 3;
*/
public double getMinimum() {
return minimum_;
}
public static final int MAXIMUM_FIELD_NUMBER = 4;
private double maximum_;
/**
*
* The maximum of the population of values. Ignored if `count` is zero.
*
*
* double maximum = 4;
*/
public double getMaximum() {
return maximum_;
}
public static final int SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER = 5;
private double sumOfSquaredDeviation_;
/**
*
* The sum of squared deviations from the mean:
* Sum[i=1..count]((x_i - mean)^2)
* where each x_i is a sample values. If `count` is zero then this field
* must be zero, otherwise validation of the request fails.
*
*
* double sum_of_squared_deviation = 5;
*/
public double getSumOfSquaredDeviation() {
return sumOfSquaredDeviation_;
}
public static final int BUCKET_COUNTS_FIELD_NUMBER = 6;
private com.google.protobuf.Internal.LongList bucketCounts_;
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public java.util.List
getBucketCountsList() {
return bucketCounts_;
}
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public int getBucketCountsCount() {
return bucketCounts_.size();
}
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public long getBucketCounts(int index) {
return bucketCounts_.getLong(index);
}
private int bucketCountsMemoizedSerializedSize = -1;
public static final int LINEAR_BUCKETS_FIELD_NUMBER = 7;
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public boolean hasLinearBuckets() {
return bucketOptionCase_ == 7;
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public com.google.api.servicecontrol.v1.Distribution.LinearBuckets getLinearBuckets() {
if (bucketOptionCase_ == 7) {
return (com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.LinearBuckets.getDefaultInstance();
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public com.google.api.servicecontrol.v1.Distribution.LinearBucketsOrBuilder getLinearBucketsOrBuilder() {
if (bucketOptionCase_ == 7) {
return (com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.LinearBuckets.getDefaultInstance();
}
public static final int EXPONENTIAL_BUCKETS_FIELD_NUMBER = 8;
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public boolean hasExponentialBuckets() {
return bucketOptionCase_ == 8;
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets getExponentialBuckets() {
if (bucketOptionCase_ == 8) {
return (com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.getDefaultInstance();
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public com.google.api.servicecontrol.v1.Distribution.ExponentialBucketsOrBuilder getExponentialBucketsOrBuilder() {
if (bucketOptionCase_ == 8) {
return (com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.getDefaultInstance();
}
public static final int EXPLICIT_BUCKETS_FIELD_NUMBER = 9;
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public boolean hasExplicitBuckets() {
return bucketOptionCase_ == 9;
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets getExplicitBuckets() {
if (bucketOptionCase_ == 9) {
return (com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.getDefaultInstance();
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public com.google.api.servicecontrol.v1.Distribution.ExplicitBucketsOrBuilder getExplicitBucketsOrBuilder() {
if (bucketOptionCase_ == 9) {
return (com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (count_ != 0L) {
output.writeInt64(1, count_);
}
if (mean_ != 0D) {
output.writeDouble(2, mean_);
}
if (minimum_ != 0D) {
output.writeDouble(3, minimum_);
}
if (maximum_ != 0D) {
output.writeDouble(4, maximum_);
}
if (sumOfSquaredDeviation_ != 0D) {
output.writeDouble(5, sumOfSquaredDeviation_);
}
if (getBucketCountsList().size() > 0) {
output.writeUInt32NoTag(50);
output.writeUInt32NoTag(bucketCountsMemoizedSerializedSize);
}
for (int i = 0; i < bucketCounts_.size(); i++) {
output.writeInt64NoTag(bucketCounts_.getLong(i));
}
if (bucketOptionCase_ == 7) {
output.writeMessage(7, (com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_);
}
if (bucketOptionCase_ == 8) {
output.writeMessage(8, (com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_);
}
if (bucketOptionCase_ == 9) {
output.writeMessage(9, (com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (count_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, count_);
}
if (mean_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, mean_);
}
if (minimum_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, minimum_);
}
if (maximum_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, maximum_);
}
if (sumOfSquaredDeviation_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(5, sumOfSquaredDeviation_);
}
{
int dataSize = 0;
for (int i = 0; i < bucketCounts_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(bucketCounts_.getLong(i));
}
size += dataSize;
if (!getBucketCountsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
bucketCountsMemoizedSerializedSize = dataSize;
}
if (bucketOptionCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_);
}
if (bucketOptionCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_);
}
if (bucketOptionCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, (com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_);
}
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 com.google.api.servicecontrol.v1.Distribution)) {
return super.equals(obj);
}
com.google.api.servicecontrol.v1.Distribution other = (com.google.api.servicecontrol.v1.Distribution) obj;
if (getCount()
!= other.getCount()) return false;
if (java.lang.Double.doubleToLongBits(getMean())
!= java.lang.Double.doubleToLongBits(
other.getMean())) return false;
if (java.lang.Double.doubleToLongBits(getMinimum())
!= java.lang.Double.doubleToLongBits(
other.getMinimum())) return false;
if (java.lang.Double.doubleToLongBits(getMaximum())
!= java.lang.Double.doubleToLongBits(
other.getMaximum())) return false;
if (java.lang.Double.doubleToLongBits(getSumOfSquaredDeviation())
!= java.lang.Double.doubleToLongBits(
other.getSumOfSquaredDeviation())) return false;
if (!getBucketCountsList()
.equals(other.getBucketCountsList())) return false;
if (!getBucketOptionCase().equals(other.getBucketOptionCase())) return false;
switch (bucketOptionCase_) {
case 7:
if (!getLinearBuckets()
.equals(other.getLinearBuckets())) return false;
break;
case 8:
if (!getExponentialBuckets()
.equals(other.getExponentialBuckets())) return false;
break;
case 9:
if (!getExplicitBuckets()
.equals(other.getExplicitBuckets())) return false;
break;
case 0:
default:
}
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();
hash = (37 * hash) + COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCount());
hash = (37 * hash) + MEAN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMean()));
hash = (37 * hash) + MINIMUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMinimum()));
hash = (37 * hash) + MAXIMUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMaximum()));
hash = (37 * hash) + SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getSumOfSquaredDeviation()));
if (getBucketCountsCount() > 0) {
hash = (37 * hash) + BUCKET_COUNTS_FIELD_NUMBER;
hash = (53 * hash) + getBucketCountsList().hashCode();
}
switch (bucketOptionCase_) {
case 7:
hash = (37 * hash) + LINEAR_BUCKETS_FIELD_NUMBER;
hash = (53 * hash) + getLinearBuckets().hashCode();
break;
case 8:
hash = (37 * hash) + EXPONENTIAL_BUCKETS_FIELD_NUMBER;
hash = (53 * hash) + getExponentialBuckets().hashCode();
break;
case 9:
hash = (37 * hash) + EXPLICIT_BUCKETS_FIELD_NUMBER;
hash = (53 * hash) + getExplicitBuckets().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.servicecontrol.v1.Distribution parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.Distribution parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.Distribution parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution 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 com.google.api.servicecontrol.v1.Distribution parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution 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 com.google.api.servicecontrol.v1.Distribution parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.Distribution 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(com.google.api.servicecontrol.v1.Distribution 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;
}
/**
*
* Distribution represents a frequency distribution of double-valued sample
* points. It contains the size of the population of sample points plus
* additional optional information:
* - the arithmetic mean of the samples
* - the minimum and maximum of the samples
* - the sum-squared-deviation of the samples, used to compute variance
* - a histogram of the values of the sample points
*
*
* Protobuf type {@code google.api.servicecontrol.v1.Distribution}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.Distribution)
com.google.api.servicecontrol.v1.DistributionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.Distribution.class, com.google.api.servicecontrol.v1.Distribution.Builder.class);
}
// Construct using com.google.api.servicecontrol.v1.Distribution.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();
count_ = 0L;
mean_ = 0D;
minimum_ = 0D;
maximum_ = 0D;
sumOfSquaredDeviation_ = 0D;
bucketCounts_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000001);
bucketOptionCase_ = 0;
bucketOption_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.servicecontrol.v1.DistributionProto.internal_static_google_api_servicecontrol_v1_Distribution_descriptor;
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution getDefaultInstanceForType() {
return com.google.api.servicecontrol.v1.Distribution.getDefaultInstance();
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution build() {
com.google.api.servicecontrol.v1.Distribution result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.servicecontrol.v1.Distribution buildPartial() {
com.google.api.servicecontrol.v1.Distribution result = new com.google.api.servicecontrol.v1.Distribution(this);
int from_bitField0_ = bitField0_;
result.count_ = count_;
result.mean_ = mean_;
result.minimum_ = minimum_;
result.maximum_ = maximum_;
result.sumOfSquaredDeviation_ = sumOfSquaredDeviation_;
if (((bitField0_ & 0x00000001) != 0)) {
bucketCounts_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.bucketCounts_ = bucketCounts_;
if (bucketOptionCase_ == 7) {
if (linearBucketsBuilder_ == null) {
result.bucketOption_ = bucketOption_;
} else {
result.bucketOption_ = linearBucketsBuilder_.build();
}
}
if (bucketOptionCase_ == 8) {
if (exponentialBucketsBuilder_ == null) {
result.bucketOption_ = bucketOption_;
} else {
result.bucketOption_ = exponentialBucketsBuilder_.build();
}
}
if (bucketOptionCase_ == 9) {
if (explicitBucketsBuilder_ == null) {
result.bucketOption_ = bucketOption_;
} else {
result.bucketOption_ = explicitBucketsBuilder_.build();
}
}
result.bucketOptionCase_ = bucketOptionCase_;
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 com.google.api.servicecontrol.v1.Distribution) {
return mergeFrom((com.google.api.servicecontrol.v1.Distribution)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.servicecontrol.v1.Distribution other) {
if (other == com.google.api.servicecontrol.v1.Distribution.getDefaultInstance()) return this;
if (other.getCount() != 0L) {
setCount(other.getCount());
}
if (other.getMean() != 0D) {
setMean(other.getMean());
}
if (other.getMinimum() != 0D) {
setMinimum(other.getMinimum());
}
if (other.getMaximum() != 0D) {
setMaximum(other.getMaximum());
}
if (other.getSumOfSquaredDeviation() != 0D) {
setSumOfSquaredDeviation(other.getSumOfSquaredDeviation());
}
if (!other.bucketCounts_.isEmpty()) {
if (bucketCounts_.isEmpty()) {
bucketCounts_ = other.bucketCounts_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureBucketCountsIsMutable();
bucketCounts_.addAll(other.bucketCounts_);
}
onChanged();
}
switch (other.getBucketOptionCase()) {
case LINEAR_BUCKETS: {
mergeLinearBuckets(other.getLinearBuckets());
break;
}
case EXPONENTIAL_BUCKETS: {
mergeExponentialBuckets(other.getExponentialBuckets());
break;
}
case EXPLICIT_BUCKETS: {
mergeExplicitBuckets(other.getExplicitBuckets());
break;
}
case BUCKETOPTION_NOT_SET: {
break;
}
}
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 {
com.google.api.servicecontrol.v1.Distribution parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.servicecontrol.v1.Distribution) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bucketOptionCase_ = 0;
private java.lang.Object bucketOption_;
public BucketOptionCase
getBucketOptionCase() {
return BucketOptionCase.forNumber(
bucketOptionCase_);
}
public Builder clearBucketOption() {
bucketOptionCase_ = 0;
bucketOption_ = null;
onChanged();
return this;
}
private int bitField0_;
private long count_ ;
/**
*
* The total number of samples in the distribution. Must be >= 0.
*
*
* int64 count = 1;
*/
public long getCount() {
return count_;
}
/**
*
* The total number of samples in the distribution. Must be >= 0.
*
*
* int64 count = 1;
*/
public Builder setCount(long value) {
count_ = value;
onChanged();
return this;
}
/**
*
* The total number of samples in the distribution. Must be >= 0.
*
*
* int64 count = 1;
*/
public Builder clearCount() {
count_ = 0L;
onChanged();
return this;
}
private double mean_ ;
/**
*
* The arithmetic mean of the samples in the distribution. If `count` is
* zero then this field must be zero.
*
*
* double mean = 2;
*/
public double getMean() {
return mean_;
}
/**
*
* The arithmetic mean of the samples in the distribution. If `count` is
* zero then this field must be zero.
*
*
* double mean = 2;
*/
public Builder setMean(double value) {
mean_ = value;
onChanged();
return this;
}
/**
*
* The arithmetic mean of the samples in the distribution. If `count` is
* zero then this field must be zero.
*
*
* double mean = 2;
*/
public Builder clearMean() {
mean_ = 0D;
onChanged();
return this;
}
private double minimum_ ;
/**
*
* The minimum of the population of values. Ignored if `count` is zero.
*
*
* double minimum = 3;
*/
public double getMinimum() {
return minimum_;
}
/**
*
* The minimum of the population of values. Ignored if `count` is zero.
*
*
* double minimum = 3;
*/
public Builder setMinimum(double value) {
minimum_ = value;
onChanged();
return this;
}
/**
*
* The minimum of the population of values. Ignored if `count` is zero.
*
*
* double minimum = 3;
*/
public Builder clearMinimum() {
minimum_ = 0D;
onChanged();
return this;
}
private double maximum_ ;
/**
*
* The maximum of the population of values. Ignored if `count` is zero.
*
*
* double maximum = 4;
*/
public double getMaximum() {
return maximum_;
}
/**
*
* The maximum of the population of values. Ignored if `count` is zero.
*
*
* double maximum = 4;
*/
public Builder setMaximum(double value) {
maximum_ = value;
onChanged();
return this;
}
/**
*
* The maximum of the population of values. Ignored if `count` is zero.
*
*
* double maximum = 4;
*/
public Builder clearMaximum() {
maximum_ = 0D;
onChanged();
return this;
}
private double sumOfSquaredDeviation_ ;
/**
*
* The sum of squared deviations from the mean:
* Sum[i=1..count]((x_i - mean)^2)
* where each x_i is a sample values. If `count` is zero then this field
* must be zero, otherwise validation of the request fails.
*
*
* double sum_of_squared_deviation = 5;
*/
public double getSumOfSquaredDeviation() {
return sumOfSquaredDeviation_;
}
/**
*
* The sum of squared deviations from the mean:
* Sum[i=1..count]((x_i - mean)^2)
* where each x_i is a sample values. If `count` is zero then this field
* must be zero, otherwise validation of the request fails.
*
*
* double sum_of_squared_deviation = 5;
*/
public Builder setSumOfSquaredDeviation(double value) {
sumOfSquaredDeviation_ = value;
onChanged();
return this;
}
/**
*
* The sum of squared deviations from the mean:
* Sum[i=1..count]((x_i - mean)^2)
* where each x_i is a sample values. If `count` is zero then this field
* must be zero, otherwise validation of the request fails.
*
*
* double sum_of_squared_deviation = 5;
*/
public Builder clearSumOfSquaredDeviation() {
sumOfSquaredDeviation_ = 0D;
onChanged();
return this;
}
private com.google.protobuf.Internal.LongList bucketCounts_ = emptyLongList();
private void ensureBucketCountsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
bucketCounts_ = mutableCopy(bucketCounts_);
bitField0_ |= 0x00000001;
}
}
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public java.util.List
getBucketCountsList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(bucketCounts_) : bucketCounts_;
}
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public int getBucketCountsCount() {
return bucketCounts_.size();
}
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public long getBucketCounts(int index) {
return bucketCounts_.getLong(index);
}
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public Builder setBucketCounts(
int index, long value) {
ensureBucketCountsIsMutable();
bucketCounts_.setLong(index, value);
onChanged();
return this;
}
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public Builder addBucketCounts(long value) {
ensureBucketCountsIsMutable();
bucketCounts_.addLong(value);
onChanged();
return this;
}
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public Builder addAllBucketCounts(
java.lang.Iterable extends java.lang.Long> values) {
ensureBucketCountsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, bucketCounts_);
onChanged();
return this;
}
/**
*
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
* Any suffix of trailing zeros may be omitted.
*
*
* repeated int64 bucket_counts = 6;
*/
public Builder clearBucketCounts() {
bucketCounts_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.servicecontrol.v1.Distribution.LinearBuckets, com.google.api.servicecontrol.v1.Distribution.LinearBuckets.Builder, com.google.api.servicecontrol.v1.Distribution.LinearBucketsOrBuilder> linearBucketsBuilder_;
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public boolean hasLinearBuckets() {
return bucketOptionCase_ == 7;
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public com.google.api.servicecontrol.v1.Distribution.LinearBuckets getLinearBuckets() {
if (linearBucketsBuilder_ == null) {
if (bucketOptionCase_ == 7) {
return (com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.LinearBuckets.getDefaultInstance();
} else {
if (bucketOptionCase_ == 7) {
return linearBucketsBuilder_.getMessage();
}
return com.google.api.servicecontrol.v1.Distribution.LinearBuckets.getDefaultInstance();
}
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public Builder setLinearBuckets(com.google.api.servicecontrol.v1.Distribution.LinearBuckets value) {
if (linearBucketsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
bucketOption_ = value;
onChanged();
} else {
linearBucketsBuilder_.setMessage(value);
}
bucketOptionCase_ = 7;
return this;
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public Builder setLinearBuckets(
com.google.api.servicecontrol.v1.Distribution.LinearBuckets.Builder builderForValue) {
if (linearBucketsBuilder_ == null) {
bucketOption_ = builderForValue.build();
onChanged();
} else {
linearBucketsBuilder_.setMessage(builderForValue.build());
}
bucketOptionCase_ = 7;
return this;
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public Builder mergeLinearBuckets(com.google.api.servicecontrol.v1.Distribution.LinearBuckets value) {
if (linearBucketsBuilder_ == null) {
if (bucketOptionCase_ == 7 &&
bucketOption_ != com.google.api.servicecontrol.v1.Distribution.LinearBuckets.getDefaultInstance()) {
bucketOption_ = com.google.api.servicecontrol.v1.Distribution.LinearBuckets.newBuilder((com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_)
.mergeFrom(value).buildPartial();
} else {
bucketOption_ = value;
}
onChanged();
} else {
if (bucketOptionCase_ == 7) {
linearBucketsBuilder_.mergeFrom(value);
}
linearBucketsBuilder_.setMessage(value);
}
bucketOptionCase_ = 7;
return this;
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public Builder clearLinearBuckets() {
if (linearBucketsBuilder_ == null) {
if (bucketOptionCase_ == 7) {
bucketOptionCase_ = 0;
bucketOption_ = null;
onChanged();
}
} else {
if (bucketOptionCase_ == 7) {
bucketOptionCase_ = 0;
bucketOption_ = null;
}
linearBucketsBuilder_.clear();
}
return this;
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public com.google.api.servicecontrol.v1.Distribution.LinearBuckets.Builder getLinearBucketsBuilder() {
return getLinearBucketsFieldBuilder().getBuilder();
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
public com.google.api.servicecontrol.v1.Distribution.LinearBucketsOrBuilder getLinearBucketsOrBuilder() {
if ((bucketOptionCase_ == 7) && (linearBucketsBuilder_ != null)) {
return linearBucketsBuilder_.getMessageOrBuilder();
} else {
if (bucketOptionCase_ == 7) {
return (com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.LinearBuckets.getDefaultInstance();
}
}
/**
*
* Buckets with constant width.
*
*
* .google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.servicecontrol.v1.Distribution.LinearBuckets, com.google.api.servicecontrol.v1.Distribution.LinearBuckets.Builder, com.google.api.servicecontrol.v1.Distribution.LinearBucketsOrBuilder>
getLinearBucketsFieldBuilder() {
if (linearBucketsBuilder_ == null) {
if (!(bucketOptionCase_ == 7)) {
bucketOption_ = com.google.api.servicecontrol.v1.Distribution.LinearBuckets.getDefaultInstance();
}
linearBucketsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.api.servicecontrol.v1.Distribution.LinearBuckets, com.google.api.servicecontrol.v1.Distribution.LinearBuckets.Builder, com.google.api.servicecontrol.v1.Distribution.LinearBucketsOrBuilder>(
(com.google.api.servicecontrol.v1.Distribution.LinearBuckets) bucketOption_,
getParentForChildren(),
isClean());
bucketOption_ = null;
}
bucketOptionCase_ = 7;
onChanged();;
return linearBucketsBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets, com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.Builder, com.google.api.servicecontrol.v1.Distribution.ExponentialBucketsOrBuilder> exponentialBucketsBuilder_;
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public boolean hasExponentialBuckets() {
return bucketOptionCase_ == 8;
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets getExponentialBuckets() {
if (exponentialBucketsBuilder_ == null) {
if (bucketOptionCase_ == 8) {
return (com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.getDefaultInstance();
} else {
if (bucketOptionCase_ == 8) {
return exponentialBucketsBuilder_.getMessage();
}
return com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.getDefaultInstance();
}
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public Builder setExponentialBuckets(com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets value) {
if (exponentialBucketsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
bucketOption_ = value;
onChanged();
} else {
exponentialBucketsBuilder_.setMessage(value);
}
bucketOptionCase_ = 8;
return this;
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public Builder setExponentialBuckets(
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.Builder builderForValue) {
if (exponentialBucketsBuilder_ == null) {
bucketOption_ = builderForValue.build();
onChanged();
} else {
exponentialBucketsBuilder_.setMessage(builderForValue.build());
}
bucketOptionCase_ = 8;
return this;
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public Builder mergeExponentialBuckets(com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets value) {
if (exponentialBucketsBuilder_ == null) {
if (bucketOptionCase_ == 8 &&
bucketOption_ != com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.getDefaultInstance()) {
bucketOption_ = com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.newBuilder((com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_)
.mergeFrom(value).buildPartial();
} else {
bucketOption_ = value;
}
onChanged();
} else {
if (bucketOptionCase_ == 8) {
exponentialBucketsBuilder_.mergeFrom(value);
}
exponentialBucketsBuilder_.setMessage(value);
}
bucketOptionCase_ = 8;
return this;
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public Builder clearExponentialBuckets() {
if (exponentialBucketsBuilder_ == null) {
if (bucketOptionCase_ == 8) {
bucketOptionCase_ = 0;
bucketOption_ = null;
onChanged();
}
} else {
if (bucketOptionCase_ == 8) {
bucketOptionCase_ = 0;
bucketOption_ = null;
}
exponentialBucketsBuilder_.clear();
}
return this;
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.Builder getExponentialBucketsBuilder() {
return getExponentialBucketsFieldBuilder().getBuilder();
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
public com.google.api.servicecontrol.v1.Distribution.ExponentialBucketsOrBuilder getExponentialBucketsOrBuilder() {
if ((bucketOptionCase_ == 8) && (exponentialBucketsBuilder_ != null)) {
return exponentialBucketsBuilder_.getMessageOrBuilder();
} else {
if (bucketOptionCase_ == 8) {
return (com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.getDefaultInstance();
}
}
/**
*
* Buckets with exponentially growing width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets, com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.Builder, com.google.api.servicecontrol.v1.Distribution.ExponentialBucketsOrBuilder>
getExponentialBucketsFieldBuilder() {
if (exponentialBucketsBuilder_ == null) {
if (!(bucketOptionCase_ == 8)) {
bucketOption_ = com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.getDefaultInstance();
}
exponentialBucketsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets, com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.Builder, com.google.api.servicecontrol.v1.Distribution.ExponentialBucketsOrBuilder>(
(com.google.api.servicecontrol.v1.Distribution.ExponentialBuckets) bucketOption_,
getParentForChildren(),
isClean());
bucketOption_ = null;
}
bucketOptionCase_ = 8;
onChanged();;
return exponentialBucketsBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets, com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.Builder, com.google.api.servicecontrol.v1.Distribution.ExplicitBucketsOrBuilder> explicitBucketsBuilder_;
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public boolean hasExplicitBuckets() {
return bucketOptionCase_ == 9;
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets getExplicitBuckets() {
if (explicitBucketsBuilder_ == null) {
if (bucketOptionCase_ == 9) {
return (com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.getDefaultInstance();
} else {
if (bucketOptionCase_ == 9) {
return explicitBucketsBuilder_.getMessage();
}
return com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.getDefaultInstance();
}
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public Builder setExplicitBuckets(com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets value) {
if (explicitBucketsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
bucketOption_ = value;
onChanged();
} else {
explicitBucketsBuilder_.setMessage(value);
}
bucketOptionCase_ = 9;
return this;
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public Builder setExplicitBuckets(
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.Builder builderForValue) {
if (explicitBucketsBuilder_ == null) {
bucketOption_ = builderForValue.build();
onChanged();
} else {
explicitBucketsBuilder_.setMessage(builderForValue.build());
}
bucketOptionCase_ = 9;
return this;
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public Builder mergeExplicitBuckets(com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets value) {
if (explicitBucketsBuilder_ == null) {
if (bucketOptionCase_ == 9 &&
bucketOption_ != com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.getDefaultInstance()) {
bucketOption_ = com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.newBuilder((com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_)
.mergeFrom(value).buildPartial();
} else {
bucketOption_ = value;
}
onChanged();
} else {
if (bucketOptionCase_ == 9) {
explicitBucketsBuilder_.mergeFrom(value);
}
explicitBucketsBuilder_.setMessage(value);
}
bucketOptionCase_ = 9;
return this;
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public Builder clearExplicitBuckets() {
if (explicitBucketsBuilder_ == null) {
if (bucketOptionCase_ == 9) {
bucketOptionCase_ = 0;
bucketOption_ = null;
onChanged();
}
} else {
if (bucketOptionCase_ == 9) {
bucketOptionCase_ = 0;
bucketOption_ = null;
}
explicitBucketsBuilder_.clear();
}
return this;
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.Builder getExplicitBucketsBuilder() {
return getExplicitBucketsFieldBuilder().getBuilder();
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
public com.google.api.servicecontrol.v1.Distribution.ExplicitBucketsOrBuilder getExplicitBucketsOrBuilder() {
if ((bucketOptionCase_ == 9) && (explicitBucketsBuilder_ != null)) {
return explicitBucketsBuilder_.getMessageOrBuilder();
} else {
if (bucketOptionCase_ == 9) {
return (com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_;
}
return com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.getDefaultInstance();
}
}
/**
*
* Buckets with arbitrary user-provided width.
*
*
* .google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets, com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.Builder, com.google.api.servicecontrol.v1.Distribution.ExplicitBucketsOrBuilder>
getExplicitBucketsFieldBuilder() {
if (explicitBucketsBuilder_ == null) {
if (!(bucketOptionCase_ == 9)) {
bucketOption_ = com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.getDefaultInstance();
}
explicitBucketsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets, com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.Builder, com.google.api.servicecontrol.v1.Distribution.ExplicitBucketsOrBuilder>(
(com.google.api.servicecontrol.v1.Distribution.ExplicitBuckets) bucketOption_,
getParentForChildren(),
isClean());
bucketOption_ = null;
}
bucketOptionCase_ = 9;
onChanged();;
return explicitBucketsBuilder_;
}
@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:google.api.servicecontrol.v1.Distribution)
}
// @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.Distribution)
private static final com.google.api.servicecontrol.v1.Distribution DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.Distribution();
}
public static com.google.api.servicecontrol.v1.Distribution getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Distribution parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Distribution(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 com.google.api.servicecontrol.v1.Distribution getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy