implements
// @@protoc_insertion_point(builder_implements:opencensus.proto.stats.v1.View)
io.opencensus.proto.stats.v1.ViewOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.stats.v1.StatsProto.internal_static_opencensus_proto_stats_v1_View_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.stats.v1.StatsProto.internal_static_opencensus_proto_stats_v1_View_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.stats.v1.View.class, io.opencensus.proto.stats.v1.View.Builder.class);
}
// Construct using io.opencensus.proto.stats.v1.View.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();
name_ = "";
description_ = "";
if (measureBuilder_ == null) {
measure_ = null;
} else {
measure_ = null;
measureBuilder_ = null;
}
columns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
aggregationCase_ = 0;
aggregation_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opencensus.proto.stats.v1.StatsProto.internal_static_opencensus_proto_stats_v1_View_descriptor;
}
@java.lang.Override
public io.opencensus.proto.stats.v1.View getDefaultInstanceForType() {
return io.opencensus.proto.stats.v1.View.getDefaultInstance();
}
@java.lang.Override
public io.opencensus.proto.stats.v1.View build() {
io.opencensus.proto.stats.v1.View result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opencensus.proto.stats.v1.View buildPartial() {
io.opencensus.proto.stats.v1.View result = new io.opencensus.proto.stats.v1.View(this);
int from_bitField0_ = bitField0_;
result.name_ = name_;
result.description_ = description_;
if (measureBuilder_ == null) {
result.measure_ = measure_;
} else {
result.measure_ = measureBuilder_.build();
}
if (((bitField0_ & 0x00000001) != 0)) {
columns_ = columns_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.columns_ = columns_;
if (aggregationCase_ == 5) {
if (countAggregationBuilder_ == null) {
result.aggregation_ = aggregation_;
} else {
result.aggregation_ = countAggregationBuilder_.build();
}
}
if (aggregationCase_ == 6) {
if (sumAggregationBuilder_ == null) {
result.aggregation_ = aggregation_;
} else {
result.aggregation_ = sumAggregationBuilder_.build();
}
}
if (aggregationCase_ == 7) {
if (lastValueAggregationBuilder_ == null) {
result.aggregation_ = aggregation_;
} else {
result.aggregation_ = lastValueAggregationBuilder_.build();
}
}
if (aggregationCase_ == 8) {
if (distributionAggregationBuilder_ == null) {
result.aggregation_ = aggregation_;
} else {
result.aggregation_ = distributionAggregationBuilder_.build();
}
}
result.aggregationCase_ = aggregationCase_;
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.stats.v1.View) {
return mergeFrom((io.opencensus.proto.stats.v1.View)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opencensus.proto.stats.v1.View other) {
if (other == io.opencensus.proto.stats.v1.View.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasMeasure()) {
mergeMeasure(other.getMeasure());
}
if (!other.columns_.isEmpty()) {
if (columns_.isEmpty()) {
columns_ = other.columns_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureColumnsIsMutable();
columns_.addAll(other.columns_);
}
onChanged();
}
switch (other.getAggregationCase()) {
case COUNT_AGGREGATION: {
mergeCountAggregation(other.getCountAggregation());
break;
}
case SUM_AGGREGATION: {
mergeSumAggregation(other.getSumAggregation());
break;
}
case LAST_VALUE_AGGREGATION: {
mergeLastValueAggregation(other.getLastValueAggregation());
break;
}
case DISTRIBUTION_AGGREGATION: {
mergeDistributionAggregation(other.getDistributionAggregation());
break;
}
case AGGREGATION_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.opencensus.proto.stats.v1.View parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opencensus.proto.stats.v1.View) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int aggregationCase_ = 0;
private java.lang.Object aggregation_;
public AggregationCase
getAggregationCase() {
return AggregationCase.forNumber(
aggregationCase_);
}
public Builder clearAggregation() {
aggregationCase_ = 0;
aggregation_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* A string by which the View will be referred to, e.g. "rpc_latency". Names MUST be unique
* within the library.
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A string by which the View will be referred to, e.g. "rpc_latency". Names MUST be unique
* within the library.
*
*
* string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A string by which the View will be referred to, e.g. "rpc_latency". Names MUST be unique
* within the library.
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* A string by which the View will be referred to, e.g. "rpc_latency". Names MUST be unique
* within the library.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* A string by which the View will be referred to, e.g. "rpc_latency". Names MUST be unique
* within the library.
*
*
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* Describes the view, e.g. "RPC latency distribution"
*
*
* string description = 2;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Describes the view, e.g. "RPC latency distribution"
*
*
* string description = 2;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Describes the view, e.g. "RPC latency distribution"
*
*
* string description = 2;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Describes the view, e.g. "RPC latency distribution"
*
*
* string description = 2;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Describes the view, e.g. "RPC latency distribution"
*
*
* string description = 2;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private io.opencensus.proto.stats.v1.Measure measure_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.Measure, io.opencensus.proto.stats.v1.Measure.Builder, io.opencensus.proto.stats.v1.MeasureOrBuilder> measureBuilder_;
/**
*
* The Measure to which this view is applied.
*
*
* .opencensus.proto.stats.v1.Measure measure = 3;
* @return Whether the measure field is set.
*/
public boolean hasMeasure() {
return measureBuilder_ != null || measure_ != null;
}
/**
*
* The Measure to which this view is applied.
*
*
* .opencensus.proto.stats.v1.Measure measure = 3;
* @return The measure.
*/
public io.opencensus.proto.stats.v1.Measure getMeasure() {
if (measureBuilder_ == null) {
return measure_ == null ? io.opencensus.proto.stats.v1.Measure.getDefaultInstance() : measure_;
} else {
return measureBuilder_.getMessage();
}
}
/**
*
* The Measure to which this view is applied.
*
*
* .opencensus.proto.stats.v1.Measure measure = 3;
*/
public Builder setMeasure(io.opencensus.proto.stats.v1.Measure value) {
if (measureBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
measure_ = value;
onChanged();
} else {
measureBuilder_.setMessage(value);
}
return this;
}
/**
*
* The Measure to which this view is applied.
*
*
* .opencensus.proto.stats.v1.Measure measure = 3;
*/
public Builder setMeasure(
io.opencensus.proto.stats.v1.Measure.Builder builderForValue) {
if (measureBuilder_ == null) {
measure_ = builderForValue.build();
onChanged();
} else {
measureBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The Measure to which this view is applied.
*
*
* .opencensus.proto.stats.v1.Measure measure = 3;
*/
public Builder mergeMeasure(io.opencensus.proto.stats.v1.Measure value) {
if (measureBuilder_ == null) {
if (measure_ != null) {
measure_ =
io.opencensus.proto.stats.v1.Measure.newBuilder(measure_).mergeFrom(value).buildPartial();
} else {
measure_ = value;
}
onChanged();
} else {
measureBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The Measure to which this view is applied.
*
*
* .opencensus.proto.stats.v1.Measure measure = 3;
*/
public Builder clearMeasure() {
if (measureBuilder_ == null) {
measure_ = null;
onChanged();
} else {
measure_ = null;
measureBuilder_ = null;
}
return this;
}
/**
*
* The Measure to which this view is applied.
*
*
* .opencensus.proto.stats.v1.Measure measure = 3;
*/
public io.opencensus.proto.stats.v1.Measure.Builder getMeasureBuilder() {
onChanged();
return getMeasureFieldBuilder().getBuilder();
}
/**
*
* The Measure to which this view is applied.
*
*
* .opencensus.proto.stats.v1.Measure measure = 3;
*/
public io.opencensus.proto.stats.v1.MeasureOrBuilder getMeasureOrBuilder() {
if (measureBuilder_ != null) {
return measureBuilder_.getMessageOrBuilder();
} else {
return measure_ == null ?
io.opencensus.proto.stats.v1.Measure.getDefaultInstance() : measure_;
}
}
/**
*
* The Measure to which this view is applied.
*
*
* .opencensus.proto.stats.v1.Measure measure = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.Measure, io.opencensus.proto.stats.v1.Measure.Builder, io.opencensus.proto.stats.v1.MeasureOrBuilder>
getMeasureFieldBuilder() {
if (measureBuilder_ == null) {
measureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.Measure, io.opencensus.proto.stats.v1.Measure.Builder, io.opencensus.proto.stats.v1.MeasureOrBuilder>(
getMeasure(),
getParentForChildren(),
isClean());
measure_ = null;
}
return measureBuilder_;
}
private com.google.protobuf.LazyStringList columns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureColumnsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
columns_ = new com.google.protobuf.LazyStringArrayList(columns_);
bitField0_ |= 0x00000001;
}
}
/**
*
* An array of tag keys. These values associated with tags of this name form the basis by which
* individual stats will be aggregated (one aggregation per unique tag value). If none are
* provided, then all data is recorded in a single aggregation.
*
*
* repeated string columns = 4;
* @return A list containing the columns.
*/
public com.google.protobuf.ProtocolStringList
getColumnsList() {
return columns_.getUnmodifiableView();
}
/**
*
* An array of tag keys. These values associated with tags of this name form the basis by which
* individual stats will be aggregated (one aggregation per unique tag value). If none are
* provided, then all data is recorded in a single aggregation.
*
*
* repeated string columns = 4;
* @return The count of columns.
*/
public int getColumnsCount() {
return columns_.size();
}
/**
*
* An array of tag keys. These values associated with tags of this name form the basis by which
* individual stats will be aggregated (one aggregation per unique tag value). If none are
* provided, then all data is recorded in a single aggregation.
*
*
* repeated string columns = 4;
* @param index The index of the element to return.
* @return The columns at the given index.
*/
public java.lang.String getColumns(int index) {
return columns_.get(index);
}
/**
*
* An array of tag keys. These values associated with tags of this name form the basis by which
* individual stats will be aggregated (one aggregation per unique tag value). If none are
* provided, then all data is recorded in a single aggregation.
*
*
* repeated string columns = 4;
* @param index The index of the value to return.
* @return The bytes of the columns at the given index.
*/
public com.google.protobuf.ByteString
getColumnsBytes(int index) {
return columns_.getByteString(index);
}
/**
*
* An array of tag keys. These values associated with tags of this name form the basis by which
* individual stats will be aggregated (one aggregation per unique tag value). If none are
* provided, then all data is recorded in a single aggregation.
*
*
* repeated string columns = 4;
* @param index The index to set the value at.
* @param value The columns to set.
* @return This builder for chaining.
*/
public Builder setColumns(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureColumnsIsMutable();
columns_.set(index, value);
onChanged();
return this;
}
/**
*
* An array of tag keys. These values associated with tags of this name form the basis by which
* individual stats will be aggregated (one aggregation per unique tag value). If none are
* provided, then all data is recorded in a single aggregation.
*
*
* repeated string columns = 4;
* @param value The columns to add.
* @return This builder for chaining.
*/
public Builder addColumns(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureColumnsIsMutable();
columns_.add(value);
onChanged();
return this;
}
/**
*
* An array of tag keys. These values associated with tags of this name form the basis by which
* individual stats will be aggregated (one aggregation per unique tag value). If none are
* provided, then all data is recorded in a single aggregation.
*
*
* repeated string columns = 4;
* @param values The columns to add.
* @return This builder for chaining.
*/
public Builder addAllColumns(
java.lang.Iterable values) {
ensureColumnsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, columns_);
onChanged();
return this;
}
/**
*
* An array of tag keys. These values associated with tags of this name form the basis by which
* individual stats will be aggregated (one aggregation per unique tag value). If none are
* provided, then all data is recorded in a single aggregation.
*
*
* repeated string columns = 4;
* @return This builder for chaining.
*/
public Builder clearColumns() {
columns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* An array of tag keys. These values associated with tags of this name form the basis by which
* individual stats will be aggregated (one aggregation per unique tag value). If none are
* provided, then all data is recorded in a single aggregation.
*
*
* repeated string columns = 4;
* @param value The bytes of the columns to add.
* @return This builder for chaining.
*/
public Builder addColumnsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureColumnsIsMutable();
columns_.add(value);
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.CountAggregation, io.opencensus.proto.stats.v1.CountAggregation.Builder, io.opencensus.proto.stats.v1.CountAggregationOrBuilder> countAggregationBuilder_;
/**
*
* Counts the number of measurements recorded.
*
*
* .opencensus.proto.stats.v1.CountAggregation count_aggregation = 5;
* @return Whether the countAggregation field is set.
*/
@java.lang.Override
public boolean hasCountAggregation() {
return aggregationCase_ == 5;
}
/**
*
* Counts the number of measurements recorded.
*
*
* .opencensus.proto.stats.v1.CountAggregation count_aggregation = 5;
* @return The countAggregation.
*/
@java.lang.Override
public io.opencensus.proto.stats.v1.CountAggregation getCountAggregation() {
if (countAggregationBuilder_ == null) {
if (aggregationCase_ == 5) {
return (io.opencensus.proto.stats.v1.CountAggregation) aggregation_;
}
return io.opencensus.proto.stats.v1.CountAggregation.getDefaultInstance();
} else {
if (aggregationCase_ == 5) {
return countAggregationBuilder_.getMessage();
}
return io.opencensus.proto.stats.v1.CountAggregation.getDefaultInstance();
}
}
/**
*
* Counts the number of measurements recorded.
*
*
* .opencensus.proto.stats.v1.CountAggregation count_aggregation = 5;
*/
public Builder setCountAggregation(io.opencensus.proto.stats.v1.CountAggregation value) {
if (countAggregationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
aggregation_ = value;
onChanged();
} else {
countAggregationBuilder_.setMessage(value);
}
aggregationCase_ = 5;
return this;
}
/**
*
* Counts the number of measurements recorded.
*
*
* .opencensus.proto.stats.v1.CountAggregation count_aggregation = 5;
*/
public Builder setCountAggregation(
io.opencensus.proto.stats.v1.CountAggregation.Builder builderForValue) {
if (countAggregationBuilder_ == null) {
aggregation_ = builderForValue.build();
onChanged();
} else {
countAggregationBuilder_.setMessage(builderForValue.build());
}
aggregationCase_ = 5;
return this;
}
/**
*
* Counts the number of measurements recorded.
*
*
* .opencensus.proto.stats.v1.CountAggregation count_aggregation = 5;
*/
public Builder mergeCountAggregation(io.opencensus.proto.stats.v1.CountAggregation value) {
if (countAggregationBuilder_ == null) {
if (aggregationCase_ == 5 &&
aggregation_ != io.opencensus.proto.stats.v1.CountAggregation.getDefaultInstance()) {
aggregation_ = io.opencensus.proto.stats.v1.CountAggregation.newBuilder((io.opencensus.proto.stats.v1.CountAggregation) aggregation_)
.mergeFrom(value).buildPartial();
} else {
aggregation_ = value;
}
onChanged();
} else {
if (aggregationCase_ == 5) {
countAggregationBuilder_.mergeFrom(value);
} else {
countAggregationBuilder_.setMessage(value);
}
}
aggregationCase_ = 5;
return this;
}
/**
*
* Counts the number of measurements recorded.
*
*
* .opencensus.proto.stats.v1.CountAggregation count_aggregation = 5;
*/
public Builder clearCountAggregation() {
if (countAggregationBuilder_ == null) {
if (aggregationCase_ == 5) {
aggregationCase_ = 0;
aggregation_ = null;
onChanged();
}
} else {
if (aggregationCase_ == 5) {
aggregationCase_ = 0;
aggregation_ = null;
}
countAggregationBuilder_.clear();
}
return this;
}
/**
*
* Counts the number of measurements recorded.
*
*
* .opencensus.proto.stats.v1.CountAggregation count_aggregation = 5;
*/
public io.opencensus.proto.stats.v1.CountAggregation.Builder getCountAggregationBuilder() {
return getCountAggregationFieldBuilder().getBuilder();
}
/**
*
* Counts the number of measurements recorded.
*
*
* .opencensus.proto.stats.v1.CountAggregation count_aggregation = 5;
*/
@java.lang.Override
public io.opencensus.proto.stats.v1.CountAggregationOrBuilder getCountAggregationOrBuilder() {
if ((aggregationCase_ == 5) && (countAggregationBuilder_ != null)) {
return countAggregationBuilder_.getMessageOrBuilder();
} else {
if (aggregationCase_ == 5) {
return (io.opencensus.proto.stats.v1.CountAggregation) aggregation_;
}
return io.opencensus.proto.stats.v1.CountAggregation.getDefaultInstance();
}
}
/**
*
* Counts the number of measurements recorded.
*
*
* .opencensus.proto.stats.v1.CountAggregation count_aggregation = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.CountAggregation, io.opencensus.proto.stats.v1.CountAggregation.Builder, io.opencensus.proto.stats.v1.CountAggregationOrBuilder>
getCountAggregationFieldBuilder() {
if (countAggregationBuilder_ == null) {
if (!(aggregationCase_ == 5)) {
aggregation_ = io.opencensus.proto.stats.v1.CountAggregation.getDefaultInstance();
}
countAggregationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.CountAggregation, io.opencensus.proto.stats.v1.CountAggregation.Builder, io.opencensus.proto.stats.v1.CountAggregationOrBuilder>(
(io.opencensus.proto.stats.v1.CountAggregation) aggregation_,
getParentForChildren(),
isClean());
aggregation_ = null;
}
aggregationCase_ = 5;
onChanged();;
return countAggregationBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.SumAggregation, io.opencensus.proto.stats.v1.SumAggregation.Builder, io.opencensus.proto.stats.v1.SumAggregationOrBuilder> sumAggregationBuilder_;
/**
*
* Indicates that data collected and aggregated with this Aggregation will be summed up.
*
*
* .opencensus.proto.stats.v1.SumAggregation sum_aggregation = 6;
* @return Whether the sumAggregation field is set.
*/
@java.lang.Override
public boolean hasSumAggregation() {
return aggregationCase_ == 6;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will be summed up.
*
*
* .opencensus.proto.stats.v1.SumAggregation sum_aggregation = 6;
* @return The sumAggregation.
*/
@java.lang.Override
public io.opencensus.proto.stats.v1.SumAggregation getSumAggregation() {
if (sumAggregationBuilder_ == null) {
if (aggregationCase_ == 6) {
return (io.opencensus.proto.stats.v1.SumAggregation) aggregation_;
}
return io.opencensus.proto.stats.v1.SumAggregation.getDefaultInstance();
} else {
if (aggregationCase_ == 6) {
return sumAggregationBuilder_.getMessage();
}
return io.opencensus.proto.stats.v1.SumAggregation.getDefaultInstance();
}
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will be summed up.
*
*
* .opencensus.proto.stats.v1.SumAggregation sum_aggregation = 6;
*/
public Builder setSumAggregation(io.opencensus.proto.stats.v1.SumAggregation value) {
if (sumAggregationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
aggregation_ = value;
onChanged();
} else {
sumAggregationBuilder_.setMessage(value);
}
aggregationCase_ = 6;
return this;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will be summed up.
*
*
* .opencensus.proto.stats.v1.SumAggregation sum_aggregation = 6;
*/
public Builder setSumAggregation(
io.opencensus.proto.stats.v1.SumAggregation.Builder builderForValue) {
if (sumAggregationBuilder_ == null) {
aggregation_ = builderForValue.build();
onChanged();
} else {
sumAggregationBuilder_.setMessage(builderForValue.build());
}
aggregationCase_ = 6;
return this;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will be summed up.
*
*
* .opencensus.proto.stats.v1.SumAggregation sum_aggregation = 6;
*/
public Builder mergeSumAggregation(io.opencensus.proto.stats.v1.SumAggregation value) {
if (sumAggregationBuilder_ == null) {
if (aggregationCase_ == 6 &&
aggregation_ != io.opencensus.proto.stats.v1.SumAggregation.getDefaultInstance()) {
aggregation_ = io.opencensus.proto.stats.v1.SumAggregation.newBuilder((io.opencensus.proto.stats.v1.SumAggregation) aggregation_)
.mergeFrom(value).buildPartial();
} else {
aggregation_ = value;
}
onChanged();
} else {
if (aggregationCase_ == 6) {
sumAggregationBuilder_.mergeFrom(value);
} else {
sumAggregationBuilder_.setMessage(value);
}
}
aggregationCase_ = 6;
return this;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will be summed up.
*
*
* .opencensus.proto.stats.v1.SumAggregation sum_aggregation = 6;
*/
public Builder clearSumAggregation() {
if (sumAggregationBuilder_ == null) {
if (aggregationCase_ == 6) {
aggregationCase_ = 0;
aggregation_ = null;
onChanged();
}
} else {
if (aggregationCase_ == 6) {
aggregationCase_ = 0;
aggregation_ = null;
}
sumAggregationBuilder_.clear();
}
return this;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will be summed up.
*
*
* .opencensus.proto.stats.v1.SumAggregation sum_aggregation = 6;
*/
public io.opencensus.proto.stats.v1.SumAggregation.Builder getSumAggregationBuilder() {
return getSumAggregationFieldBuilder().getBuilder();
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will be summed up.
*
*
* .opencensus.proto.stats.v1.SumAggregation sum_aggregation = 6;
*/
@java.lang.Override
public io.opencensus.proto.stats.v1.SumAggregationOrBuilder getSumAggregationOrBuilder() {
if ((aggregationCase_ == 6) && (sumAggregationBuilder_ != null)) {
return sumAggregationBuilder_.getMessageOrBuilder();
} else {
if (aggregationCase_ == 6) {
return (io.opencensus.proto.stats.v1.SumAggregation) aggregation_;
}
return io.opencensus.proto.stats.v1.SumAggregation.getDefaultInstance();
}
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will be summed up.
*
*
* .opencensus.proto.stats.v1.SumAggregation sum_aggregation = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.SumAggregation, io.opencensus.proto.stats.v1.SumAggregation.Builder, io.opencensus.proto.stats.v1.SumAggregationOrBuilder>
getSumAggregationFieldBuilder() {
if (sumAggregationBuilder_ == null) {
if (!(aggregationCase_ == 6)) {
aggregation_ = io.opencensus.proto.stats.v1.SumAggregation.getDefaultInstance();
}
sumAggregationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.SumAggregation, io.opencensus.proto.stats.v1.SumAggregation.Builder, io.opencensus.proto.stats.v1.SumAggregationOrBuilder>(
(io.opencensus.proto.stats.v1.SumAggregation) aggregation_,
getParentForChildren(),
isClean());
aggregation_ = null;
}
aggregationCase_ = 6;
onChanged();;
return sumAggregationBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.LastValueAggregation, io.opencensus.proto.stats.v1.LastValueAggregation.Builder, io.opencensus.proto.stats.v1.LastValueAggregationOrBuilder> lastValueAggregationBuilder_;
/**
*
* Indicates that data collected and aggregated with this Aggregation will represent the last
* recorded value. This is useful to support Gauges.
*
*
* .opencensus.proto.stats.v1.LastValueAggregation last_value_aggregation = 7;
* @return Whether the lastValueAggregation field is set.
*/
@java.lang.Override
public boolean hasLastValueAggregation() {
return aggregationCase_ == 7;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will represent the last
* recorded value. This is useful to support Gauges.
*
*
* .opencensus.proto.stats.v1.LastValueAggregation last_value_aggregation = 7;
* @return The lastValueAggregation.
*/
@java.lang.Override
public io.opencensus.proto.stats.v1.LastValueAggregation getLastValueAggregation() {
if (lastValueAggregationBuilder_ == null) {
if (aggregationCase_ == 7) {
return (io.opencensus.proto.stats.v1.LastValueAggregation) aggregation_;
}
return io.opencensus.proto.stats.v1.LastValueAggregation.getDefaultInstance();
} else {
if (aggregationCase_ == 7) {
return lastValueAggregationBuilder_.getMessage();
}
return io.opencensus.proto.stats.v1.LastValueAggregation.getDefaultInstance();
}
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will represent the last
* recorded value. This is useful to support Gauges.
*
*
* .opencensus.proto.stats.v1.LastValueAggregation last_value_aggregation = 7;
*/
public Builder setLastValueAggregation(io.opencensus.proto.stats.v1.LastValueAggregation value) {
if (lastValueAggregationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
aggregation_ = value;
onChanged();
} else {
lastValueAggregationBuilder_.setMessage(value);
}
aggregationCase_ = 7;
return this;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will represent the last
* recorded value. This is useful to support Gauges.
*
*
* .opencensus.proto.stats.v1.LastValueAggregation last_value_aggregation = 7;
*/
public Builder setLastValueAggregation(
io.opencensus.proto.stats.v1.LastValueAggregation.Builder builderForValue) {
if (lastValueAggregationBuilder_ == null) {
aggregation_ = builderForValue.build();
onChanged();
} else {
lastValueAggregationBuilder_.setMessage(builderForValue.build());
}
aggregationCase_ = 7;
return this;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will represent the last
* recorded value. This is useful to support Gauges.
*
*
* .opencensus.proto.stats.v1.LastValueAggregation last_value_aggregation = 7;
*/
public Builder mergeLastValueAggregation(io.opencensus.proto.stats.v1.LastValueAggregation value) {
if (lastValueAggregationBuilder_ == null) {
if (aggregationCase_ == 7 &&
aggregation_ != io.opencensus.proto.stats.v1.LastValueAggregation.getDefaultInstance()) {
aggregation_ = io.opencensus.proto.stats.v1.LastValueAggregation.newBuilder((io.opencensus.proto.stats.v1.LastValueAggregation) aggregation_)
.mergeFrom(value).buildPartial();
} else {
aggregation_ = value;
}
onChanged();
} else {
if (aggregationCase_ == 7) {
lastValueAggregationBuilder_.mergeFrom(value);
} else {
lastValueAggregationBuilder_.setMessage(value);
}
}
aggregationCase_ = 7;
return this;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will represent the last
* recorded value. This is useful to support Gauges.
*
*
* .opencensus.proto.stats.v1.LastValueAggregation last_value_aggregation = 7;
*/
public Builder clearLastValueAggregation() {
if (lastValueAggregationBuilder_ == null) {
if (aggregationCase_ == 7) {
aggregationCase_ = 0;
aggregation_ = null;
onChanged();
}
} else {
if (aggregationCase_ == 7) {
aggregationCase_ = 0;
aggregation_ = null;
}
lastValueAggregationBuilder_.clear();
}
return this;
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will represent the last
* recorded value. This is useful to support Gauges.
*
*
* .opencensus.proto.stats.v1.LastValueAggregation last_value_aggregation = 7;
*/
public io.opencensus.proto.stats.v1.LastValueAggregation.Builder getLastValueAggregationBuilder() {
return getLastValueAggregationFieldBuilder().getBuilder();
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will represent the last
* recorded value. This is useful to support Gauges.
*
*
* .opencensus.proto.stats.v1.LastValueAggregation last_value_aggregation = 7;
*/
@java.lang.Override
public io.opencensus.proto.stats.v1.LastValueAggregationOrBuilder getLastValueAggregationOrBuilder() {
if ((aggregationCase_ == 7) && (lastValueAggregationBuilder_ != null)) {
return lastValueAggregationBuilder_.getMessageOrBuilder();
} else {
if (aggregationCase_ == 7) {
return (io.opencensus.proto.stats.v1.LastValueAggregation) aggregation_;
}
return io.opencensus.proto.stats.v1.LastValueAggregation.getDefaultInstance();
}
}
/**
*
* Indicates that data collected and aggregated with this Aggregation will represent the last
* recorded value. This is useful to support Gauges.
*
*
* .opencensus.proto.stats.v1.LastValueAggregation last_value_aggregation = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.LastValueAggregation, io.opencensus.proto.stats.v1.LastValueAggregation.Builder, io.opencensus.proto.stats.v1.LastValueAggregationOrBuilder>
getLastValueAggregationFieldBuilder() {
if (lastValueAggregationBuilder_ == null) {
if (!(aggregationCase_ == 7)) {
aggregation_ = io.opencensus.proto.stats.v1.LastValueAggregation.getDefaultInstance();
}
lastValueAggregationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.LastValueAggregation, io.opencensus.proto.stats.v1.LastValueAggregation.Builder, io.opencensus.proto.stats.v1.LastValueAggregationOrBuilder>(
(io.opencensus.proto.stats.v1.LastValueAggregation) aggregation_,
getParentForChildren(),
isClean());
aggregation_ = null;
}
aggregationCase_ = 7;
onChanged();;
return lastValueAggregationBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.DistributionAggregation, io.opencensus.proto.stats.v1.DistributionAggregation.Builder, io.opencensus.proto.stats.v1.DistributionAggregationOrBuilder> distributionAggregationBuilder_;
/**
*
* Indicates that the desired Aggregation is a histogram distribution. A distribution
* Aggregation may contain a histogram of the values in the population. User should define the
* bucket boundaries for that histogram (see DistributionAggregation).
*
*
* .opencensus.proto.stats.v1.DistributionAggregation distribution_aggregation = 8;
* @return Whether the distributionAggregation field is set.
*/
@java.lang.Override
public boolean hasDistributionAggregation() {
return aggregationCase_ == 8;
}
/**
*
* Indicates that the desired Aggregation is a histogram distribution. A distribution
* Aggregation may contain a histogram of the values in the population. User should define the
* bucket boundaries for that histogram (see DistributionAggregation).
*
*
* .opencensus.proto.stats.v1.DistributionAggregation distribution_aggregation = 8;
* @return The distributionAggregation.
*/
@java.lang.Override
public io.opencensus.proto.stats.v1.DistributionAggregation getDistributionAggregation() {
if (distributionAggregationBuilder_ == null) {
if (aggregationCase_ == 8) {
return (io.opencensus.proto.stats.v1.DistributionAggregation) aggregation_;
}
return io.opencensus.proto.stats.v1.DistributionAggregation.getDefaultInstance();
} else {
if (aggregationCase_ == 8) {
return distributionAggregationBuilder_.getMessage();
}
return io.opencensus.proto.stats.v1.DistributionAggregation.getDefaultInstance();
}
}
/**
*
* Indicates that the desired Aggregation is a histogram distribution. A distribution
* Aggregation may contain a histogram of the values in the population. User should define the
* bucket boundaries for that histogram (see DistributionAggregation).
*
*
* .opencensus.proto.stats.v1.DistributionAggregation distribution_aggregation = 8;
*/
public Builder setDistributionAggregation(io.opencensus.proto.stats.v1.DistributionAggregation value) {
if (distributionAggregationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
aggregation_ = value;
onChanged();
} else {
distributionAggregationBuilder_.setMessage(value);
}
aggregationCase_ = 8;
return this;
}
/**
*
* Indicates that the desired Aggregation is a histogram distribution. A distribution
* Aggregation may contain a histogram of the values in the population. User should define the
* bucket boundaries for that histogram (see DistributionAggregation).
*
*
* .opencensus.proto.stats.v1.DistributionAggregation distribution_aggregation = 8;
*/
public Builder setDistributionAggregation(
io.opencensus.proto.stats.v1.DistributionAggregation.Builder builderForValue) {
if (distributionAggregationBuilder_ == null) {
aggregation_ = builderForValue.build();
onChanged();
} else {
distributionAggregationBuilder_.setMessage(builderForValue.build());
}
aggregationCase_ = 8;
return this;
}
/**
*
* Indicates that the desired Aggregation is a histogram distribution. A distribution
* Aggregation may contain a histogram of the values in the population. User should define the
* bucket boundaries for that histogram (see DistributionAggregation).
*
*
* .opencensus.proto.stats.v1.DistributionAggregation distribution_aggregation = 8;
*/
public Builder mergeDistributionAggregation(io.opencensus.proto.stats.v1.DistributionAggregation value) {
if (distributionAggregationBuilder_ == null) {
if (aggregationCase_ == 8 &&
aggregation_ != io.opencensus.proto.stats.v1.DistributionAggregation.getDefaultInstance()) {
aggregation_ = io.opencensus.proto.stats.v1.DistributionAggregation.newBuilder((io.opencensus.proto.stats.v1.DistributionAggregation) aggregation_)
.mergeFrom(value).buildPartial();
} else {
aggregation_ = value;
}
onChanged();
} else {
if (aggregationCase_ == 8) {
distributionAggregationBuilder_.mergeFrom(value);
} else {
distributionAggregationBuilder_.setMessage(value);
}
}
aggregationCase_ = 8;
return this;
}
/**
*
* Indicates that the desired Aggregation is a histogram distribution. A distribution
* Aggregation may contain a histogram of the values in the population. User should define the
* bucket boundaries for that histogram (see DistributionAggregation).
*
*
* .opencensus.proto.stats.v1.DistributionAggregation distribution_aggregation = 8;
*/
public Builder clearDistributionAggregation() {
if (distributionAggregationBuilder_ == null) {
if (aggregationCase_ == 8) {
aggregationCase_ = 0;
aggregation_ = null;
onChanged();
}
} else {
if (aggregationCase_ == 8) {
aggregationCase_ = 0;
aggregation_ = null;
}
distributionAggregationBuilder_.clear();
}
return this;
}
/**
*
* Indicates that the desired Aggregation is a histogram distribution. A distribution
* Aggregation may contain a histogram of the values in the population. User should define the
* bucket boundaries for that histogram (see DistributionAggregation).
*
*
* .opencensus.proto.stats.v1.DistributionAggregation distribution_aggregation = 8;
*/
public io.opencensus.proto.stats.v1.DistributionAggregation.Builder getDistributionAggregationBuilder() {
return getDistributionAggregationFieldBuilder().getBuilder();
}
/**
*
* Indicates that the desired Aggregation is a histogram distribution. A distribution
* Aggregation may contain a histogram of the values in the population. User should define the
* bucket boundaries for that histogram (see DistributionAggregation).
*
*
* .opencensus.proto.stats.v1.DistributionAggregation distribution_aggregation = 8;
*/
@java.lang.Override
public io.opencensus.proto.stats.v1.DistributionAggregationOrBuilder getDistributionAggregationOrBuilder() {
if ((aggregationCase_ == 8) && (distributionAggregationBuilder_ != null)) {
return distributionAggregationBuilder_.getMessageOrBuilder();
} else {
if (aggregationCase_ == 8) {
return (io.opencensus.proto.stats.v1.DistributionAggregation) aggregation_;
}
return io.opencensus.proto.stats.v1.DistributionAggregation.getDefaultInstance();
}
}
/**
*
* Indicates that the desired Aggregation is a histogram distribution. A distribution
* Aggregation may contain a histogram of the values in the population. User should define the
* bucket boundaries for that histogram (see DistributionAggregation).
*
*
* .opencensus.proto.stats.v1.DistributionAggregation distribution_aggregation = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.DistributionAggregation, io.opencensus.proto.stats.v1.DistributionAggregation.Builder, io.opencensus.proto.stats.v1.DistributionAggregationOrBuilder>
getDistributionAggregationFieldBuilder() {
if (distributionAggregationBuilder_ == null) {
if (!(aggregationCase_ == 8)) {
aggregation_ = io.opencensus.proto.stats.v1.DistributionAggregation.getDefaultInstance();
}
distributionAggregationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.stats.v1.DistributionAggregation, io.opencensus.proto.stats.v1.DistributionAggregation.Builder, io.opencensus.proto.stats.v1.DistributionAggregationOrBuilder>(
(io.opencensus.proto.stats.v1.DistributionAggregation) aggregation_,
getParentForChildren(),
isClean());
aggregation_ = null;
}
aggregationCase_ = 8;
onChanged();;
return distributionAggregationBuilder_;
}
@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.stats.v1.View)
}
// @@protoc_insertion_point(class_scope:opencensus.proto.stats.v1.View)
private static final io.opencensus.proto.stats.v1.View DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencensus.proto.stats.v1.View();
}
public static io.opencensus.proto.stats.v1.View getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public View parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new View(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.stats.v1.View getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}