Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/distribution.proto
package com.google.api;
/**
*
* Distribution contains summary statistics for a population of values and,
* optionally, a histogram representing the distribution of those values across
* a specified set of histogram buckets.
* The summary statistics are the count, mean, sum of the squared deviation from
* the mean, the minimum, and the maximum of the set of population of values.
* The histogram is based on a sequence of buckets and gives a count of values
* that fall into each bucket. The boundaries of the buckets are given either
* explicitly or by specifying parameters for a method of computing them
* (buckets of fixed width or buckets of exponentially increasing width).
* Although it is not forbidden, it is generally a bad idea to include
* non-finite values (infinities or NaNs) in the population of values, as this
* will render the `mean` and `sum_of_squared_deviation` fields meaningless.
*
*
* Protobuf type {@code google.api.Distribution}
*/
public final class Distribution extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.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() {
count_ = 0L;
mean_ = 0D;
sumOfSquaredDeviation_ = 0D;
bucketCounts_ = java.util.Collections.emptyList();
}
@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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
count_ = input.readInt64();
break;
}
case 17: {
mean_ = input.readDouble();
break;
}
case 25: {
sumOfSquaredDeviation_ = input.readDouble();
break;
}
case 34: {
com.google.api.Distribution.Range.Builder subBuilder = null;
if (range_ != null) {
subBuilder = range_.toBuilder();
}
range_ = input.readMessage(com.google.api.Distribution.Range.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(range_);
range_ = subBuilder.buildPartial();
}
break;
}
case 50: {
com.google.api.Distribution.BucketOptions.Builder subBuilder = null;
if (bucketOptions_ != null) {
subBuilder = bucketOptions_.toBuilder();
}
bucketOptions_ = input.readMessage(com.google.api.Distribution.BucketOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(bucketOptions_);
bucketOptions_ = subBuilder.buildPartial();
}
break;
}
case 56: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
bucketCounts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
bucketCounts_.add(input.readInt64());
break;
}
case 58: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
bucketCounts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
while (input.getBytesUntilLimit() > 0) {
bucketCounts_.add(input.readInt64());
}
input.popLimit(limit);
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_ & 0x00000020) == 0x00000020)) {
bucketCounts_ = java.util.Collections.unmodifiableList(bucketCounts_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.class, com.google.api.Distribution.Builder.class);
}
public interface RangeOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.api.Distribution.Range)
com.google.protobuf.MessageOrBuilder {
/**
*
* The minimum of the population values.
*
*
* double min = 1;
*/
double getMin();
/**
*
* The maximum of the population values.
*
*
* double max = 2;
*/
double getMax();
}
/**
*
* The range of the population values.
*
*
* Protobuf type {@code google.api.Distribution.Range}
*/
public static final class Range extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.Distribution.Range)
RangeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Range.newBuilder() to construct.
private Range(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Range() {
min_ = 0D;
max_ = 0D;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Range(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 9: {
min_ = input.readDouble();
break;
}
case 17: {
max_ = input.readDouble();
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.DistributionProto.internal_static_google_api_Distribution_Range_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_Range_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.Range.class, com.google.api.Distribution.Range.Builder.class);
}
public static final int MIN_FIELD_NUMBER = 1;
private double min_;
/**
*
* The minimum of the population values.
*
*
* double min = 1;
*/
public double getMin() {
return min_;
}
public static final int MAX_FIELD_NUMBER = 2;
private double max_;
/**
*
* The maximum of the population values.
*
*
* double max = 2;
*/
public double getMax() {
return max_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (min_ != 0D) {
output.writeDouble(1, min_);
}
if (max_ != 0D) {
output.writeDouble(2, max_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (min_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, min_);
}
if (max_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, max_);
}
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.Distribution.Range)) {
return super.equals(obj);
}
com.google.api.Distribution.Range other = (com.google.api.Distribution.Range) obj;
boolean result = true;
result = result && (
java.lang.Double.doubleToLongBits(getMin())
== java.lang.Double.doubleToLongBits(
other.getMin()));
result = result && (
java.lang.Double.doubleToLongBits(getMax())
== java.lang.Double.doubleToLongBits(
other.getMax()));
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + MIN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMin()));
hash = (37 * hash) + MAX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMax()));
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.Distribution.Range parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.Range 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.Distribution.Range parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.Range 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.Distribution.Range parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.Range parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.Distribution.Range parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.Range 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.Distribution.Range parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.Distribution.Range 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.Distribution.Range parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.Range parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.Distribution.Range prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The range of the population values.
*
*
* Protobuf type {@code google.api.Distribution.Range}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.Distribution.Range)
com.google.api.Distribution.RangeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_Range_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_Range_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.Range.class, com.google.api.Distribution.Range.Builder.class);
}
// Construct using com.google.api.Distribution.Range.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
min_ = 0D;
max_ = 0D;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_Range_descriptor;
}
public com.google.api.Distribution.Range getDefaultInstanceForType() {
return com.google.api.Distribution.Range.getDefaultInstance();
}
public com.google.api.Distribution.Range build() {
com.google.api.Distribution.Range result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.Distribution.Range buildPartial() {
com.google.api.Distribution.Range result = new com.google.api.Distribution.Range(this);
result.min_ = min_;
result.max_ = max_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.Distribution.Range) {
return mergeFrom((com.google.api.Distribution.Range)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.Distribution.Range other) {
if (other == com.google.api.Distribution.Range.getDefaultInstance()) return this;
if (other.getMin() != 0D) {
setMin(other.getMin());
}
if (other.getMax() != 0D) {
setMax(other.getMax());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.Distribution.Range parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.Distribution.Range) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private double min_ ;
/**
*
* The minimum of the population values.
*
*
* double min = 1;
*/
public double getMin() {
return min_;
}
/**
*
* A Distribution may optionally contain a histogram of the values in the
* population. The histogram is given in `bucket_counts` as counts of values
* that fall into one of a sequence of non-overlapping buckets. The sequence
* of buckets is described by `bucket_options`.
* A bucket specifies an inclusive lower bound and exclusive upper bound for
* the values that are counted for that bucket. The upper bound of a bucket
* is strictly greater than the lower bound.
* The sequence of N buckets for a Distribution consists of an underflow
* bucket (number 0), zero or more finite buckets (number 1 through N - 2) and
* an overflow bucket (number N - 1). The buckets are contiguous: the lower
* bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1.
* The buckets span the whole range of finite values: lower bound of the
* underflow bucket is -infinity and the upper bound of the overflow bucket is
* +infinity. The finite buckets are so-called because both bounds are
* finite.
* `BucketOptions` describes bucket boundaries in one of three ways. Two
* describe the boundaries by giving parameters for a formula to generate
* boundaries and one gives the bucket boundaries explicitly.
* If `bucket_boundaries` is not given, then no `bucket_counts` may be given.
*
*
* Protobuf type {@code google.api.Distribution.BucketOptions}
*/
public static final class BucketOptions extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions)
BucketOptionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use BucketOptions.newBuilder() to construct.
private BucketOptions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BucketOptions() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BucketOptions(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.google.api.Distribution.BucketOptions.Linear.Builder subBuilder = null;
if (optionsCase_ == 1) {
subBuilder = ((com.google.api.Distribution.BucketOptions.Linear) options_).toBuilder();
}
options_ =
input.readMessage(com.google.api.Distribution.BucketOptions.Linear.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.api.Distribution.BucketOptions.Linear) options_);
options_ = subBuilder.buildPartial();
}
optionsCase_ = 1;
break;
}
case 18: {
com.google.api.Distribution.BucketOptions.Exponential.Builder subBuilder = null;
if (optionsCase_ == 2) {
subBuilder = ((com.google.api.Distribution.BucketOptions.Exponential) options_).toBuilder();
}
options_ =
input.readMessage(com.google.api.Distribution.BucketOptions.Exponential.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.api.Distribution.BucketOptions.Exponential) options_);
options_ = subBuilder.buildPartial();
}
optionsCase_ = 2;
break;
}
case 26: {
com.google.api.Distribution.BucketOptions.Explicit.Builder subBuilder = null;
if (optionsCase_ == 3) {
subBuilder = ((com.google.api.Distribution.BucketOptions.Explicit) options_).toBuilder();
}
options_ =
input.readMessage(com.google.api.Distribution.BucketOptions.Explicit.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.api.Distribution.BucketOptions.Explicit) options_);
options_ = subBuilder.buildPartial();
}
optionsCase_ = 3;
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.DistributionProto.internal_static_google_api_Distribution_BucketOptions_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.BucketOptions.class, com.google.api.Distribution.BucketOptions.Builder.class);
}
public interface LinearOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.api.Distribution.BucketOptions.Linear)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specify a sequence of buckets that all have the same width (except
* overflow and underflow). Each bucket represents a constant absolute
* uncertainty on the specific value in the bucket.
* Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for
* bucket `i`:
* Upper bound (0 <= i < N-1): offset + (width * i).
* Lower bound (1 <= i < N): offset + (width * (i - 1)).
*
*
* Protobuf type {@code google.api.Distribution.BucketOptions.Linear}
*/
public static final class Linear extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions.Linear)
LinearOrBuilder {
private static final long serialVersionUID = 0L;
// Use Linear.newBuilder() to construct.
private Linear(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Linear() {
numFiniteBuckets_ = 0;
width_ = 0D;
offset_ = 0D;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Linear(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
numFiniteBuckets_ = input.readInt32();
break;
}
case 17: {
width_ = input.readDouble();
break;
}
case 25: {
offset_ = input.readDouble();
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.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Linear_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Linear_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.BucketOptions.Linear.class, com.google.api.Distribution.BucketOptions.Linear.Builder.class);
}
public static final int NUM_FINITE_BUCKETS_FIELD_NUMBER = 1;
private int numFiniteBuckets_;
/**
*
* Must be greater than 0.
*
*
* int32 num_finite_buckets = 1;
*/
public int getNumFiniteBuckets() {
return numFiniteBuckets_;
}
public static final int WIDTH_FIELD_NUMBER = 2;
private double width_;
/**
*
* Must be greater than 0.
*
*
* double width = 2;
*/
public double getWidth() {
return width_;
}
public static final int OFFSET_FIELD_NUMBER = 3;
private double offset_;
/**
*
* Lower bound of the first bucket.
*
*
* double offset = 3;
*/
public double getOffset() {
return offset_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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);
}
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.Distribution.BucketOptions.Linear)) {
return super.equals(obj);
}
com.google.api.Distribution.BucketOptions.Linear other = (com.google.api.Distribution.BucketOptions.Linear) obj;
boolean result = true;
result = result && (getNumFiniteBuckets()
== other.getNumFiniteBuckets());
result = result && (
java.lang.Double.doubleToLongBits(getWidth())
== java.lang.Double.doubleToLongBits(
other.getWidth()));
result = result && (
java.lang.Double.doubleToLongBits(getOffset())
== java.lang.Double.doubleToLongBits(
other.getOffset()));
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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.Distribution.BucketOptions.Linear parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions.Linear 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.Distribution.BucketOptions.Linear parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions.Linear 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.Distribution.BucketOptions.Linear parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.Distribution.BucketOptions.Linear parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions.Linear 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.Distribution.BucketOptions.Linear parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions.Linear 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.Distribution.BucketOptions.Linear parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions.Linear parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.Distribution.BucketOptions.Linear prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Specify a sequence of buckets that all have the same width (except
* overflow and underflow). Each bucket represents a constant absolute
* uncertainty on the specific value in the bucket.
* Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for
* bucket `i`:
* Upper bound (0 <= i < N-1): offset + (width * i).
* Lower bound (1 <= i < N): offset + (width * (i - 1)).
*
*
* Protobuf type {@code google.api.Distribution.BucketOptions.Linear}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions.Linear)
com.google.api.Distribution.BucketOptions.LinearOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Linear_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Linear_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.BucketOptions.Linear.class, com.google.api.Distribution.BucketOptions.Linear.Builder.class);
}
// Construct using com.google.api.Distribution.BucketOptions.Linear.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
numFiniteBuckets_ = 0;
width_ = 0D;
offset_ = 0D;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Linear_descriptor;
}
public com.google.api.Distribution.BucketOptions.Linear getDefaultInstanceForType() {
return com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance();
}
public com.google.api.Distribution.BucketOptions.Linear build() {
com.google.api.Distribution.BucketOptions.Linear result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.Distribution.BucketOptions.Linear buildPartial() {
com.google.api.Distribution.BucketOptions.Linear result = new com.google.api.Distribution.BucketOptions.Linear(this);
result.numFiniteBuckets_ = numFiniteBuckets_;
result.width_ = width_;
result.offset_ = offset_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.Distribution.BucketOptions.Linear) {
return mergeFrom((com.google.api.Distribution.BucketOptions.Linear)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.Distribution.BucketOptions.Linear other) {
if (other == com.google.api.Distribution.BucketOptions.Linear.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;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.Distribution.BucketOptions.Linear parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.Distribution.BucketOptions.Linear) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int numFiniteBuckets_ ;
/**
*
* Must be greater than 0.
*
*
* int32 num_finite_buckets = 1;
*/
public int getNumFiniteBuckets() {
return numFiniteBuckets_;
}
/**
*
* Specify a sequence of buckets that have a width that is proportional to
* the value of the lower bound. Each bucket represents a constant relative
* uncertainty on a specific value in the bucket.
* Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for
* bucket i:
* Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).
* Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).
*
*
* Protobuf type {@code google.api.Distribution.BucketOptions.Exponential}
*/
public static final class Exponential extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions.Exponential)
ExponentialOrBuilder {
private static final long serialVersionUID = 0L;
// Use Exponential.newBuilder() to construct.
private Exponential(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Exponential() {
numFiniteBuckets_ = 0;
growthFactor_ = 0D;
scale_ = 0D;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Exponential(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
numFiniteBuckets_ = input.readInt32();
break;
}
case 17: {
growthFactor_ = input.readDouble();
break;
}
case 25: {
scale_ = input.readDouble();
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.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Exponential_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Exponential_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.BucketOptions.Exponential.class, com.google.api.Distribution.BucketOptions.Exponential.Builder.class);
}
public static final int NUM_FINITE_BUCKETS_FIELD_NUMBER = 1;
private int numFiniteBuckets_;
/**
*
* Must be greater than 0.
*
*
* int32 num_finite_buckets = 1;
*/
public int getNumFiniteBuckets() {
return numFiniteBuckets_;
}
public static final int GROWTH_FACTOR_FIELD_NUMBER = 2;
private double growthFactor_;
/**
*
* Must be greater than 1.
*
*
* double growth_factor = 2;
*/
public double getGrowthFactor() {
return growthFactor_;
}
public static final int SCALE_FIELD_NUMBER = 3;
private double scale_;
/**
*
* Must be greater than 0.
*
*
* double scale = 3;
*/
public double getScale() {
return scale_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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);
}
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.Distribution.BucketOptions.Exponential)) {
return super.equals(obj);
}
com.google.api.Distribution.BucketOptions.Exponential other = (com.google.api.Distribution.BucketOptions.Exponential) obj;
boolean result = true;
result = result && (getNumFiniteBuckets()
== other.getNumFiniteBuckets());
result = result && (
java.lang.Double.doubleToLongBits(getGrowthFactor())
== java.lang.Double.doubleToLongBits(
other.getGrowthFactor()));
result = result && (
java.lang.Double.doubleToLongBits(getScale())
== java.lang.Double.doubleToLongBits(
other.getScale()));
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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.Distribution.BucketOptions.Exponential parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions.Exponential 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.Distribution.BucketOptions.Exponential parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions.Exponential 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.Distribution.BucketOptions.Exponential parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions.Exponential 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.Distribution.BucketOptions.Exponential parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions.Exponential 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.Distribution.BucketOptions.Exponential parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions.Exponential parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.Distribution.BucketOptions.Exponential prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Specify a sequence of buckets that have a width that is proportional to
* the value of the lower bound. Each bucket represents a constant relative
* uncertainty on a specific value in the bucket.
* Defines `num_finite_buckets + 2` (= N) buckets with these boundaries for
* bucket i:
* Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).
* Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).
*
*
* Protobuf type {@code google.api.Distribution.BucketOptions.Exponential}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions.Exponential)
com.google.api.Distribution.BucketOptions.ExponentialOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Exponential_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Exponential_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.BucketOptions.Exponential.class, com.google.api.Distribution.BucketOptions.Exponential.Builder.class);
}
// Construct using com.google.api.Distribution.BucketOptions.Exponential.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
numFiniteBuckets_ = 0;
growthFactor_ = 0D;
scale_ = 0D;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Exponential_descriptor;
}
public com.google.api.Distribution.BucketOptions.Exponential getDefaultInstanceForType() {
return com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance();
}
public com.google.api.Distribution.BucketOptions.Exponential build() {
com.google.api.Distribution.BucketOptions.Exponential result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.Distribution.BucketOptions.Exponential buildPartial() {
com.google.api.Distribution.BucketOptions.Exponential result = new com.google.api.Distribution.BucketOptions.Exponential(this);
result.numFiniteBuckets_ = numFiniteBuckets_;
result.growthFactor_ = growthFactor_;
result.scale_ = scale_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.Distribution.BucketOptions.Exponential) {
return mergeFrom((com.google.api.Distribution.BucketOptions.Exponential)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.Distribution.BucketOptions.Exponential other) {
if (other == com.google.api.Distribution.BucketOptions.Exponential.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;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.Distribution.BucketOptions.Exponential parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.Distribution.BucketOptions.Exponential) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int numFiniteBuckets_ ;
/**
*
* Must be greater than 0.
*
*
* int32 num_finite_buckets = 1;
*/
public int getNumFiniteBuckets() {
return numFiniteBuckets_;
}
/**
*
* A set of buckets with arbitrary widths.
* Defines `size(bounds) + 1` (= N) buckets with these boundaries for
* bucket i:
* Upper bound (0 <= i < N-1): bounds[i]
* Lower bound (1 <= i < N); bounds[i - 1]
* There must be at least one element in `bounds`. If `bounds` has only one
* element, there are no finite buckets, and that single element is the
* common boundary of the overflow and underflow buckets.
*
*
* Protobuf type {@code google.api.Distribution.BucketOptions.Explicit}
*/
public static final class Explicit extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions.Explicit)
ExplicitOrBuilder {
private static final long serialVersionUID = 0L;
// Use Explicit.newBuilder() to construct.
private Explicit(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Explicit() {
bounds_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Explicit(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 9: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
bounds_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
bounds_.add(input.readDouble());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
bounds_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
bounds_.add(input.readDouble());
}
input.popLimit(limit);
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) == 0x00000001)) {
bounds_ = java.util.Collections.unmodifiableList(bounds_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Explicit_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Explicit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.BucketOptions.Explicit.class, com.google.api.Distribution.BucketOptions.Explicit.Builder.class);
}
public static final int BOUNDS_FIELD_NUMBER = 1;
private java.util.List bounds_;
/**
*
*
* repeated double bounds = 1;
*/
public int getBoundsCount() {
return bounds_.size();
}
/**
*
* The values must be monotonically increasing.
*
*
* repeated double bounds = 1;
*/
public double getBounds(int index) {
return bounds_.get(index);
}
private int boundsMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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_.get(i));
}
unknownFields.writeTo(output);
}
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.Distribution.BucketOptions.Explicit)) {
return super.equals(obj);
}
com.google.api.Distribution.BucketOptions.Explicit other = (com.google.api.Distribution.BucketOptions.Explicit) obj;
boolean result = true;
result = result && getBoundsList()
.equals(other.getBoundsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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.Distribution.BucketOptions.Explicit parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions.Explicit 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.Distribution.BucketOptions.Explicit parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions.Explicit 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.Distribution.BucketOptions.Explicit parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions.Explicit 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.Distribution.BucketOptions.Explicit parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions.Explicit 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.Distribution.BucketOptions.Explicit parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions.Explicit parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.Distribution.BucketOptions.Explicit prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* A set of buckets with arbitrary widths.
* Defines `size(bounds) + 1` (= N) buckets with these boundaries for
* bucket i:
* Upper bound (0 <= i < N-1): bounds[i]
* Lower bound (1 <= i < N); bounds[i - 1]
* There must be at least one element in `bounds`. If `bounds` has only one
* element, there are no finite buckets, and that single element is the
* common boundary of the overflow and underflow buckets.
*
*
* Protobuf type {@code google.api.Distribution.BucketOptions.Explicit}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions.Explicit)
com.google.api.Distribution.BucketOptions.ExplicitOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Explicit_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Explicit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.BucketOptions.Explicit.class, com.google.api.Distribution.BucketOptions.Explicit.Builder.class);
}
// Construct using com.google.api.Distribution.BucketOptions.Explicit.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
bounds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_Explicit_descriptor;
}
public com.google.api.Distribution.BucketOptions.Explicit getDefaultInstanceForType() {
return com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance();
}
public com.google.api.Distribution.BucketOptions.Explicit build() {
com.google.api.Distribution.BucketOptions.Explicit result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.Distribution.BucketOptions.Explicit buildPartial() {
com.google.api.Distribution.BucketOptions.Explicit result = new com.google.api.Distribution.BucketOptions.Explicit(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
bounds_ = java.util.Collections.unmodifiableList(bounds_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.bounds_ = bounds_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.Distribution.BucketOptions.Explicit) {
return mergeFrom((com.google.api.Distribution.BucketOptions.Explicit)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.Distribution.BucketOptions.Explicit other) {
if (other == com.google.api.Distribution.BucketOptions.Explicit.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;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.Distribution.BucketOptions.Explicit parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.Distribution.BucketOptions.Explicit) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List bounds_ = java.util.Collections.emptyList();
private void ensureBoundsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
bounds_ = new java.util.ArrayList(bounds_);
bitField0_ |= 0x00000001;
}
}
/**
*
*
* .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;
*/
public com.google.api.Distribution.BucketOptions.ExplicitOrBuilder getExplicitBucketsOrBuilder() {
if (optionsCase_ == 3) {
return (com.google.api.Distribution.BucketOptions.Explicit) options_;
}
return com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (optionsCase_ == 1) {
output.writeMessage(1, (com.google.api.Distribution.BucketOptions.Linear) options_);
}
if (optionsCase_ == 2) {
output.writeMessage(2, (com.google.api.Distribution.BucketOptions.Exponential) options_);
}
if (optionsCase_ == 3) {
output.writeMessage(3, (com.google.api.Distribution.BucketOptions.Explicit) options_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (optionsCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.google.api.Distribution.BucketOptions.Linear) options_);
}
if (optionsCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.google.api.Distribution.BucketOptions.Exponential) options_);
}
if (optionsCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.google.api.Distribution.BucketOptions.Explicit) options_);
}
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.Distribution.BucketOptions)) {
return super.equals(obj);
}
com.google.api.Distribution.BucketOptions other = (com.google.api.Distribution.BucketOptions) obj;
boolean result = true;
result = result && getOptionsCase().equals(
other.getOptionsCase());
if (!result) return false;
switch (optionsCase_) {
case 1:
result = result && getLinearBuckets()
.equals(other.getLinearBuckets());
break;
case 2:
result = result && getExponentialBuckets()
.equals(other.getExponentialBuckets());
break;
case 3:
result = result && getExplicitBuckets()
.equals(other.getExplicitBuckets());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (optionsCase_) {
case 1:
hash = (37 * hash) + LINEAR_BUCKETS_FIELD_NUMBER;
hash = (53 * hash) + getLinearBuckets().hashCode();
break;
case 2:
hash = (37 * hash) + EXPONENTIAL_BUCKETS_FIELD_NUMBER;
hash = (53 * hash) + getExponentialBuckets().hashCode();
break;
case 3:
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.Distribution.BucketOptions parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions 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.Distribution.BucketOptions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions 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.Distribution.BucketOptions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution.BucketOptions parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.Distribution.BucketOptions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions 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.Distribution.BucketOptions parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions 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.Distribution.BucketOptions parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.Distribution.BucketOptions parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.Distribution.BucketOptions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* A Distribution may optionally contain a histogram of the values in the
* population. The histogram is given in `bucket_counts` as counts of values
* that fall into one of a sequence of non-overlapping buckets. The sequence
* of buckets is described by `bucket_options`.
* A bucket specifies an inclusive lower bound and exclusive upper bound for
* the values that are counted for that bucket. The upper bound of a bucket
* is strictly greater than the lower bound.
* The sequence of N buckets for a Distribution consists of an underflow
* bucket (number 0), zero or more finite buckets (number 1 through N - 2) and
* an overflow bucket (number N - 1). The buckets are contiguous: the lower
* bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1.
* The buckets span the whole range of finite values: lower bound of the
* underflow bucket is -infinity and the upper bound of the overflow bucket is
* +infinity. The finite buckets are so-called because both bounds are
* finite.
* `BucketOptions` describes bucket boundaries in one of three ways. Two
* describe the boundaries by giving parameters for a formula to generate
* boundaries and one gives the bucket boundaries explicitly.
* If `bucket_boundaries` is not given, then no `bucket_counts` may be given.
*
*
* Protobuf type {@code google.api.Distribution.BucketOptions}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions)
com.google.api.Distribution.BucketOptionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.BucketOptions.class, com.google.api.Distribution.BucketOptions.Builder.class);
}
// Construct using com.google.api.Distribution.BucketOptions.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
optionsCase_ = 0;
options_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_BucketOptions_descriptor;
}
public com.google.api.Distribution.BucketOptions getDefaultInstanceForType() {
return com.google.api.Distribution.BucketOptions.getDefaultInstance();
}
public com.google.api.Distribution.BucketOptions build() {
com.google.api.Distribution.BucketOptions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.Distribution.BucketOptions buildPartial() {
com.google.api.Distribution.BucketOptions result = new com.google.api.Distribution.BucketOptions(this);
if (optionsCase_ == 1) {
if (linearBucketsBuilder_ == null) {
result.options_ = options_;
} else {
result.options_ = linearBucketsBuilder_.build();
}
}
if (optionsCase_ == 2) {
if (exponentialBucketsBuilder_ == null) {
result.options_ = options_;
} else {
result.options_ = exponentialBucketsBuilder_.build();
}
}
if (optionsCase_ == 3) {
if (explicitBucketsBuilder_ == null) {
result.options_ = options_;
} else {
result.options_ = explicitBucketsBuilder_.build();
}
}
result.optionsCase_ = optionsCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.Distribution.BucketOptions) {
return mergeFrom((com.google.api.Distribution.BucketOptions)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.Distribution.BucketOptions other) {
if (other == com.google.api.Distribution.BucketOptions.getDefaultInstance()) return this;
switch (other.getOptionsCase()) {
case LINEAR_BUCKETS: {
mergeLinearBuckets(other.getLinearBuckets());
break;
}
case EXPONENTIAL_BUCKETS: {
mergeExponentialBuckets(other.getExponentialBuckets());
break;
}
case EXPLICIT_BUCKETS: {
mergeExplicitBuckets(other.getExplicitBuckets());
break;
}
case OPTIONS_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.Distribution.BucketOptions parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.Distribution.BucketOptions) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int optionsCase_ = 0;
private java.lang.Object options_;
public OptionsCase
getOptionsCase() {
return OptionsCase.forNumber(
optionsCase_);
}
public Builder clearOptions() {
optionsCase_ = 0;
options_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.Distribution.BucketOptions.Linear, com.google.api.Distribution.BucketOptions.Linear.Builder, com.google.api.Distribution.BucketOptions.LinearOrBuilder> linearBucketsBuilder_;
/**
*
*
* .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.api.Distribution.BucketOptions.Explicit, com.google.api.Distribution.BucketOptions.Explicit.Builder, com.google.api.Distribution.BucketOptions.ExplicitOrBuilder>
getExplicitBucketsFieldBuilder() {
if (explicitBucketsBuilder_ == null) {
if (!(optionsCase_ == 3)) {
options_ = com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance();
}
explicitBucketsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.api.Distribution.BucketOptions.Explicit, com.google.api.Distribution.BucketOptions.Explicit.Builder, com.google.api.Distribution.BucketOptions.ExplicitOrBuilder>(
(com.google.api.Distribution.BucketOptions.Explicit) options_,
getParentForChildren(),
isClean());
options_ = null;
}
optionsCase_ = 3;
onChanged();;
return explicitBucketsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.api.Distribution.BucketOptions)
}
// @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions)
private static final com.google.api.Distribution.BucketOptions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.Distribution.BucketOptions();
}
public static com.google.api.Distribution.BucketOptions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public BucketOptions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BucketOptions(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.api.Distribution.BucketOptions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int COUNT_FIELD_NUMBER = 1;
private long count_;
/**
*
* The number of values in the population. Must be non-negative.
*
*
* int64 count = 1;
*/
public long getCount() {
return count_;
}
public static final int MEAN_FIELD_NUMBER = 2;
private double mean_;
/**
*
* The arithmetic mean of the values in the population. If `count` is zero
* then this field must be zero.
*
*
* double mean = 2;
*/
public double getMean() {
return mean_;
}
public static final int SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER = 3;
private double sumOfSquaredDeviation_;
/**
*
* The sum of squared deviations from the mean of the values in the
* population. For values x_i this is:
* Sum[i=1..n]((x_i - mean)^2)
* Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
* describes Welford's method for accumulating this sum in one pass.
* If `count` is zero then this field must be zero.
*
*
* double sum_of_squared_deviation = 3;
*/
public double getSumOfSquaredDeviation() {
return sumOfSquaredDeviation_;
}
public static final int RANGE_FIELD_NUMBER = 4;
private com.google.api.Distribution.Range range_;
/**
*
* If specified, contains the range of the population values. The field
* must not be present if the `count` is zero.
*
*
* .google.api.Distribution.Range range = 4;
*/
public boolean hasRange() {
return range_ != null;
}
/**
*
* If specified, contains the range of the population values. The field
* must not be present if the `count` is zero.
*
*
* .google.api.Distribution.BucketOptions bucket_options = 6;
*/
public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuilder() {
return getBucketOptions();
}
public static final int BUCKET_COUNTS_FIELD_NUMBER = 7;
private java.util.List bucketCounts_;
/**
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
*
* repeated int64 bucket_counts = 7;
*/
public int getBucketCountsCount() {
return bucketCounts_.size();
}
/**
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
*
* repeated int64 bucket_counts = 7;
*/
public long getBucketCounts(int index) {
return bucketCounts_.get(index);
}
private int bucketCountsMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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 (sumOfSquaredDeviation_ != 0D) {
output.writeDouble(3, sumOfSquaredDeviation_);
}
if (range_ != null) {
output.writeMessage(4, getRange());
}
if (bucketOptions_ != null) {
output.writeMessage(6, getBucketOptions());
}
if (getBucketCountsList().size() > 0) {
output.writeUInt32NoTag(58);
output.writeUInt32NoTag(bucketCountsMemoizedSerializedSize);
}
for (int i = 0; i < bucketCounts_.size(); i++) {
output.writeInt64NoTag(bucketCounts_.get(i));
}
unknownFields.writeTo(output);
}
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 (sumOfSquaredDeviation_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, sumOfSquaredDeviation_);
}
if (range_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getRange());
}
if (bucketOptions_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getBucketOptions());
}
{
int dataSize = 0;
for (int i = 0; i < bucketCounts_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(bucketCounts_.get(i));
}
size += dataSize;
if (!getBucketCountsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
bucketCountsMemoizedSerializedSize = 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.Distribution)) {
return super.equals(obj);
}
com.google.api.Distribution other = (com.google.api.Distribution) obj;
boolean result = true;
result = result && (getCount()
== other.getCount());
result = result && (
java.lang.Double.doubleToLongBits(getMean())
== java.lang.Double.doubleToLongBits(
other.getMean()));
result = result && (
java.lang.Double.doubleToLongBits(getSumOfSquaredDeviation())
== java.lang.Double.doubleToLongBits(
other.getSumOfSquaredDeviation()));
result = result && (hasRange() == other.hasRange());
if (hasRange()) {
result = result && getRange()
.equals(other.getRange());
}
result = result && (hasBucketOptions() == other.hasBucketOptions());
if (hasBucketOptions()) {
result = result && getBucketOptions()
.equals(other.getBucketOptions());
}
result = result && getBucketCountsList()
.equals(other.getBucketCountsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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) + SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getSumOfSquaredDeviation()));
if (hasRange()) {
hash = (37 * hash) + RANGE_FIELD_NUMBER;
hash = (53 * hash) + getRange().hashCode();
}
if (hasBucketOptions()) {
hash = (37 * hash) + BUCKET_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getBucketOptions().hashCode();
}
if (getBucketCountsCount() > 0) {
hash = (37 * hash) + BUCKET_COUNTS_FIELD_NUMBER;
hash = (53 * hash) + getBucketCountsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.Distribution parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.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.Distribution parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.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.Distribution parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.Distribution parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.Distribution parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.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.Distribution parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.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.Distribution parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.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);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.Distribution prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 contains summary statistics for a population of values and,
* optionally, a histogram representing the distribution of those values across
* a specified set of histogram buckets.
* The summary statistics are the count, mean, sum of the squared deviation from
* the mean, the minimum, and the maximum of the set of population of values.
* The histogram is based on a sequence of buckets and gives a count of values
* that fall into each bucket. The boundaries of the buckets are given either
* explicitly or by specifying parameters for a method of computing them
* (buckets of fixed width or buckets of exponentially increasing width).
* Although it is not forbidden, it is generally a bad idea to include
* non-finite values (infinities or NaNs) in the population of values, as this
* will render the `mean` and `sum_of_squared_deviation` fields meaningless.
*
*
* Protobuf type {@code google.api.Distribution}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.Distribution)
com.google.api.DistributionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.Distribution.class, com.google.api.Distribution.Builder.class);
}
// Construct using com.google.api.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) {
}
}
public Builder clear() {
super.clear();
count_ = 0L;
mean_ = 0D;
sumOfSquaredDeviation_ = 0D;
if (rangeBuilder_ == null) {
range_ = null;
} else {
range_ = null;
rangeBuilder_ = null;
}
if (bucketOptionsBuilder_ == null) {
bucketOptions_ = null;
} else {
bucketOptions_ = null;
bucketOptionsBuilder_ = null;
}
bucketCounts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.DistributionProto.internal_static_google_api_Distribution_descriptor;
}
public com.google.api.Distribution getDefaultInstanceForType() {
return com.google.api.Distribution.getDefaultInstance();
}
public com.google.api.Distribution build() {
com.google.api.Distribution result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.Distribution buildPartial() {
com.google.api.Distribution result = new com.google.api.Distribution(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.count_ = count_;
result.mean_ = mean_;
result.sumOfSquaredDeviation_ = sumOfSquaredDeviation_;
if (rangeBuilder_ == null) {
result.range_ = range_;
} else {
result.range_ = rangeBuilder_.build();
}
if (bucketOptionsBuilder_ == null) {
result.bucketOptions_ = bucketOptions_;
} else {
result.bucketOptions_ = bucketOptionsBuilder_.build();
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
bucketCounts_ = java.util.Collections.unmodifiableList(bucketCounts_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.bucketCounts_ = bucketCounts_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.Distribution) {
return mergeFrom((com.google.api.Distribution)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.Distribution other) {
if (other == com.google.api.Distribution.getDefaultInstance()) return this;
if (other.getCount() != 0L) {
setCount(other.getCount());
}
if (other.getMean() != 0D) {
setMean(other.getMean());
}
if (other.getSumOfSquaredDeviation() != 0D) {
setSumOfSquaredDeviation(other.getSumOfSquaredDeviation());
}
if (other.hasRange()) {
mergeRange(other.getRange());
}
if (other.hasBucketOptions()) {
mergeBucketOptions(other.getBucketOptions());
}
if (!other.bucketCounts_.isEmpty()) {
if (bucketCounts_.isEmpty()) {
bucketCounts_ = other.bucketCounts_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureBucketCountsIsMutable();
bucketCounts_.addAll(other.bucketCounts_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.Distribution parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.Distribution) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long count_ ;
/**
*
* The number of values in the population. Must be non-negative.
*
*
* int64 count = 1;
*/
public long getCount() {
return count_;
}
/**
*
* The number of values in the population. Must be non-negative.
*
* The sum of squared deviations from the mean of the values in the
* population. For values x_i this is:
* Sum[i=1..n]((x_i - mean)^2)
* Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
* describes Welford's method for accumulating this sum in one pass.
* If `count` is zero then this field must be zero.
*
* The sum of squared deviations from the mean of the values in the
* population. For values x_i this is:
* Sum[i=1..n]((x_i - mean)^2)
* Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
* describes Welford's method for accumulating this sum in one pass.
* If `count` is zero then this field must be zero.
*
* The sum of squared deviations from the mean of the values in the
* population. For values x_i this is:
* Sum[i=1..n]((x_i - mean)^2)
* Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
* describes Welford's method for accumulating this sum in one pass.
* If `count` is zero then this field must be zero.
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
*
* repeated int64 bucket_counts = 7;
*/
public int getBucketCountsCount() {
return bucketCounts_.size();
}
/**
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
*
* repeated int64 bucket_counts = 7;
*/
public long getBucketCounts(int index) {
return bucketCounts_.get(index);
}
/**
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
*
* repeated int64 bucket_counts = 7;
*/
public Builder setBucketCounts(
int index, long value) {
ensureBucketCountsIsMutable();
bucketCounts_.set(index, value);
onChanged();
return this;
}
/**
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
* If `bucket_options` is given, then the sum of the values in `bucket_counts`
* must equal the value in `count`. If `bucket_options` is not given, no
* `bucket_counts` fields may be given.
* Bucket counts are given in order under the numbering scheme described
* above (the underflow bucket has number 0; the finite buckets, if any,
* have numbers 1 through N-2; the overflow bucket has number N-1).
* The size of `bucket_counts` must be no greater than N as defined in
* `bucket_options`.
* Any suffix of trailing zero bucket_count fields may be omitted.
*
*
* repeated int64 bucket_counts = 7;
*/
public Builder clearBucketCounts() {
bucketCounts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.api.Distribution)
}
// @@protoc_insertion_point(class_scope:google.api.Distribution)
private static final com.google.api.Distribution DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.Distribution();
}
public static com.google.api.Distribution getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
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;
}
public com.google.api.Distribution getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}