/** * * * <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>.google.protobuf.Duration alignment_period = 1;</code> */ public Builder setAlignmentPeriod(com.google.protobuf.Duration value) { if (alignmentPeriodBuilder_ == null) { if (value == null) { throw new NullPointerException(); } alignmentPeriod_ = value; onChanged(); } else { alignmentPeriodBuilder_.setMessage(value); } return this; } /**
onChanged(); return this;
onChanged(); return this;
/** * <pre> * The approach to be used to combine time series. Not all reducer * functions may be applied to all time series, depending on the * metric type and the value type of the original time * series. Reduction may change the metric type of value type of the * time series. * Time series data must be aligned in order to perform cross-time * series reduction. If `crossSeriesReducer` is specified, then * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * </pre> * * <code>optional .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4;</code> */ public Builder setCrossSeriesReducerValue(int value) { crossSeriesReducer_ = value; onChanged(); return this; } /**
/** * <pre> * The approach to be used to align individual time series. Not all * alignment functions may be applied to all time series, depending * on the metric type and value type of the original time * series. Alignment may change the metric type or the value type of * the time series. * Time series data must be aligned in order to perform cross-time * series reduction. If `crossSeriesReducer` is specified, then * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * </pre> * * <code>optional .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2;</code> */ public Builder clearPerSeriesAligner() { perSeriesAligner_ = 0; 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(); } /**
alignmentPeriod_ = value; onChanged(); } else { alignmentPeriodBuilder_.mergeFrom(value);
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. * It is not possible to reduce across different resource types, so * this field implicitly contains `resource.type`. Fields not * specified in `groupByFields` are aggregated away. If * `groupByFields` is not specified and all the time series have * the same resource type, then 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 clearGroupByFields() { groupByFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); 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. * It is not possible to reduce across different resource types, so * this field implicitly contains `resource.type`. Fields not * specified in `groupByFields` are aggregated away. If * `groupByFields` is not specified and all the time series have * the same resource type, then 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 approach to be used to combine time series. Not all reducer * functions may be applied to all time series, depending on the * metric type and the value type of the original time * series. Reduction may change the metric type of value type of the * time series. * Time series data must be aligned in order to perform cross-time * series reduction. If `crossSeriesReducer` is specified, then * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * </pre> * * <code>.google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4;</code> */ public Builder setCrossSeriesReducer(com.google.monitoring.v3.Aggregation.Reducer value) { if (value == null) { throw new NullPointerException(); } crossSeriesReducer_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * The approach to be used to align individual time series. Not all * alignment functions may be applied to all time series, depending * on the metric type and value type of the original time * series. Alignment may change the metric type or the value type of * the time series. * Time series data must be aligned in order to perform cross-time * series reduction. If `crossSeriesReducer` is specified, then * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * </pre> * * <code>.google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2;</code> */ public Builder setPerSeriesAligner(com.google.monitoring.v3.Aggregation.Aligner value) { if (value == null) { throw new NullPointerException(); } perSeriesAligner_ = value.getNumber(); 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>.google.protobuf.Duration alignment_period = 1;</code> */ public Builder clearAlignmentPeriod() { if (alignmentPeriodBuilder_ == null) { alignmentPeriod_ = null; onChanged(); } else { alignmentPeriod_ = null; alignmentPeriodBuilder_ = null; } 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>.google.protobuf.Duration alignment_period = 1;</code> */ public Builder setAlignmentPeriod(com.google.protobuf.Duration.Builder builderForValue) { if (alignmentPeriodBuilder_ == null) { alignmentPeriod_ = builderForValue.build(); onChanged(); } else { alignmentPeriodBuilder_.setMessage(builderForValue.build()); } 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(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The approach to be used to align individual time series. Not all * alignment functions may be applied to all time series, depending * on the metric type and value type of the original time * series. Alignment may change the metric type or the value type of * the time series. * Time series data must be aligned in order to perform cross-time * series reduction. If `crossSeriesReducer` is specified, then * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * </pre> * * <code>.google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2;</code> */ public Builder clearPerSeriesAligner() { perSeriesAligner_ = 0; onChanged(); return this; }
/** * * * <pre> * The approach to be used to combine time series. Not all reducer * functions may be applied to all time series, depending on the * metric type and the value type of the original time * series. Reduction may change the metric type of value type of the * time series. * Time series data must be aligned in order to perform cross-time * series reduction. If `crossSeriesReducer` is specified, then * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * </pre> * * <code>.google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4;</code> */ public Builder clearCrossSeriesReducer() { crossSeriesReducer_ = 0; onChanged(); return this; }
/** * * * <pre> * The approach to be used to combine time series. Not all reducer * functions may be applied to all time series, depending on the * metric type and the value type of the original time * series. Reduction may change the metric type of value type of the * time series. * Time series data must be aligned in order to perform cross-time * series reduction. If `crossSeriesReducer` is specified, then * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * </pre> * * <code>.google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4;</code> */ public Builder setCrossSeriesReducerValue(int value) { crossSeriesReducer_ = value; onChanged(); return this; } /**
/** * * * <pre> * The approach to be used to align individual time series. Not all * alignment functions may be applied to all time series, depending * on the metric type and value type of the original time * series. Alignment may change the metric type or the value type of * the time series. * Time series data must be aligned in order to perform cross-time * series reduction. If `crossSeriesReducer` is specified, then * `perSeriesAligner` must be specified and not equal `ALIGN_NONE` * and `alignmentPeriod` must be specified; otherwise, an error is * returned. * </pre> * * <code>.google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2;</code> */ public Builder setPerSeriesAlignerValue(int value) { perSeriesAligner_ = value; 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>.google.protobuf.Duration alignment_period = 1;</code> */ public com.google.protobuf.Duration.Builder getAlignmentPeriodBuilder() { onChanged(); return getAlignmentPeriodFieldBuilder().getBuilder(); } /**