com.google.monitoring.v3.Aggregation.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(aggregation_); aggregation_ = subBuilder.buildPartial();
throw new NullPointerException(); ensureGroupByFieldsIsMutable(); groupByFields_.add(value); onChanged(); return this;
subBuilder.mergeFrom(aggregation_); aggregation_ = subBuilder.buildPartial();
/** * <pre> * The set of fields to preserve when `crossSeriesReducer` is * specified. The `groupByFields` determine how the time series * are partitioned into subsets prior to applying the aggregation * function. Each subset contains time series that have the same * value for each of the grouping fields. Each individual time * series is a member of exactly one subset. The * `crossSeriesReducer` is applied to each subset of time series. * Fields not specified in `groupByFields` are aggregated away. * If `groupByFields` is not specified, the time series are * aggregated into a single output time series. If * `crossSeriesReducer` is not defined, this field is ignored. * </pre> * * <code>repeated string group_by_fields = 5;</code> */ public Builder addGroupByFieldsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureGroupByFieldsIsMutable(); groupByFields_.add(value); onChanged(); return this; } public final Builder setUnknownFields(
/** * <pre> * The set of fields to preserve when `crossSeriesReducer` is * specified. The `groupByFields` determine how the time series * are partitioned into subsets prior to applying the aggregation * function. Each subset contains time series that have the same * value for each of the grouping fields. Each individual time * series is a member of exactly one subset. The * `crossSeriesReducer` is applied to each subset of time series. * Fields not specified in `groupByFields` are aggregated away. * If `groupByFields` is not specified, the time series are * aggregated into a single output time series. If * `crossSeriesReducer` is not defined, this field is ignored. * </pre> * * <code>repeated string group_by_fields = 5;</code> */ public Builder setGroupByFields( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureGroupByFieldsIsMutable(); groupByFields_.set(index, value); onChanged(); return this; } /**
/** * <pre> * The set of fields to preserve when `crossSeriesReducer` is * specified. The `groupByFields` determine how the time series * are partitioned into subsets prior to applying the aggregation * function. Each subset contains time series that have the same * value for each of the grouping fields. Each individual time * series is a member of exactly one subset. The * `crossSeriesReducer` is applied to each subset of time series. * Fields not specified in `groupByFields` are aggregated away. * If `groupByFields` is not specified, the time series are * aggregated into a single output time series. If * `crossSeriesReducer` is not defined, this field is ignored. * </pre> * * <code>repeated string group_by_fields = 5;</code> */ public Builder addGroupByFields( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureGroupByFieldsIsMutable(); groupByFields_.add(value); onChanged(); return this; } /**
/** * <pre> * The set of fields to preserve when `crossSeriesReducer` is * specified. The `groupByFields` determine how the time series * are partitioned into subsets prior to applying the aggregation * function. Each subset contains time series that have the same * value for each of the grouping fields. Each individual time * series is a member of exactly one subset. The * `crossSeriesReducer` is applied to each subset of time series. * Fields not specified in `groupByFields` are aggregated away. * If `groupByFields` is not specified, the time series are * aggregated into a single output time series. If * `crossSeriesReducer` is not defined, this field is ignored. * </pre> * * <code>repeated string group_by_fields = 5;</code> */ public Builder addAllGroupByFields( java.lang.Iterable<java.lang.String> values) { ensureGroupByFieldsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, groupByFields_); onChanged(); return this; } /**
/** * <pre> * The alignment period for per-[time series][google.monitoring.v3.TimeSeries] * alignment. If present, `alignmentPeriod` must be at least 60 * seconds. After per-time series alignment, each time series will * contain data points only on the period boundaries. If * `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then * this field is ignored. If `perSeriesAligner` is specified and * does not equal `ALIGN_NONE`, then this field must be defined; * otherwise an error is returned. * </pre> * * <code>optional .google.protobuf.Duration alignment_period = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getAlignmentPeriodFieldBuilder() { if (alignmentPeriodBuilder_ == null) { alignmentPeriodBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getAlignmentPeriod(), getParentForChildren(), isClean()); alignmentPeriod_ = null; } return alignmentPeriodBuilder_; }
/** * <pre> * By default, the raw time series data is returned. * Use this field to combine multiple time series for different * views of the data. * </pre> * * <code>optional .google.monitoring.v3.Aggregation aggregation = 5;</code> */ public Builder mergeAggregation(com.google.monitoring.v3.Aggregation value) { if (aggregationBuilder_ == null) { if (aggregation_ != null) { aggregation_ = com.google.monitoring.v3.Aggregation.newBuilder(aggregation_).mergeFrom(value).buildPartial(); } else { aggregation_ = value; } onChanged(); } else { aggregationBuilder_.mergeFrom(value); } return this; } /**
public Builder mergeFrom(com.google.monitoring.v3.Aggregation other) { if (other == com.google.monitoring.v3.Aggregation.getDefaultInstance()) return this; if (other.hasAlignmentPeriod()) { mergeAlignmentPeriod(other.getAlignmentPeriod()); } if (other.perSeriesAligner_ != 0) { setPerSeriesAlignerValue(other.getPerSeriesAlignerValue()); } if (other.crossSeriesReducer_ != 0) { setCrossSeriesReducerValue(other.getCrossSeriesReducerValue()); } if (!other.groupByFields_.isEmpty()) { if (groupByFields_.isEmpty()) { groupByFields_ = other.groupByFields_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureGroupByFieldsIsMutable(); groupByFields_.addAll(other.groupByFields_); } onChanged(); } onChanged(); return this; }
/** * <pre> * The alignment period for per-[time series][google.monitoring.v3.TimeSeries] * alignment. If present, `alignmentPeriod` must be at least 60 * seconds. After per-time series alignment, each time series will * contain data points only on the period boundaries. If * `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then * this field is ignored. If `perSeriesAligner` is specified and * does not equal `ALIGN_NONE`, then this field must be defined; * otherwise an error is returned. * </pre> * * <code>optional .google.protobuf.Duration alignment_period = 1;</code> */ public com.google.protobuf.Duration.Builder getAlignmentPeriodBuilder() { onChanged(); return getAlignmentPeriodFieldBuilder().getBuilder(); } /**
/** * <pre> * By default, the raw time series data is returned. * Use this field to combine multiple time series for different * views of the data. * </pre> * * <code>optional .google.monitoring.v3.Aggregation aggregation = 5;</code> */ public Builder setAggregation( com.google.monitoring.v3.Aggregation.Builder builderForValue) { if (aggregationBuilder_ == null) { aggregation_ = builderForValue.build(); onChanged(); } else { aggregationBuilder_.setMessage(builderForValue.build()); } return this; } /**
private Builder() { maybeForceBuilderInitialization(); }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
public com.google.monitoring.v3.Aggregation build() { com.google.monitoring.v3.Aggregation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() {
.setAlignmentPeriod(Duration.newBuilder().setSeconds(600).build()) .setPerSeriesAligner(Aggregation.Aligner.ALIGN_MEAN) .build();
.setAlignmentPeriod(Duration.newBuilder().setSeconds(600).build()) .setPerSeriesAligner(Aggregation.Aligner.ALIGN_MEAN) .setCrossSeriesReducer(Aggregation.Reducer.REDUCE_MEAN) .build();