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: opencensus/proto/metrics/v1/metrics.proto
package io.opencensus.proto.metrics.v1;
/**
*
* Distribution contains summary statistics for a population of values. It
* optionally contains a histogram representing the distribution of those
* values across a set of buckets.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.DistributionValue}
*/
public final class DistributionValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencensus.proto.metrics.v1.DistributionValue)
DistributionValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use DistributionValue.newBuilder() to construct.
private DistributionValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DistributionValue() {
buckets_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DistributionValue();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DistributionValue(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
count_ = input.readInt64();
break;
}
case 17: {
sum_ = input.readDouble();
break;
}
case 25: {
sumOfSquaredDeviation_ = input.readDouble();
break;
}
case 34: {
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Builder subBuilder = null;
if (bucketOptions_ != null) {
subBuilder = bucketOptions_.toBuilder();
}
bucketOptions_ = input.readMessage(io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(bucketOptions_);
bucketOptions_ = subBuilder.buildPartial();
}
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
buckets_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
buckets_.add(
input.readMessage(io.opencensus.proto.metrics.v1.DistributionValue.Bucket.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
buckets_ = java.util.Collections.unmodifiableList(buckets_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.DistributionValue.class, io.opencensus.proto.metrics.v1.DistributionValue.Builder.class);
}
public interface BucketOptionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:opencensus.proto.metrics.v1.DistributionValue.BucketOptions)
com.google.protobuf.MessageOrBuilder {
/**
*
* Bucket with explicit bounds.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit explicit = 1;
* @return Whether the explicit field is set.
*/
boolean hasExplicit();
/**
*
* A Distribution may optionally contain a histogram of the values in the
* population. The bucket boundaries for that histogram are described by
* BucketOptions.
* If bucket_options has no type, then there is no histogram associated with
* the Distribution.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.DistributionValue.BucketOptions}
*/
public static final class BucketOptions extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencensus.proto.metrics.v1.DistributionValue.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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new 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();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.Builder subBuilder = null;
if (typeCase_ == 1) {
subBuilder = ((io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) type_).toBuilder();
}
type_ =
input.readMessage(io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) type_);
type_ = subBuilder.buildPartial();
}
typeCase_ = 1;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.class, io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Builder.class);
}
public interface ExplicitOrBuilder extends
// @@protoc_insertion_point(interface_extends:opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit)
com.google.protobuf.MessageOrBuilder {
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @return A list containing the bounds.
*/
java.util.List getBoundsList();
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @return The count of bounds.
*/
int getBoundsCount();
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @param index The index of the element to return.
* @return The bounds at the given index.
*/
double getBounds(int index);
}
/**
*
* Specifies a set of buckets with arbitrary upper-bounds.
* This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket
* index i are:
* [0, bucket_bounds[i]) for i == 0
* [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-1
* [bucket_bounds[i], +infinity) for i == N-1
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit}
*/
public static final class Explicit extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencensus.proto.metrics.v1.DistributionValue.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_ = emptyDoubleList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Explicit();
}
@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;
case 9: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
bounds_ = newDoubleList();
mutable_bitField0_ |= 0x00000001;
}
bounds_.addDouble(input.readDouble());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
bounds_ = newDoubleList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
bounds_.addDouble(input.readDouble());
}
input.popLimit(limit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
bounds_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_Explicit_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_Explicit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.class, io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.Builder.class);
}
public static final int BOUNDS_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.DoubleList bounds_;
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @return A list containing the bounds.
*/
@java.lang.Override
public java.util.List
getBoundsList() {
return bounds_;
}
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @return The count of bounds.
*/
public int getBoundsCount() {
return bounds_.size();
}
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @param index The index of the element to return.
* @return The bounds at the given index.
*/
public double getBounds(int index) {
return bounds_.getDouble(index);
}
private int boundsMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getBoundsList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(boundsMemoizedSerializedSize);
}
for (int i = 0; i < bounds_.size(); i++) {
output.writeDoubleNoTag(bounds_.getDouble(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
dataSize = 8 * getBoundsList().size();
size += dataSize;
if (!getBoundsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
boundsMemoizedSerializedSize = dataSize;
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit)) {
return super.equals(obj);
}
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit other = (io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) obj;
if (!getBoundsList()
.equals(other.getBoundsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getBoundsCount() > 0) {
hash = (37 * hash) + BOUNDS_FIELD_NUMBER;
hash = (53 * hash) + getBoundsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.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 io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.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 io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.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 io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Specifies a set of buckets with arbitrary upper-bounds.
* This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket
* index i are:
* [0, bucket_bounds[i]) for i == 0
* [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-1
* [bucket_bounds[i], +infinity) for i == N-1
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit)
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.ExplicitOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_Explicit_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_Explicit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.class, io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.Builder.class);
}
// Construct using io.opencensus.proto.metrics.v1.DistributionValue.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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bounds_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_Explicit_descriptor;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit getDefaultInstanceForType() {
return io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.getDefaultInstance();
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit build() {
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit buildPartial() {
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit result = new io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
bounds_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.bounds_ = bounds_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) {
return mergeFrom((io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit other) {
if (other == io.opencensus.proto.metrics.v1.DistributionValue.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;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Internal.DoubleList bounds_ = emptyDoubleList();
private void ensureBoundsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
bounds_ = mutableCopy(bounds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @return A list containing the bounds.
*/
public java.util.List
getBoundsList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(bounds_) : bounds_;
}
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @return The count of bounds.
*/
public int getBoundsCount() {
return bounds_.size();
}
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @param index The index of the element to return.
* @return The bounds at the given index.
*/
public double getBounds(int index) {
return bounds_.getDouble(index);
}
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @param index The index to set the value at.
* @param value The bounds to set.
* @return This builder for chaining.
*/
public Builder setBounds(
int index, double value) {
ensureBoundsIsMutable();
bounds_.setDouble(index, value);
onChanged();
return this;
}
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @param value The bounds to add.
* @return This builder for chaining.
*/
public Builder addBounds(double value) {
ensureBoundsIsMutable();
bounds_.addDouble(value);
onChanged();
return this;
}
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @param values The bounds to add.
* @return This builder for chaining.
*/
public Builder addAllBounds(
java.lang.Iterable extends java.lang.Double> values) {
ensureBoundsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, bounds_);
onChanged();
return this;
}
/**
*
* The values must be strictly increasing and > 0.
*
*
* repeated double bounds = 1;
* @return This builder for chaining.
*/
public Builder clearBounds() {
bounds_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit)
}
// @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit)
private static final io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit();
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Explicit parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Explicit(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int typeCase_ = 0;
private java.lang.Object type_;
public enum TypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
EXPLICIT(1),
TYPE_NOT_SET(0);
private final int value;
private TypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TypeCase valueOf(int value) {
return forNumber(value);
}
public static TypeCase forNumber(int value) {
switch (value) {
case 1: return EXPLICIT;
case 0: return TYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TypeCase
getTypeCase() {
return TypeCase.forNumber(
typeCase_);
}
public static final int EXPLICIT_FIELD_NUMBER = 1;
/**
*
* Bucket with explicit bounds.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit explicit = 1;
* @return Whether the explicit field is set.
*/
@java.lang.Override
public boolean hasExplicit() {
return typeCase_ == 1;
}
/**
*
* Bucket with explicit bounds.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit explicit = 1;
* @return The explicit.
*/
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit getExplicit() {
if (typeCase_ == 1) {
return (io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) type_;
}
return io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.getDefaultInstance();
}
/**
*
* Bucket with explicit bounds.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit explicit = 1;
*/
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.ExplicitOrBuilder getExplicitOrBuilder() {
if (typeCase_ == 1) {
return (io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) type_;
}
return io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (typeCase_ == 1) {
output.writeMessage(1, (io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) type_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (typeCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) type_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions)) {
return super.equals(obj);
}
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions other = (io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions) obj;
if (!getTypeCase().equals(other.getTypeCase())) return false;
switch (typeCase_) {
case 1:
if (!getExplicit()
.equals(other.getExplicit())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (typeCase_) {
case 1:
hash = (37 * hash) + EXPLICIT_FIELD_NUMBER;
hash = (53 * hash) + getExplicit().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.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 io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.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 io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.DistributionValue.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);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A Distribution may optionally contain a histogram of the values in the
* population. The bucket boundaries for that histogram are described by
* BucketOptions.
* If bucket_options has no type, then there is no histogram associated with
* the Distribution.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.DistributionValue.BucketOptions}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencensus.proto.metrics.v1.DistributionValue.BucketOptions)
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.class, io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Builder.class);
}
// Construct using io.opencensus.proto.metrics.v1.DistributionValue.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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
typeCase_ = 0;
type_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_BucketOptions_descriptor;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions getDefaultInstanceForType() {
return io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.getDefaultInstance();
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions build() {
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions buildPartial() {
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions result = new io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions(this);
if (typeCase_ == 1) {
if (explicitBuilder_ == null) {
result.type_ = type_;
} else {
result.type_ = explicitBuilder_.build();
}
}
result.typeCase_ = typeCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions) {
return mergeFrom((io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions other) {
if (other == io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.getDefaultInstance()) return this;
switch (other.getTypeCase()) {
case EXPLICIT: {
mergeExplicit(other.getExplicit());
break;
}
case TYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int typeCase_ = 0;
private java.lang.Object type_;
public TypeCase
getTypeCase() {
return TypeCase.forNumber(
typeCase_);
}
public Builder clearType() {
typeCase_ = 0;
type_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit, io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.Builder, io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.ExplicitOrBuilder> explicitBuilder_;
/**
*
* Bucket with explicit bounds.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit explicit = 1;
* @return Whether the explicit field is set.
*/
@java.lang.Override
public boolean hasExplicit() {
return typeCase_ == 1;
}
/**
*
* Bucket with explicit bounds.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit explicit = 1;
* @return The explicit.
*/
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit getExplicit() {
if (explicitBuilder_ == null) {
if (typeCase_ == 1) {
return (io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit) type_;
}
return io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.getDefaultInstance();
} else {
if (typeCase_ == 1) {
return explicitBuilder_.getMessage();
}
return io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit.getDefaultInstance();
}
}
/**
*
* Exemplars are example points that may be used to annotate aggregated
* Distribution values. They are metadata that gives information about a
* particular value added to a Distribution bucket.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.DistributionValue.Exemplar}
*/
public static final class Exemplar extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencensus.proto.metrics.v1.DistributionValue.Exemplar)
ExemplarOrBuilder {
private static final long serialVersionUID = 0L;
// Use Exemplar.newBuilder() to construct.
private Exemplar(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Exemplar() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Exemplar();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Exemplar(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
value_ = input.readDouble();
break;
}
case 18: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (timestamp_ != null) {
subBuilder = timestamp_.toBuilder();
}
timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timestamp_);
timestamp_ = subBuilder.buildPartial();
}
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
attachments_ = com.google.protobuf.MapField.newMapField(
AttachmentsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
attachments__ = input.readMessage(
AttachmentsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
attachments_.getMutableMap().put(
attachments__.getKey(), attachments__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_Exemplar_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetAttachments();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_Exemplar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.DistributionValue.Exemplar.class, io.opencensus.proto.metrics.v1.DistributionValue.Exemplar.Builder.class);
}
public static final int VALUE_FIELD_NUMBER = 1;
private double value_;
/**
*
* Value of the exemplar point. It determines which bucket the exemplar
* belongs to.
*
*
* double value = 1;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
public static final int TIMESTAMP_FIELD_NUMBER = 2;
private com.google.protobuf.Timestamp timestamp_;
/**
*
* The observation (sampling) time of the above value.
*
*
* .google.protobuf.Timestamp timestamp = 2;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return timestamp_ != null;
}
/**
*
* The observation (sampling) time of the above value.
*
* Exemplars are example points that may be used to annotate aggregated
* Distribution values. They are metadata that gives information about a
* particular value added to a Distribution bucket.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.DistributionValue.Exemplar}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencensus.proto.metrics.v1.DistributionValue.Exemplar)
io.opencensus.proto.metrics.v1.DistributionValue.ExemplarOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_Exemplar_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetAttachments();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 3:
return internalGetMutableAttachments();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_Exemplar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.DistributionValue.Exemplar.class, io.opencensus.proto.metrics.v1.DistributionValue.Exemplar.Builder.class);
}
// Construct using io.opencensus.proto.metrics.v1.DistributionValue.Exemplar.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
value_ = 0D;
if (timestampBuilder_ == null) {
timestamp_ = null;
} else {
timestamp_ = null;
timestampBuilder_ = null;
}
internalGetMutableAttachments().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_Exemplar_descriptor;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.Exemplar getDefaultInstanceForType() {
return io.opencensus.proto.metrics.v1.DistributionValue.Exemplar.getDefaultInstance();
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.Exemplar build() {
io.opencensus.proto.metrics.v1.DistributionValue.Exemplar result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.Exemplar buildPartial() {
io.opencensus.proto.metrics.v1.DistributionValue.Exemplar result = new io.opencensus.proto.metrics.v1.DistributionValue.Exemplar(this);
int from_bitField0_ = bitField0_;
result.value_ = value_;
if (timestampBuilder_ == null) {
result.timestamp_ = timestamp_;
} else {
result.timestamp_ = timestampBuilder_.build();
}
result.attachments_ = internalGetAttachments();
result.attachments_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.opencensus.proto.metrics.v1.DistributionValue.Exemplar) {
return mergeFrom((io.opencensus.proto.metrics.v1.DistributionValue.Exemplar)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencensus.proto.metrics.v1.DistributionValue.Exemplar other) {
if (other == io.opencensus.proto.metrics.v1.DistributionValue.Exemplar.getDefaultInstance()) return this;
if (other.getValue() != 0D) {
setValue(other.getValue());
}
if (other.hasTimestamp()) {
mergeTimestamp(other.getTimestamp());
}
internalGetMutableAttachments().mergeFrom(
other.internalGetAttachments());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.opencensus.proto.metrics.v1.DistributionValue.Exemplar parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencensus.proto.metrics.v1.DistributionValue.Exemplar) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private double value_ ;
/**
*
* Value of the exemplar point. It determines which bucket the exemplar
* belongs to.
*
*
* double value = 1;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
/**
*
* Value of the exemplar point. It determines which bucket the exemplar
* belongs to.
*
*
* double value = 1;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(double value) {
value_ = value;
onChanged();
return this;
}
/**
*
* Value of the exemplar point. It determines which bucket the exemplar
* belongs to.
*
*
* double value = 1;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = 0D;
onChanged();
return this;
}
private com.google.protobuf.Timestamp timestamp_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_;
/**
*
* The observation (sampling) time of the above value.
*
*
* .google.protobuf.Timestamp timestamp = 2;
* @return Whether the timestamp field is set.
*/
public boolean hasTimestamp() {
return timestampBuilder_ != null || timestamp_ != null;
}
/**
*
* The observation (sampling) time of the above value.
*
* Contextual information about the example value.
*
*
* map<string, string> attachments = 3;
*/
@java.lang.Override
public java.lang.String getAttachmentsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetAttachments().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearAttachments() {
internalGetMutableAttachments().getMutableMap()
.clear();
return this;
}
/**
*
* Contextual information about the example value.
*
*
* map<string, string> attachments = 3;
*/
public Builder removeAttachments(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableAttachments().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableAttachments() {
return internalGetMutableAttachments().getMutableMap();
}
/**
*
* Contextual information about the example value.
*
*
* map<string, string> attachments = 3;
*/
public Builder putAttachments(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableAttachments().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Contextual information about the example value.
*
*
* map<string, string> attachments = 3;
*/
public Builder putAllAttachments(
java.util.Map values) {
internalGetMutableAttachments().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:opencensus.proto.metrics.v1.DistributionValue.Exemplar)
}
// @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.DistributionValue.Exemplar)
private static final io.opencensus.proto.metrics.v1.DistributionValue.Exemplar DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencensus.proto.metrics.v1.DistributionValue.Exemplar();
}
public static io.opencensus.proto.metrics.v1.DistributionValue.Exemplar getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Exemplar parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Exemplar(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.Exemplar getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int COUNT_FIELD_NUMBER = 1;
private long count_;
/**
*
* The number of values in the population. Must be non-negative. This value
* must equal the sum of the values in bucket_counts if a histogram is
* provided.
*
*
* int64 count = 1;
* @return The count.
*/
@java.lang.Override
public long getCount() {
return count_;
}
public static final int SUM_FIELD_NUMBER = 2;
private double sum_;
/**
*
* The sum of the values in the population. If count is zero then this field
* must be zero.
*
*
* double sum = 2;
* @return The sum.
*/
@java.lang.Override
public double getSum() {
return sum_;
}
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;
* @return The sumOfSquaredDeviation.
*/
@java.lang.Override
public double getSumOfSquaredDeviation() {
return sumOfSquaredDeviation_;
}
public static final int BUCKET_OPTIONS_FIELD_NUMBER = 4;
private io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucketOptions_;
/**
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
* @return Whether the bucketOptions field is set.
*/
@java.lang.Override
public boolean hasBucketOptions() {
return bucketOptions_ != null;
}
/**
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
*/
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOptionsOrBuilder getBucketOptionsOrBuilder() {
return getBucketOptions();
}
public static final int BUCKETS_FIELD_NUMBER = 5;
private java.util.List buckets_;
/**
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
*
* repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
*/
@java.lang.Override
public int getBucketsCount() {
return buckets_.size();
}
/**
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
*
* repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
*/
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOrBuilder getBucketsOrBuilder(
int index) {
return buckets_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (count_ != 0L) {
output.writeInt64(1, count_);
}
if (java.lang.Double.doubleToRawLongBits(sum_) != 0) {
output.writeDouble(2, sum_);
}
if (java.lang.Double.doubleToRawLongBits(sumOfSquaredDeviation_) != 0) {
output.writeDouble(3, sumOfSquaredDeviation_);
}
if (bucketOptions_ != null) {
output.writeMessage(4, getBucketOptions());
}
for (int i = 0; i < buckets_.size(); i++) {
output.writeMessage(5, buckets_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (count_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, count_);
}
if (java.lang.Double.doubleToRawLongBits(sum_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, sum_);
}
if (java.lang.Double.doubleToRawLongBits(sumOfSquaredDeviation_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, sumOfSquaredDeviation_);
}
if (bucketOptions_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getBucketOptions());
}
for (int i = 0; i < buckets_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, buckets_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.opencensus.proto.metrics.v1.DistributionValue)) {
return super.equals(obj);
}
io.opencensus.proto.metrics.v1.DistributionValue other = (io.opencensus.proto.metrics.v1.DistributionValue) obj;
if (getCount()
!= other.getCount()) return false;
if (java.lang.Double.doubleToLongBits(getSum())
!= java.lang.Double.doubleToLongBits(
other.getSum())) return false;
if (java.lang.Double.doubleToLongBits(getSumOfSquaredDeviation())
!= java.lang.Double.doubleToLongBits(
other.getSumOfSquaredDeviation())) return false;
if (hasBucketOptions() != other.hasBucketOptions()) return false;
if (hasBucketOptions()) {
if (!getBucketOptions()
.equals(other.getBucketOptions())) return false;
}
if (!getBucketsList()
.equals(other.getBucketsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCount());
hash = (37 * hash) + SUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getSum()));
hash = (37 * hash) + SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getSumOfSquaredDeviation()));
if (hasBucketOptions()) {
hash = (37 * hash) + BUCKET_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getBucketOptions().hashCode();
}
if (getBucketsCount() > 0) {
hash = (37 * hash) + BUCKETS_FIELD_NUMBER;
hash = (53 * hash) + getBucketsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.DistributionValue parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.opencensus.proto.metrics.v1.DistributionValue prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Distribution contains summary statistics for a population of values. It
* optionally contains a histogram representing the distribution of those
* values across a set of buckets.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.DistributionValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencensus.proto.metrics.v1.DistributionValue)
io.opencensus.proto.metrics.v1.DistributionValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.DistributionValue.class, io.opencensus.proto.metrics.v1.DistributionValue.Builder.class);
}
// Construct using io.opencensus.proto.metrics.v1.DistributionValue.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getBucketsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
count_ = 0L;
sum_ = 0D;
sumOfSquaredDeviation_ = 0D;
if (bucketOptionsBuilder_ == null) {
bucketOptions_ = null;
} else {
bucketOptions_ = null;
bucketOptionsBuilder_ = null;
}
if (bucketsBuilder_ == null) {
buckets_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
bucketsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_DistributionValue_descriptor;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue getDefaultInstanceForType() {
return io.opencensus.proto.metrics.v1.DistributionValue.getDefaultInstance();
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue build() {
io.opencensus.proto.metrics.v1.DistributionValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue buildPartial() {
io.opencensus.proto.metrics.v1.DistributionValue result = new io.opencensus.proto.metrics.v1.DistributionValue(this);
int from_bitField0_ = bitField0_;
result.count_ = count_;
result.sum_ = sum_;
result.sumOfSquaredDeviation_ = sumOfSquaredDeviation_;
if (bucketOptionsBuilder_ == null) {
result.bucketOptions_ = bucketOptions_;
} else {
result.bucketOptions_ = bucketOptionsBuilder_.build();
}
if (bucketsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
buckets_ = java.util.Collections.unmodifiableList(buckets_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.buckets_ = buckets_;
} else {
result.buckets_ = bucketsBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.opencensus.proto.metrics.v1.DistributionValue) {
return mergeFrom((io.opencensus.proto.metrics.v1.DistributionValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencensus.proto.metrics.v1.DistributionValue other) {
if (other == io.opencensus.proto.metrics.v1.DistributionValue.getDefaultInstance()) return this;
if (other.getCount() != 0L) {
setCount(other.getCount());
}
if (other.getSum() != 0D) {
setSum(other.getSum());
}
if (other.getSumOfSquaredDeviation() != 0D) {
setSumOfSquaredDeviation(other.getSumOfSquaredDeviation());
}
if (other.hasBucketOptions()) {
mergeBucketOptions(other.getBucketOptions());
}
if (bucketsBuilder_ == null) {
if (!other.buckets_.isEmpty()) {
if (buckets_.isEmpty()) {
buckets_ = other.buckets_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureBucketsIsMutable();
buckets_.addAll(other.buckets_);
}
onChanged();
}
} else {
if (!other.buckets_.isEmpty()) {
if (bucketsBuilder_.isEmpty()) {
bucketsBuilder_.dispose();
bucketsBuilder_ = null;
buckets_ = other.buckets_;
bitField0_ = (bitField0_ & ~0x00000001);
bucketsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getBucketsFieldBuilder() : null;
} else {
bucketsBuilder_.addAllMessages(other.buckets_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.opencensus.proto.metrics.v1.DistributionValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencensus.proto.metrics.v1.DistributionValue) 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. This value
* must equal the sum of the values in bucket_counts if a histogram is
* provided.
*
*
* int64 count = 1;
* @return The count.
*/
@java.lang.Override
public long getCount() {
return count_;
}
/**
*
* The number of values in the population. Must be non-negative. This value
* must equal the sum of the values in bucket_counts if a histogram is
* provided.
*
*
* int64 count = 1;
* @param value The count to set.
* @return This builder for chaining.
*/
public Builder setCount(long value) {
count_ = value;
onChanged();
return this;
}
/**
*
* The number of values in the population. Must be non-negative. This value
* must equal the sum of the values in bucket_counts if a histogram is
* provided.
*
*
* int64 count = 1;
* @return This builder for chaining.
*/
public Builder clearCount() {
count_ = 0L;
onChanged();
return this;
}
private double sum_ ;
/**
*
* The sum of the values in the population. If count is zero then this field
* must be zero.
*
*
* double sum = 2;
* @return The sum.
*/
@java.lang.Override
public double getSum() {
return sum_;
}
/**
*
* The sum of the values in the population. If count is zero then this field
* must be zero.
*
*
* double sum = 2;
* @param value The sum to set.
* @return This builder for chaining.
*/
public Builder setSum(double value) {
sum_ = value;
onChanged();
return this;
}
/**
*
* The sum of the values in the population. If count is zero then this field
* must be zero.
*
*
* double sum = 2;
* @return This builder for chaining.
*/
public Builder clearSum() {
sum_ = 0D;
onChanged();
return this;
}
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.
*
* 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;
* @param value The sumOfSquaredDeviation to set.
* @return This builder for chaining.
*/
public Builder setSumOfSquaredDeviation(double value) {
sumOfSquaredDeviation_ = value;
onChanged();
return this;
}
/**
*
* 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.
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
* @return Whether the bucketOptions field is set.
*/
public boolean hasBucketOptions() {
return bucketOptionsBuilder_ != null || bucketOptions_ != null;
}
/**
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
*
* .opencensus.proto.metrics.v1.DistributionValue.BucketOptions bucket_options = 4;
*/
public Builder setBucketOptions(io.opencensus.proto.metrics.v1.DistributionValue.BucketOptions value) {
if (bucketOptionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
bucketOptions_ = value;
onChanged();
} else {
bucketOptionsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
* Don't change bucket boundaries within a TimeSeries if your backend doesn't
* support this.
* TODO(issue #152): consider not required to send bucket options for
* optimization.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
*
* repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
*/
public int getBucketsCount() {
if (bucketsBuilder_ == null) {
return buckets_.size();
} else {
return bucketsBuilder_.getCount();
}
}
/**
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
*
* repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
*/
public Builder setBuckets(
int index, io.opencensus.proto.metrics.v1.DistributionValue.Bucket value) {
if (bucketsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBucketsIsMutable();
buckets_.set(index, value);
onChanged();
} else {
bucketsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
*
* repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
*/
public Builder addBuckets(io.opencensus.proto.metrics.v1.DistributionValue.Bucket value) {
if (bucketsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBucketsIsMutable();
buckets_.add(value);
onChanged();
} else {
bucketsBuilder_.addMessage(value);
}
return this;
}
/**
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
*
* repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
*/
public Builder addBuckets(
int index, io.opencensus.proto.metrics.v1.DistributionValue.Bucket value) {
if (bucketsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBucketsIsMutable();
buckets_.add(index, value);
onChanged();
} else {
bucketsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
*
* repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
*/
public io.opencensus.proto.metrics.v1.DistributionValue.Bucket.Builder getBucketsBuilder(
int index) {
return getBucketsFieldBuilder().getBuilder(index);
}
/**
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
*
* repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
*/
public io.opencensus.proto.metrics.v1.DistributionValue.BucketOrBuilder getBucketsOrBuilder(
int index) {
if (bucketsBuilder_ == null) {
return buckets_.get(index); } else {
return bucketsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
* If the distribution does not have a histogram, then omit this field.
* If there is a histogram, then the sum of the values in the Bucket counts
* must equal the value in the count field of the distribution.
*
*
* repeated .opencensus.proto.metrics.v1.DistributionValue.Bucket buckets = 5;
*/
public java.util.List
getBucketsBuilderList() {
return getBucketsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opencensus.proto.metrics.v1.DistributionValue.Bucket, io.opencensus.proto.metrics.v1.DistributionValue.Bucket.Builder, io.opencensus.proto.metrics.v1.DistributionValue.BucketOrBuilder>
getBucketsFieldBuilder() {
if (bucketsBuilder_ == null) {
bucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.opencensus.proto.metrics.v1.DistributionValue.Bucket, io.opencensus.proto.metrics.v1.DistributionValue.Bucket.Builder, io.opencensus.proto.metrics.v1.DistributionValue.BucketOrBuilder>(
buckets_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
buckets_ = null;
}
return bucketsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:opencensus.proto.metrics.v1.DistributionValue)
}
// @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.DistributionValue)
private static final io.opencensus.proto.metrics.v1.DistributionValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencensus.proto.metrics.v1.DistributionValue();
}
public static io.opencensus.proto.metrics.v1.DistributionValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DistributionValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DistributionValue(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.DistributionValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}