Please wait. This can take some minutes ...
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.
io.opencensus.proto.metrics.v1.SummaryValue Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: opencensus/proto/metrics/v1/metrics.proto
package io.opencensus.proto.metrics.v1;
/**
*
* The start_timestamp only applies to the count and sum in the SummaryValue.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.SummaryValue}
*/
public final class SummaryValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencensus.proto.metrics.v1.SummaryValue)
SummaryValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use SummaryValue.newBuilder() to construct.
private SummaryValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SummaryValue() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SummaryValue();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SummaryValue(
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: {
com.google.protobuf.Int64Value.Builder subBuilder = null;
if (count_ != null) {
subBuilder = count_.toBuilder();
}
count_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(count_);
count_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.google.protobuf.DoubleValue.Builder subBuilder = null;
if (sum_ != null) {
subBuilder = sum_.toBuilder();
}
sum_ = input.readMessage(com.google.protobuf.DoubleValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(sum_);
sum_ = subBuilder.buildPartial();
}
break;
}
case 26: {
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.Builder subBuilder = null;
if (snapshot_ != null) {
subBuilder = snapshot_.toBuilder();
}
snapshot_ = input.readMessage(io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(snapshot_);
snapshot_ = subBuilder.buildPartial();
}
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_SummaryValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_SummaryValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.SummaryValue.class, io.opencensus.proto.metrics.v1.SummaryValue.Builder.class);
}
public interface SnapshotOrBuilder extends
// @@protoc_insertion_point(interface_extends:opencensus.proto.metrics.v1.SummaryValue.Snapshot)
com.google.protobuf.MessageOrBuilder {
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return Whether the count field is set.
*/
boolean hasCount();
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return The count.
*/
com.google.protobuf.Int64Value getCount();
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
com.google.protobuf.Int64ValueOrBuilder getCountOrBuilder();
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return Whether the sum field is set.
*/
boolean hasSum();
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return The sum.
*/
com.google.protobuf.DoubleValue getSum();
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
com.google.protobuf.DoubleValueOrBuilder getSumOrBuilder();
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
java.util.List
getPercentileValuesList();
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile getPercentileValues(int index);
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
int getPercentileValuesCount();
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
java.util.List extends io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder>
getPercentileValuesOrBuilderList();
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder getPercentileValuesOrBuilder(
int index);
}
/**
*
* The values in this message can be reset at arbitrary unknown times, with
* the requirement that all of them are reset at the same time.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.SummaryValue.Snapshot}
*/
public static final class Snapshot extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencensus.proto.metrics.v1.SummaryValue.Snapshot)
SnapshotOrBuilder {
private static final long serialVersionUID = 0L;
// Use Snapshot.newBuilder() to construct.
private Snapshot(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Snapshot() {
percentileValues_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Snapshot();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Snapshot(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.Int64Value.Builder subBuilder = null;
if (count_ != null) {
subBuilder = count_.toBuilder();
}
count_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(count_);
count_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.google.protobuf.DoubleValue.Builder subBuilder = null;
if (sum_ != null) {
subBuilder = sum_.toBuilder();
}
sum_ = input.readMessage(com.google.protobuf.DoubleValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(sum_);
sum_ = subBuilder.buildPartial();
}
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
percentileValues_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
percentileValues_.add(
input.readMessage(io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.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)) {
percentileValues_ = java.util.Collections.unmodifiableList(percentileValues_);
}
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_SummaryValue_Snapshot_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_SummaryValue_Snapshot_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.class, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.Builder.class);
}
public interface ValueAtPercentileOrBuilder extends
// @@protoc_insertion_point(interface_extends:opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile)
com.google.protobuf.MessageOrBuilder {
/**
*
* The percentile of a distribution. Must be in the interval
* (0.0, 100.0].
*
*
* double percentile = 1;
* @return The percentile.
*/
double getPercentile();
/**
*
* The value at the given percentile of a distribution.
*
*
* double value = 2;
* @return The value.
*/
double getValue();
}
/**
*
* Represents the value at a given percentile of a distribution.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile}
*/
public static final class ValueAtPercentile extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile)
ValueAtPercentileOrBuilder {
private static final long serialVersionUID = 0L;
// Use ValueAtPercentile.newBuilder() to construct.
private ValueAtPercentile(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ValueAtPercentile() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ValueAtPercentile();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ValueAtPercentile(
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 9: {
percentile_ = input.readDouble();
break;
}
case 17: {
value_ = input.readDouble();
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_SummaryValue_Snapshot_ValueAtPercentile_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_SummaryValue_Snapshot_ValueAtPercentile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.class, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder.class);
}
public static final int PERCENTILE_FIELD_NUMBER = 1;
private double percentile_;
/**
*
* The percentile of a distribution. Must be in the interval
* (0.0, 100.0].
*
*
* double percentile = 1;
* @return The percentile.
*/
@java.lang.Override
public double getPercentile() {
return percentile_;
}
public static final int VALUE_FIELD_NUMBER = 2;
private double value_;
/**
*
* The value at the given percentile of a distribution.
*
*
* double value = 2;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
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 (java.lang.Double.doubleToRawLongBits(percentile_) != 0) {
output.writeDouble(1, percentile_);
}
if (java.lang.Double.doubleToRawLongBits(value_) != 0) {
output.writeDouble(2, value_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Double.doubleToRawLongBits(percentile_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, percentile_);
}
if (java.lang.Double.doubleToRawLongBits(value_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, value_);
}
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.SummaryValue.Snapshot.ValueAtPercentile)) {
return super.equals(obj);
}
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile other = (io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile) obj;
if (java.lang.Double.doubleToLongBits(getPercentile())
!= java.lang.Double.doubleToLongBits(
other.getPercentile())) return false;
if (java.lang.Double.doubleToLongBits(getValue())
!= java.lang.Double.doubleToLongBits(
other.getValue())) 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) + PERCENTILE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getPercentile()));
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getValue()));
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile 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.SummaryValue.Snapshot.ValueAtPercentile parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile 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.SummaryValue.Snapshot.ValueAtPercentile parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile 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.SummaryValue.Snapshot.ValueAtPercentile parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile 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.SummaryValue.Snapshot.ValueAtPercentile parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile 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.SummaryValue.Snapshot.ValueAtPercentile 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.SummaryValue.Snapshot.ValueAtPercentile 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.SummaryValue.Snapshot.ValueAtPercentile 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;
}
/**
*
* Represents the value at a given percentile of a distribution.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile)
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_SummaryValue_Snapshot_ValueAtPercentile_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_SummaryValue_Snapshot_ValueAtPercentile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.class, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder.class);
}
// Construct using io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.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();
percentile_ = 0D;
value_ = 0D;
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_SummaryValue_Snapshot_ValueAtPercentile_descriptor;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile getDefaultInstanceForType() {
return io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.getDefaultInstance();
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile build() {
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile buildPartial() {
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile result = new io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile(this);
result.percentile_ = percentile_;
result.value_ = value_;
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.SummaryValue.Snapshot.ValueAtPercentile) {
return mergeFrom((io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile other) {
if (other == io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.getDefaultInstance()) return this;
if (other.getPercentile() != 0D) {
setPercentile(other.getPercentile());
}
if (other.getValue() != 0D) {
setValue(other.getValue());
}
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.SummaryValue.Snapshot.ValueAtPercentile parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private double percentile_ ;
/**
*
* The percentile of a distribution. Must be in the interval
* (0.0, 100.0].
*
*
* double percentile = 1;
* @return The percentile.
*/
@java.lang.Override
public double getPercentile() {
return percentile_;
}
/**
*
* The percentile of a distribution. Must be in the interval
* (0.0, 100.0].
*
*
* double percentile = 1;
* @param value The percentile to set.
* @return This builder for chaining.
*/
public Builder setPercentile(double value) {
percentile_ = value;
onChanged();
return this;
}
/**
*
* The percentile of a distribution. Must be in the interval
* (0.0, 100.0].
*
*
* double percentile = 1;
* @return This builder for chaining.
*/
public Builder clearPercentile() {
percentile_ = 0D;
onChanged();
return this;
}
private double value_ ;
/**
*
* The value at the given percentile of a distribution.
*
*
* double value = 2;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
/**
*
* The value at the given percentile of a distribution.
*
*
* double value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(double value) {
value_ = value;
onChanged();
return this;
}
/**
*
* The value at the given percentile of a distribution.
*
*
* double value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = 0D;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile)
}
// @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile)
private static final io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile();
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ValueAtPercentile parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ValueAtPercentile(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.SummaryValue.Snapshot.ValueAtPercentile getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int COUNT_FIELD_NUMBER = 1;
private com.google.protobuf.Int64Value count_;
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return Whether the count field is set.
*/
@java.lang.Override
public boolean hasCount() {
return count_ != null;
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return The count.
*/
@java.lang.Override
public com.google.protobuf.Int64Value getCount() {
return count_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : count_;
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
@java.lang.Override
public com.google.protobuf.Int64ValueOrBuilder getCountOrBuilder() {
return getCount();
}
public static final int SUM_FIELD_NUMBER = 2;
private com.google.protobuf.DoubleValue sum_;
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return Whether the sum field is set.
*/
@java.lang.Override
public boolean hasSum() {
return sum_ != null;
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return The sum.
*/
@java.lang.Override
public com.google.protobuf.DoubleValue getSum() {
return sum_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : sum_;
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
@java.lang.Override
public com.google.protobuf.DoubleValueOrBuilder getSumOrBuilder() {
return getSum();
}
public static final int PERCENTILE_VALUES_FIELD_NUMBER = 3;
private java.util.List percentileValues_;
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
@java.lang.Override
public java.util.List getPercentileValuesList() {
return percentileValues_;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
@java.lang.Override
public java.util.List extends io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder>
getPercentileValuesOrBuilderList() {
return percentileValues_;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
@java.lang.Override
public int getPercentileValuesCount() {
return percentileValues_.size();
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile getPercentileValues(int index) {
return percentileValues_.get(index);
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder getPercentileValuesOrBuilder(
int index) {
return percentileValues_.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_ != null) {
output.writeMessage(1, getCount());
}
if (sum_ != null) {
output.writeMessage(2, getSum());
}
for (int i = 0; i < percentileValues_.size(); i++) {
output.writeMessage(3, percentileValues_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (count_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getCount());
}
if (sum_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getSum());
}
for (int i = 0; i < percentileValues_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, percentileValues_.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.SummaryValue.Snapshot)) {
return super.equals(obj);
}
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot other = (io.opencensus.proto.metrics.v1.SummaryValue.Snapshot) obj;
if (hasCount() != other.hasCount()) return false;
if (hasCount()) {
if (!getCount()
.equals(other.getCount())) return false;
}
if (hasSum() != other.hasSum()) return false;
if (hasSum()) {
if (!getSum()
.equals(other.getSum())) return false;
}
if (!getPercentileValuesList()
.equals(other.getPercentileValuesList())) 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 (hasCount()) {
hash = (37 * hash) + COUNT_FIELD_NUMBER;
hash = (53 * hash) + getCount().hashCode();
}
if (hasSum()) {
hash = (37 * hash) + SUM_FIELD_NUMBER;
hash = (53 * hash) + getSum().hashCode();
}
if (getPercentileValuesCount() > 0) {
hash = (37 * hash) + PERCENTILE_VALUES_FIELD_NUMBER;
hash = (53 * hash) + getPercentileValuesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot 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.SummaryValue.Snapshot parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot 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.SummaryValue.Snapshot parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot 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.SummaryValue.Snapshot parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot 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.SummaryValue.Snapshot parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot 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.SummaryValue.Snapshot 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.SummaryValue.Snapshot 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.SummaryValue.Snapshot prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The values in this message can be reset at arbitrary unknown times, with
* the requirement that all of them are reset at the same time.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.SummaryValue.Snapshot}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencensus.proto.metrics.v1.SummaryValue.Snapshot)
io.opencensus.proto.metrics.v1.SummaryValue.SnapshotOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_SummaryValue_Snapshot_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_SummaryValue_Snapshot_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.class, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.Builder.class);
}
// Construct using io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPercentileValuesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (countBuilder_ == null) {
count_ = null;
} else {
count_ = null;
countBuilder_ = null;
}
if (sumBuilder_ == null) {
sum_ = null;
} else {
sum_ = null;
sumBuilder_ = null;
}
if (percentileValuesBuilder_ == null) {
percentileValues_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
percentileValuesBuilder_.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_SummaryValue_Snapshot_descriptor;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot getDefaultInstanceForType() {
return io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.getDefaultInstance();
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot build() {
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot buildPartial() {
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot result = new io.opencensus.proto.metrics.v1.SummaryValue.Snapshot(this);
int from_bitField0_ = bitField0_;
if (countBuilder_ == null) {
result.count_ = count_;
} else {
result.count_ = countBuilder_.build();
}
if (sumBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = sumBuilder_.build();
}
if (percentileValuesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
percentileValues_ = java.util.Collections.unmodifiableList(percentileValues_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.percentileValues_ = percentileValues_;
} else {
result.percentileValues_ = percentileValuesBuilder_.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.SummaryValue.Snapshot) {
return mergeFrom((io.opencensus.proto.metrics.v1.SummaryValue.Snapshot)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencensus.proto.metrics.v1.SummaryValue.Snapshot other) {
if (other == io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.getDefaultInstance()) return this;
if (other.hasCount()) {
mergeCount(other.getCount());
}
if (other.hasSum()) {
mergeSum(other.getSum());
}
if (percentileValuesBuilder_ == null) {
if (!other.percentileValues_.isEmpty()) {
if (percentileValues_.isEmpty()) {
percentileValues_ = other.percentileValues_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePercentileValuesIsMutable();
percentileValues_.addAll(other.percentileValues_);
}
onChanged();
}
} else {
if (!other.percentileValues_.isEmpty()) {
if (percentileValuesBuilder_.isEmpty()) {
percentileValuesBuilder_.dispose();
percentileValuesBuilder_ = null;
percentileValues_ = other.percentileValues_;
bitField0_ = (bitField0_ & ~0x00000001);
percentileValuesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPercentileValuesFieldBuilder() : null;
} else {
percentileValuesBuilder_.addAllMessages(other.percentileValues_);
}
}
}
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.SummaryValue.Snapshot parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencensus.proto.metrics.v1.SummaryValue.Snapshot) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Int64Value count_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> countBuilder_;
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return Whether the count field is set.
*/
public boolean hasCount() {
return countBuilder_ != null || count_ != null;
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return The count.
*/
public com.google.protobuf.Int64Value getCount() {
if (countBuilder_ == null) {
return count_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : count_;
} else {
return countBuilder_.getMessage();
}
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public Builder setCount(com.google.protobuf.Int64Value value) {
if (countBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
count_ = value;
onChanged();
} else {
countBuilder_.setMessage(value);
}
return this;
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public Builder setCount(
com.google.protobuf.Int64Value.Builder builderForValue) {
if (countBuilder_ == null) {
count_ = builderForValue.build();
onChanged();
} else {
countBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public Builder mergeCount(com.google.protobuf.Int64Value value) {
if (countBuilder_ == null) {
if (count_ != null) {
count_ =
com.google.protobuf.Int64Value.newBuilder(count_).mergeFrom(value).buildPartial();
} else {
count_ = value;
}
onChanged();
} else {
countBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public Builder clearCount() {
if (countBuilder_ == null) {
count_ = null;
onChanged();
} else {
count_ = null;
countBuilder_ = null;
}
return this;
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public com.google.protobuf.Int64Value.Builder getCountBuilder() {
onChanged();
return getCountFieldBuilder().getBuilder();
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public com.google.protobuf.Int64ValueOrBuilder getCountOrBuilder() {
if (countBuilder_ != null) {
return countBuilder_.getMessageOrBuilder();
} else {
return count_ == null ?
com.google.protobuf.Int64Value.getDefaultInstance() : count_;
}
}
/**
*
* The number of values in the snapshot. Optional since some systems don't
* expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>
getCountFieldBuilder() {
if (countBuilder_ == null) {
countBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>(
getCount(),
getParentForChildren(),
isClean());
count_ = null;
}
return countBuilder_;
}
private com.google.protobuf.DoubleValue sum_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> sumBuilder_;
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return Whether the sum field is set.
*/
public boolean hasSum() {
return sumBuilder_ != null || sum_ != null;
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return The sum.
*/
public com.google.protobuf.DoubleValue getSum() {
if (sumBuilder_ == null) {
return sum_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : sum_;
} else {
return sumBuilder_.getMessage();
}
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public Builder setSum(com.google.protobuf.DoubleValue value) {
if (sumBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
sumBuilder_.setMessage(value);
}
return this;
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public Builder setSum(
com.google.protobuf.DoubleValue.Builder builderForValue) {
if (sumBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
sumBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public Builder mergeSum(com.google.protobuf.DoubleValue value) {
if (sumBuilder_ == null) {
if (sum_ != null) {
sum_ =
com.google.protobuf.DoubleValue.newBuilder(sum_).mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
sumBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public Builder clearSum() {
if (sumBuilder_ == null) {
sum_ = null;
onChanged();
} else {
sum_ = null;
sumBuilder_ = null;
}
return this;
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public com.google.protobuf.DoubleValue.Builder getSumBuilder() {
onChanged();
return getSumFieldBuilder().getBuilder();
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public com.google.protobuf.DoubleValueOrBuilder getSumOrBuilder() {
if (sumBuilder_ != null) {
return sumBuilder_.getMessageOrBuilder();
} else {
return sum_ == null ?
com.google.protobuf.DoubleValue.getDefaultInstance() : sum_;
}
}
/**
*
* The sum of values in the snapshot. Optional since some systems don't
* expose this. If count is zero then this field must be zero or not set
* (if not supported).
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>
getSumFieldBuilder() {
if (sumBuilder_ == null) {
sumBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>(
getSum(),
getParentForChildren(),
isClean());
sum_ = null;
}
return sumBuilder_;
}
private java.util.List percentileValues_ =
java.util.Collections.emptyList();
private void ensurePercentileValuesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
percentileValues_ = new java.util.ArrayList(percentileValues_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder> percentileValuesBuilder_;
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public java.util.List getPercentileValuesList() {
if (percentileValuesBuilder_ == null) {
return java.util.Collections.unmodifiableList(percentileValues_);
} else {
return percentileValuesBuilder_.getMessageList();
}
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public int getPercentileValuesCount() {
if (percentileValuesBuilder_ == null) {
return percentileValues_.size();
} else {
return percentileValuesBuilder_.getCount();
}
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile getPercentileValues(int index) {
if (percentileValuesBuilder_ == null) {
return percentileValues_.get(index);
} else {
return percentileValuesBuilder_.getMessage(index);
}
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public Builder setPercentileValues(
int index, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile value) {
if (percentileValuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePercentileValuesIsMutable();
percentileValues_.set(index, value);
onChanged();
} else {
percentileValuesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public Builder setPercentileValues(
int index, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder builderForValue) {
if (percentileValuesBuilder_ == null) {
ensurePercentileValuesIsMutable();
percentileValues_.set(index, builderForValue.build());
onChanged();
} else {
percentileValuesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public Builder addPercentileValues(io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile value) {
if (percentileValuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePercentileValuesIsMutable();
percentileValues_.add(value);
onChanged();
} else {
percentileValuesBuilder_.addMessage(value);
}
return this;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public Builder addPercentileValues(
int index, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile value) {
if (percentileValuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePercentileValuesIsMutable();
percentileValues_.add(index, value);
onChanged();
} else {
percentileValuesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public Builder addPercentileValues(
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder builderForValue) {
if (percentileValuesBuilder_ == null) {
ensurePercentileValuesIsMutable();
percentileValues_.add(builderForValue.build());
onChanged();
} else {
percentileValuesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public Builder addPercentileValues(
int index, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder builderForValue) {
if (percentileValuesBuilder_ == null) {
ensurePercentileValuesIsMutable();
percentileValues_.add(index, builderForValue.build());
onChanged();
} else {
percentileValuesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public Builder addAllPercentileValues(
java.lang.Iterable extends io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile> values) {
if (percentileValuesBuilder_ == null) {
ensurePercentileValuesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, percentileValues_);
onChanged();
} else {
percentileValuesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public Builder clearPercentileValues() {
if (percentileValuesBuilder_ == null) {
percentileValues_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
percentileValuesBuilder_.clear();
}
return this;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public Builder removePercentileValues(int index) {
if (percentileValuesBuilder_ == null) {
ensurePercentileValuesIsMutable();
percentileValues_.remove(index);
onChanged();
} else {
percentileValuesBuilder_.remove(index);
}
return this;
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder getPercentileValuesBuilder(
int index) {
return getPercentileValuesFieldBuilder().getBuilder(index);
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder getPercentileValuesOrBuilder(
int index) {
if (percentileValuesBuilder_ == null) {
return percentileValues_.get(index); } else {
return percentileValuesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public java.util.List extends io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder>
getPercentileValuesOrBuilderList() {
if (percentileValuesBuilder_ != null) {
return percentileValuesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(percentileValues_);
}
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder addPercentileValuesBuilder() {
return getPercentileValuesFieldBuilder().addBuilder(
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.getDefaultInstance());
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder addPercentileValuesBuilder(
int index) {
return getPercentileValuesFieldBuilder().addBuilder(
index, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.getDefaultInstance());
}
/**
*
* A list of values at different percentiles of the distribution calculated
* from the current snapshot. The percentiles must be strictly increasing.
*
*
* repeated .opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile percentile_values = 3;
*/
public java.util.List
getPercentileValuesBuilderList() {
return getPercentileValuesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder>
getPercentileValuesFieldBuilder() {
if (percentileValuesBuilder_ == null) {
percentileValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile.Builder, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentileOrBuilder>(
percentileValues_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
percentileValues_ = null;
}
return percentileValuesBuilder_;
}
@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.SummaryValue.Snapshot)
}
// @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.SummaryValue.Snapshot)
private static final io.opencensus.proto.metrics.v1.SummaryValue.Snapshot DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencensus.proto.metrics.v1.SummaryValue.Snapshot();
}
public static io.opencensus.proto.metrics.v1.SummaryValue.Snapshot getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Snapshot parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Snapshot(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.SummaryValue.Snapshot getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int COUNT_FIELD_NUMBER = 1;
private com.google.protobuf.Int64Value count_;
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return Whether the count field is set.
*/
@java.lang.Override
public boolean hasCount() {
return count_ != null;
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return The count.
*/
@java.lang.Override
public com.google.protobuf.Int64Value getCount() {
return count_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : count_;
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
@java.lang.Override
public com.google.protobuf.Int64ValueOrBuilder getCountOrBuilder() {
return getCount();
}
public static final int SUM_FIELD_NUMBER = 2;
private com.google.protobuf.DoubleValue sum_;
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return Whether the sum field is set.
*/
@java.lang.Override
public boolean hasSum() {
return sum_ != null;
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return The sum.
*/
@java.lang.Override
public com.google.protobuf.DoubleValue getSum() {
return sum_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : sum_;
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
@java.lang.Override
public com.google.protobuf.DoubleValueOrBuilder getSumOrBuilder() {
return getSum();
}
public static final int SNAPSHOT_FIELD_NUMBER = 3;
private io.opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot_;
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
* @return Whether the snapshot field is set.
*/
@java.lang.Override
public boolean hasSnapshot() {
return snapshot_ != null;
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
* @return The snapshot.
*/
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot getSnapshot() {
return snapshot_ == null ? io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.getDefaultInstance() : snapshot_;
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
*/
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue.SnapshotOrBuilder getSnapshotOrBuilder() {
return getSnapshot();
}
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_ != null) {
output.writeMessage(1, getCount());
}
if (sum_ != null) {
output.writeMessage(2, getSum());
}
if (snapshot_ != null) {
output.writeMessage(3, getSnapshot());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (count_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getCount());
}
if (sum_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getSum());
}
if (snapshot_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getSnapshot());
}
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.SummaryValue)) {
return super.equals(obj);
}
io.opencensus.proto.metrics.v1.SummaryValue other = (io.opencensus.proto.metrics.v1.SummaryValue) obj;
if (hasCount() != other.hasCount()) return false;
if (hasCount()) {
if (!getCount()
.equals(other.getCount())) return false;
}
if (hasSum() != other.hasSum()) return false;
if (hasSum()) {
if (!getSum()
.equals(other.getSum())) return false;
}
if (hasSnapshot() != other.hasSnapshot()) return false;
if (hasSnapshot()) {
if (!getSnapshot()
.equals(other.getSnapshot())) 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 (hasCount()) {
hash = (37 * hash) + COUNT_FIELD_NUMBER;
hash = (53 * hash) + getCount().hashCode();
}
if (hasSum()) {
hash = (37 * hash) + SUM_FIELD_NUMBER;
hash = (53 * hash) + getSum().hashCode();
}
if (hasSnapshot()) {
hash = (37 * hash) + SNAPSHOT_FIELD_NUMBER;
hash = (53 * hash) + getSnapshot().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencensus.proto.metrics.v1.SummaryValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.SummaryValue 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.SummaryValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.SummaryValue 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.SummaryValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.metrics.v1.SummaryValue 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.SummaryValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.SummaryValue 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.SummaryValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencensus.proto.metrics.v1.SummaryValue 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.SummaryValue 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.SummaryValue 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.SummaryValue prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The start_timestamp only applies to the count and sum in the SummaryValue.
*
*
* Protobuf type {@code opencensus.proto.metrics.v1.SummaryValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opencensus.proto.metrics.v1.SummaryValue)
io.opencensus.proto.metrics.v1.SummaryValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_SummaryValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.metrics.v1.MetricsProto.internal_static_opencensus_proto_metrics_v1_SummaryValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.metrics.v1.SummaryValue.class, io.opencensus.proto.metrics.v1.SummaryValue.Builder.class);
}
// Construct using io.opencensus.proto.metrics.v1.SummaryValue.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();
if (countBuilder_ == null) {
count_ = null;
} else {
count_ = null;
countBuilder_ = null;
}
if (sumBuilder_ == null) {
sum_ = null;
} else {
sum_ = null;
sumBuilder_ = null;
}
if (snapshotBuilder_ == null) {
snapshot_ = null;
} else {
snapshot_ = null;
snapshotBuilder_ = 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_SummaryValue_descriptor;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue getDefaultInstanceForType() {
return io.opencensus.proto.metrics.v1.SummaryValue.getDefaultInstance();
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue build() {
io.opencensus.proto.metrics.v1.SummaryValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencensus.proto.metrics.v1.SummaryValue buildPartial() {
io.opencensus.proto.metrics.v1.SummaryValue result = new io.opencensus.proto.metrics.v1.SummaryValue(this);
if (countBuilder_ == null) {
result.count_ = count_;
} else {
result.count_ = countBuilder_.build();
}
if (sumBuilder_ == null) {
result.sum_ = sum_;
} else {
result.sum_ = sumBuilder_.build();
}
if (snapshotBuilder_ == null) {
result.snapshot_ = snapshot_;
} else {
result.snapshot_ = snapshotBuilder_.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.SummaryValue) {
return mergeFrom((io.opencensus.proto.metrics.v1.SummaryValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencensus.proto.metrics.v1.SummaryValue other) {
if (other == io.opencensus.proto.metrics.v1.SummaryValue.getDefaultInstance()) return this;
if (other.hasCount()) {
mergeCount(other.getCount());
}
if (other.hasSum()) {
mergeSum(other.getSum());
}
if (other.hasSnapshot()) {
mergeSnapshot(other.getSnapshot());
}
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.SummaryValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencensus.proto.metrics.v1.SummaryValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.Int64Value count_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> countBuilder_;
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return Whether the count field is set.
*/
public boolean hasCount() {
return countBuilder_ != null || count_ != null;
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
* @return The count.
*/
public com.google.protobuf.Int64Value getCount() {
if (countBuilder_ == null) {
return count_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : count_;
} else {
return countBuilder_.getMessage();
}
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public Builder setCount(com.google.protobuf.Int64Value value) {
if (countBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
count_ = value;
onChanged();
} else {
countBuilder_.setMessage(value);
}
return this;
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public Builder setCount(
com.google.protobuf.Int64Value.Builder builderForValue) {
if (countBuilder_ == null) {
count_ = builderForValue.build();
onChanged();
} else {
countBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public Builder mergeCount(com.google.protobuf.Int64Value value) {
if (countBuilder_ == null) {
if (count_ != null) {
count_ =
com.google.protobuf.Int64Value.newBuilder(count_).mergeFrom(value).buildPartial();
} else {
count_ = value;
}
onChanged();
} else {
countBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public Builder clearCount() {
if (countBuilder_ == null) {
count_ = null;
onChanged();
} else {
count_ = null;
countBuilder_ = null;
}
return this;
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public com.google.protobuf.Int64Value.Builder getCountBuilder() {
onChanged();
return getCountFieldBuilder().getBuilder();
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
public com.google.protobuf.Int64ValueOrBuilder getCountOrBuilder() {
if (countBuilder_ != null) {
return countBuilder_.getMessageOrBuilder();
} else {
return count_ == null ?
com.google.protobuf.Int64Value.getDefaultInstance() : count_;
}
}
/**
*
* The total number of recorded values since start_time. Optional since
* some systems don't expose this.
*
*
* .google.protobuf.Int64Value count = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>
getCountFieldBuilder() {
if (countBuilder_ == null) {
countBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>(
getCount(),
getParentForChildren(),
isClean());
count_ = null;
}
return countBuilder_;
}
private com.google.protobuf.DoubleValue sum_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> sumBuilder_;
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return Whether the sum field is set.
*/
public boolean hasSum() {
return sumBuilder_ != null || sum_ != null;
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
* @return The sum.
*/
public com.google.protobuf.DoubleValue getSum() {
if (sumBuilder_ == null) {
return sum_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : sum_;
} else {
return sumBuilder_.getMessage();
}
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public Builder setSum(com.google.protobuf.DoubleValue value) {
if (sumBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sum_ = value;
onChanged();
} else {
sumBuilder_.setMessage(value);
}
return this;
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public Builder setSum(
com.google.protobuf.DoubleValue.Builder builderForValue) {
if (sumBuilder_ == null) {
sum_ = builderForValue.build();
onChanged();
} else {
sumBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public Builder mergeSum(com.google.protobuf.DoubleValue value) {
if (sumBuilder_ == null) {
if (sum_ != null) {
sum_ =
com.google.protobuf.DoubleValue.newBuilder(sum_).mergeFrom(value).buildPartial();
} else {
sum_ = value;
}
onChanged();
} else {
sumBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public Builder clearSum() {
if (sumBuilder_ == null) {
sum_ = null;
onChanged();
} else {
sum_ = null;
sumBuilder_ = null;
}
return this;
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public com.google.protobuf.DoubleValue.Builder getSumBuilder() {
onChanged();
return getSumFieldBuilder().getBuilder();
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
public com.google.protobuf.DoubleValueOrBuilder getSumOrBuilder() {
if (sumBuilder_ != null) {
return sumBuilder_.getMessageOrBuilder();
} else {
return sum_ == null ?
com.google.protobuf.DoubleValue.getDefaultInstance() : sum_;
}
}
/**
*
* The total sum of recorded values since start_time. Optional since some
* systems don't expose this. If count is zero then this field must be zero.
* This field must be unset if the sum is not available.
*
*
* .google.protobuf.DoubleValue sum = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>
getSumFieldBuilder() {
if (sumBuilder_ == null) {
sumBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>(
getSum(),
getParentForChildren(),
isClean());
sum_ = null;
}
return sumBuilder_;
}
private io.opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.Builder, io.opencensus.proto.metrics.v1.SummaryValue.SnapshotOrBuilder> snapshotBuilder_;
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
* @return Whether the snapshot field is set.
*/
public boolean hasSnapshot() {
return snapshotBuilder_ != null || snapshot_ != null;
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
* @return The snapshot.
*/
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot getSnapshot() {
if (snapshotBuilder_ == null) {
return snapshot_ == null ? io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.getDefaultInstance() : snapshot_;
} else {
return snapshotBuilder_.getMessage();
}
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
*/
public Builder setSnapshot(io.opencensus.proto.metrics.v1.SummaryValue.Snapshot value) {
if (snapshotBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
snapshot_ = value;
onChanged();
} else {
snapshotBuilder_.setMessage(value);
}
return this;
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
*/
public Builder setSnapshot(
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.Builder builderForValue) {
if (snapshotBuilder_ == null) {
snapshot_ = builderForValue.build();
onChanged();
} else {
snapshotBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
*/
public Builder mergeSnapshot(io.opencensus.proto.metrics.v1.SummaryValue.Snapshot value) {
if (snapshotBuilder_ == null) {
if (snapshot_ != null) {
snapshot_ =
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.newBuilder(snapshot_).mergeFrom(value).buildPartial();
} else {
snapshot_ = value;
}
onChanged();
} else {
snapshotBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
*/
public Builder clearSnapshot() {
if (snapshotBuilder_ == null) {
snapshot_ = null;
onChanged();
} else {
snapshot_ = null;
snapshotBuilder_ = null;
}
return this;
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
*/
public io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.Builder getSnapshotBuilder() {
onChanged();
return getSnapshotFieldBuilder().getBuilder();
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
*/
public io.opencensus.proto.metrics.v1.SummaryValue.SnapshotOrBuilder getSnapshotOrBuilder() {
if (snapshotBuilder_ != null) {
return snapshotBuilder_.getMessageOrBuilder();
} else {
return snapshot_ == null ?
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.getDefaultInstance() : snapshot_;
}
}
/**
*
* Values calculated over an arbitrary time window.
*
*
* .opencensus.proto.metrics.v1.SummaryValue.Snapshot snapshot = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.Builder, io.opencensus.proto.metrics.v1.SummaryValue.SnapshotOrBuilder>
getSnapshotFieldBuilder() {
if (snapshotBuilder_ == null) {
snapshotBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.metrics.v1.SummaryValue.Snapshot, io.opencensus.proto.metrics.v1.SummaryValue.Snapshot.Builder, io.opencensus.proto.metrics.v1.SummaryValue.SnapshotOrBuilder>(
getSnapshot(),
getParentForChildren(),
isClean());
snapshot_ = null;
}
return snapshotBuilder_;
}
@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.SummaryValue)
}
// @@protoc_insertion_point(class_scope:opencensus.proto.metrics.v1.SummaryValue)
private static final io.opencensus.proto.metrics.v1.SummaryValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencensus.proto.metrics.v1.SummaryValue();
}
public static io.opencensus.proto.metrics.v1.SummaryValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SummaryValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SummaryValue(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.SummaryValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}