Class Aggregation.Builder

  • All Implemented Interfaces:
    AggregationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Aggregation

    public static final class Aggregation.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
    implements AggregationOrBuilder
     Describes how to combine multiple time series to provide a different view of
     the data.  Aggregation of time series is done in two steps. First, each time
     series in the set is _aligned_ to the same time interval boundaries, then the
     set of time series is optionally _reduced_ in number.
    
     Alignment consists of applying the `per_series_aligner` operation
     to each time series after its data has been divided into regular
     `alignment_period` time intervals. This process takes _all_ of the data
     points in an alignment period, applies a mathematical transformation such as
     averaging, minimum, maximum, delta, etc., and converts them into a single
     data point per period.
    
     Reduction is when the aligned and transformed time series can optionally be
     combined, reducing the number of time series through similar mathematical
     transformations. Reduction involves applying a `cross_series_reducer` to
     all the time series, optionally sorting the time series into subsets with
     `group_by_fields`, and applying the reducer to each subset.
    
     The raw time series data can contain a huge amount of information from
     multiple sources. Alignment and reduction transforms this mass of data into
     a more manageable and representative collection of data, for example "the
     95% latency across the average of all tasks in a cluster". This
     representative data can be more easily graphed and comprehended, and the
     individual time series data is still available for later drilldown. For more
     details, see [Filtering and
     aggregation](https://cloud.google.com/monitoring/api/v3/aggregation).
     
    Protobuf type google.monitoring.v3.Aggregation
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Aggregation.Builder addAllGroupByFields​(Iterable<String> values)
      The set of fields to preserve when `cross_series_reducer` is specified.
      Aggregation.Builder addGroupByFields​(String value)
      The set of fields to preserve when `cross_series_reducer` is specified.
      Aggregation.Builder addGroupByFieldsBytes​(com.google.protobuf.ByteString value)
      The set of fields to preserve when `cross_series_reducer` is specified.
      Aggregation.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      Aggregation build()  
      Aggregation buildPartial()  
      Aggregation.Builder clear()  
      Aggregation.Builder clearAlignmentPeriod()
      The `alignment_period` specifies a time interval, in seconds, that is used to divide the data in all the [time series][google.monitoring.v3.TimeSeries] into consistent blocks of time.
      Aggregation.Builder clearCrossSeriesReducer()
      The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.
      Aggregation.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)  
      Aggregation.Builder clearGroupByFields()
      The set of fields to preserve when `cross_series_reducer` is specified.
      Aggregation.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)  
      Aggregation.Builder clearPerSeriesAligner()
      An `Aligner` describes how to bring the data points in a single time series into temporal alignment.
      Aggregation.Builder clone()  
      com.google.protobuf.Duration getAlignmentPeriod()
      The `alignment_period` specifies a time interval, in seconds, that is used to divide the data in all the [time series][google.monitoring.v3.TimeSeries] into consistent blocks of time.
      com.google.protobuf.Duration.Builder getAlignmentPeriodBuilder()
      The `alignment_period` specifies a time interval, in seconds, that is used to divide the data in all the [time series][google.monitoring.v3.TimeSeries] into consistent blocks of time.
      com.google.protobuf.DurationOrBuilder getAlignmentPeriodOrBuilder()
      The `alignment_period` specifies a time interval, in seconds, that is used to divide the data in all the [time series][google.monitoring.v3.TimeSeries] into consistent blocks of time.
      Aggregation.Reducer getCrossSeriesReducer()
      The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.
      int getCrossSeriesReducerValue()
      The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.
      Aggregation getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      String getGroupByFields​(int index)
      The set of fields to preserve when `cross_series_reducer` is specified.
      com.google.protobuf.ByteString getGroupByFieldsBytes​(int index)
      The set of fields to preserve when `cross_series_reducer` is specified.
      int getGroupByFieldsCount()
      The set of fields to preserve when `cross_series_reducer` is specified.
      com.google.protobuf.ProtocolStringList getGroupByFieldsList()
      The set of fields to preserve when `cross_series_reducer` is specified.
      Aggregation.Aligner getPerSeriesAligner()
      An `Aligner` describes how to bring the data points in a single time series into temporal alignment.
      int getPerSeriesAlignerValue()
      An `Aligner` describes how to bring the data points in a single time series into temporal alignment.
      boolean hasAlignmentPeriod()
      The `alignment_period` specifies a time interval, in seconds, that is used to divide the data in all the [time series][google.monitoring.v3.TimeSeries] into consistent blocks of time.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      Aggregation.Builder mergeAlignmentPeriod​(com.google.protobuf.Duration value)
      The `alignment_period` specifies a time interval, in seconds, that is used to divide the data in all the [time series][google.monitoring.v3.TimeSeries] into consistent blocks of time.
      Aggregation.Builder mergeFrom​(Aggregation other)  
      Aggregation.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      Aggregation.Builder mergeFrom​(com.google.protobuf.Message other)  
      Aggregation.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      Aggregation.Builder setAlignmentPeriod​(com.google.protobuf.Duration value)
      The `alignment_period` specifies a time interval, in seconds, that is used to divide the data in all the [time series][google.monitoring.v3.TimeSeries] into consistent blocks of time.
      Aggregation.Builder setAlignmentPeriod​(com.google.protobuf.Duration.Builder builderForValue)
      The `alignment_period` specifies a time interval, in seconds, that is used to divide the data in all the [time series][google.monitoring.v3.TimeSeries] into consistent blocks of time.
      Aggregation.Builder setCrossSeriesReducer​(Aggregation.Reducer value)
      The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.
      Aggregation.Builder setCrossSeriesReducerValue​(int value)
      The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.
      Aggregation.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      Aggregation.Builder setGroupByFields​(int index, String value)
      The set of fields to preserve when `cross_series_reducer` is specified.
      Aggregation.Builder setPerSeriesAligner​(Aggregation.Aligner value)
      An `Aligner` describes how to bring the data points in a single time series into temporal alignment.
      Aggregation.Builder setPerSeriesAlignerValue​(int value)
      An `Aligner` describes how to bring the data points in a single time series into temporal alignment.
      Aggregation.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)  
      Aggregation.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

        getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • clear

        public Aggregation.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • getDefaultInstanceForType

        public Aggregation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Aggregation build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Aggregation buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Aggregation.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • setField

        public Aggregation.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                            Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • clearField

        public Aggregation.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • clearOneof

        public Aggregation.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • setRepeatedField

        public Aggregation.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    int index,
                                                    Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • addRepeatedField

        public Aggregation.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • mergeFrom

        public Aggregation.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Aggregation.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • mergeFrom

        public Aggregation.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Aggregation.Builder>
        Throws:
        IOException
      • hasAlignmentPeriod

        public boolean hasAlignmentPeriod()
         The `alignment_period` specifies a time interval, in seconds, that is used
         to divide the data in all the
         [time series][google.monitoring.v3.TimeSeries] into consistent blocks of
         time. This will be done before the per-series aligner can be applied to
         the data.
        
         The value must be at least 60 seconds. If a per-series
         aligner other than `ALIGN_NONE` is specified, this field is required or an
         error is returned. If no per-series aligner is specified, or the aligner
         `ALIGN_NONE` is specified, then this field is ignored.
        
         The maximum value of the `alignment_period` is 104 weeks (2 years) for
         charts, and 90,000 seconds (25 hours) for alerting policies.
         
        .google.protobuf.Duration alignment_period = 1;
        Specified by:
        hasAlignmentPeriod in interface AggregationOrBuilder
        Returns:
        Whether the alignmentPeriod field is set.
      • getAlignmentPeriod

        public com.google.protobuf.Duration getAlignmentPeriod()
         The `alignment_period` specifies a time interval, in seconds, that is used
         to divide the data in all the
         [time series][google.monitoring.v3.TimeSeries] into consistent blocks of
         time. This will be done before the per-series aligner can be applied to
         the data.
        
         The value must be at least 60 seconds. If a per-series
         aligner other than `ALIGN_NONE` is specified, this field is required or an
         error is returned. If no per-series aligner is specified, or the aligner
         `ALIGN_NONE` is specified, then this field is ignored.
        
         The maximum value of the `alignment_period` is 104 weeks (2 years) for
         charts, and 90,000 seconds (25 hours) for alerting policies.
         
        .google.protobuf.Duration alignment_period = 1;
        Specified by:
        getAlignmentPeriod in interface AggregationOrBuilder
        Returns:
        The alignmentPeriod.
      • setAlignmentPeriod

        public Aggregation.Builder setAlignmentPeriod​(com.google.protobuf.Duration value)
         The `alignment_period` specifies a time interval, in seconds, that is used
         to divide the data in all the
         [time series][google.monitoring.v3.TimeSeries] into consistent blocks of
         time. This will be done before the per-series aligner can be applied to
         the data.
        
         The value must be at least 60 seconds. If a per-series
         aligner other than `ALIGN_NONE` is specified, this field is required or an
         error is returned. If no per-series aligner is specified, or the aligner
         `ALIGN_NONE` is specified, then this field is ignored.
        
         The maximum value of the `alignment_period` is 104 weeks (2 years) for
         charts, and 90,000 seconds (25 hours) for alerting policies.
         
        .google.protobuf.Duration alignment_period = 1;
      • setAlignmentPeriod

        public Aggregation.Builder setAlignmentPeriod​(com.google.protobuf.Duration.Builder builderForValue)
         The `alignment_period` specifies a time interval, in seconds, that is used
         to divide the data in all the
         [time series][google.monitoring.v3.TimeSeries] into consistent blocks of
         time. This will be done before the per-series aligner can be applied to
         the data.
        
         The value must be at least 60 seconds. If a per-series
         aligner other than `ALIGN_NONE` is specified, this field is required or an
         error is returned. If no per-series aligner is specified, or the aligner
         `ALIGN_NONE` is specified, then this field is ignored.
        
         The maximum value of the `alignment_period` is 104 weeks (2 years) for
         charts, and 90,000 seconds (25 hours) for alerting policies.
         
        .google.protobuf.Duration alignment_period = 1;
      • mergeAlignmentPeriod

        public Aggregation.Builder mergeAlignmentPeriod​(com.google.protobuf.Duration value)
         The `alignment_period` specifies a time interval, in seconds, that is used
         to divide the data in all the
         [time series][google.monitoring.v3.TimeSeries] into consistent blocks of
         time. This will be done before the per-series aligner can be applied to
         the data.
        
         The value must be at least 60 seconds. If a per-series
         aligner other than `ALIGN_NONE` is specified, this field is required or an
         error is returned. If no per-series aligner is specified, or the aligner
         `ALIGN_NONE` is specified, then this field is ignored.
        
         The maximum value of the `alignment_period` is 104 weeks (2 years) for
         charts, and 90,000 seconds (25 hours) for alerting policies.
         
        .google.protobuf.Duration alignment_period = 1;
      • clearAlignmentPeriod

        public Aggregation.Builder clearAlignmentPeriod()
         The `alignment_period` specifies a time interval, in seconds, that is used
         to divide the data in all the
         [time series][google.monitoring.v3.TimeSeries] into consistent blocks of
         time. This will be done before the per-series aligner can be applied to
         the data.
        
         The value must be at least 60 seconds. If a per-series
         aligner other than `ALIGN_NONE` is specified, this field is required or an
         error is returned. If no per-series aligner is specified, or the aligner
         `ALIGN_NONE` is specified, then this field is ignored.
        
         The maximum value of the `alignment_period` is 104 weeks (2 years) for
         charts, and 90,000 seconds (25 hours) for alerting policies.
         
        .google.protobuf.Duration alignment_period = 1;
      • getAlignmentPeriodBuilder

        public com.google.protobuf.Duration.Builder getAlignmentPeriodBuilder()
         The `alignment_period` specifies a time interval, in seconds, that is used
         to divide the data in all the
         [time series][google.monitoring.v3.TimeSeries] into consistent blocks of
         time. This will be done before the per-series aligner can be applied to
         the data.
        
         The value must be at least 60 seconds. If a per-series
         aligner other than `ALIGN_NONE` is specified, this field is required or an
         error is returned. If no per-series aligner is specified, or the aligner
         `ALIGN_NONE` is specified, then this field is ignored.
        
         The maximum value of the `alignment_period` is 104 weeks (2 years) for
         charts, and 90,000 seconds (25 hours) for alerting policies.
         
        .google.protobuf.Duration alignment_period = 1;
      • getAlignmentPeriodOrBuilder

        public com.google.protobuf.DurationOrBuilder getAlignmentPeriodOrBuilder()
         The `alignment_period` specifies a time interval, in seconds, that is used
         to divide the data in all the
         [time series][google.monitoring.v3.TimeSeries] into consistent blocks of
         time. This will be done before the per-series aligner can be applied to
         the data.
        
         The value must be at least 60 seconds. If a per-series
         aligner other than `ALIGN_NONE` is specified, this field is required or an
         error is returned. If no per-series aligner is specified, or the aligner
         `ALIGN_NONE` is specified, then this field is ignored.
        
         The maximum value of the `alignment_period` is 104 weeks (2 years) for
         charts, and 90,000 seconds (25 hours) for alerting policies.
         
        .google.protobuf.Duration alignment_period = 1;
        Specified by:
        getAlignmentPeriodOrBuilder in interface AggregationOrBuilder
      • getPerSeriesAlignerValue

        public int getPerSeriesAlignerValue()
         An `Aligner` describes how to bring the data points in a single
         time series into temporal alignment. Except for `ALIGN_NONE`, all
         alignments cause all the data points in an `alignment_period` to be
         mathematically grouped together, resulting in a single data point for
         each `alignment_period` with end timestamp at the end of the period.
        
         Not all alignment operations may be applied to all time series. The valid
         choices depend on the `metric_kind` and `value_type` of the original time
         series. Alignment can change the `metric_kind` or the `value_type` of
         the time series.
        
         Time series data must be aligned in order to perform cross-time
         series reduction. If `cross_series_reducer` is specified, then
         `per_series_aligner` must be specified and not equal to `ALIGN_NONE`
         and `alignment_period` must be specified; otherwise, an error is
         returned.
         
        .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2;
        Specified by:
        getPerSeriesAlignerValue in interface AggregationOrBuilder
        Returns:
        The enum numeric value on the wire for perSeriesAligner.
      • setPerSeriesAlignerValue

        public Aggregation.Builder setPerSeriesAlignerValue​(int value)
         An `Aligner` describes how to bring the data points in a single
         time series into temporal alignment. Except for `ALIGN_NONE`, all
         alignments cause all the data points in an `alignment_period` to be
         mathematically grouped together, resulting in a single data point for
         each `alignment_period` with end timestamp at the end of the period.
        
         Not all alignment operations may be applied to all time series. The valid
         choices depend on the `metric_kind` and `value_type` of the original time
         series. Alignment can change the `metric_kind` or the `value_type` of
         the time series.
        
         Time series data must be aligned in order to perform cross-time
         series reduction. If `cross_series_reducer` is specified, then
         `per_series_aligner` must be specified and not equal to `ALIGN_NONE`
         and `alignment_period` must be specified; otherwise, an error is
         returned.
         
        .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2;
        Parameters:
        value - The enum numeric value on the wire for perSeriesAligner to set.
        Returns:
        This builder for chaining.
      • getPerSeriesAligner

        public Aggregation.Aligner getPerSeriesAligner()
         An `Aligner` describes how to bring the data points in a single
         time series into temporal alignment. Except for `ALIGN_NONE`, all
         alignments cause all the data points in an `alignment_period` to be
         mathematically grouped together, resulting in a single data point for
         each `alignment_period` with end timestamp at the end of the period.
        
         Not all alignment operations may be applied to all time series. The valid
         choices depend on the `metric_kind` and `value_type` of the original time
         series. Alignment can change the `metric_kind` or the `value_type` of
         the time series.
        
         Time series data must be aligned in order to perform cross-time
         series reduction. If `cross_series_reducer` is specified, then
         `per_series_aligner` must be specified and not equal to `ALIGN_NONE`
         and `alignment_period` must be specified; otherwise, an error is
         returned.
         
        .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2;
        Specified by:
        getPerSeriesAligner in interface AggregationOrBuilder
        Returns:
        The perSeriesAligner.
      • setPerSeriesAligner

        public Aggregation.Builder setPerSeriesAligner​(Aggregation.Aligner value)
         An `Aligner` describes how to bring the data points in a single
         time series into temporal alignment. Except for `ALIGN_NONE`, all
         alignments cause all the data points in an `alignment_period` to be
         mathematically grouped together, resulting in a single data point for
         each `alignment_period` with end timestamp at the end of the period.
        
         Not all alignment operations may be applied to all time series. The valid
         choices depend on the `metric_kind` and `value_type` of the original time
         series. Alignment can change the `metric_kind` or the `value_type` of
         the time series.
        
         Time series data must be aligned in order to perform cross-time
         series reduction. If `cross_series_reducer` is specified, then
         `per_series_aligner` must be specified and not equal to `ALIGN_NONE`
         and `alignment_period` must be specified; otherwise, an error is
         returned.
         
        .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2;
        Parameters:
        value - The perSeriesAligner to set.
        Returns:
        This builder for chaining.
      • clearPerSeriesAligner

        public Aggregation.Builder clearPerSeriesAligner()
         An `Aligner` describes how to bring the data points in a single
         time series into temporal alignment. Except for `ALIGN_NONE`, all
         alignments cause all the data points in an `alignment_period` to be
         mathematically grouped together, resulting in a single data point for
         each `alignment_period` with end timestamp at the end of the period.
        
         Not all alignment operations may be applied to all time series. The valid
         choices depend on the `metric_kind` and `value_type` of the original time
         series. Alignment can change the `metric_kind` or the `value_type` of
         the time series.
        
         Time series data must be aligned in order to perform cross-time
         series reduction. If `cross_series_reducer` is specified, then
         `per_series_aligner` must be specified and not equal to `ALIGN_NONE`
         and `alignment_period` must be specified; otherwise, an error is
         returned.
         
        .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2;
        Returns:
        This builder for chaining.
      • getCrossSeriesReducerValue

        public int getCrossSeriesReducerValue()
         The reduction operation to be used to combine time series into a single
         time series, where the value of each data point in the resulting series is
         a function of all the already aligned values in the input time series.
        
         Not all reducer operations can be applied to all time series. The valid
         choices depend on the `metric_kind` and the `value_type` of the original
         time series. Reduction can yield a time series with a different
         `metric_kind` or `value_type` than the input time series.
        
         Time series data must first be aligned (see `per_series_aligner`) in order
         to perform cross-time series reduction. If `cross_series_reducer` is
         specified, then `per_series_aligner` must be specified, and must not be
         `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an
         error is returned.
         
        .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4;
        Specified by:
        getCrossSeriesReducerValue in interface AggregationOrBuilder
        Returns:
        The enum numeric value on the wire for crossSeriesReducer.
      • setCrossSeriesReducerValue

        public Aggregation.Builder setCrossSeriesReducerValue​(int value)
         The reduction operation to be used to combine time series into a single
         time series, where the value of each data point in the resulting series is
         a function of all the already aligned values in the input time series.
        
         Not all reducer operations can be applied to all time series. The valid
         choices depend on the `metric_kind` and the `value_type` of the original
         time series. Reduction can yield a time series with a different
         `metric_kind` or `value_type` than the input time series.
        
         Time series data must first be aligned (see `per_series_aligner`) in order
         to perform cross-time series reduction. If `cross_series_reducer` is
         specified, then `per_series_aligner` must be specified, and must not be
         `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an
         error is returned.
         
        .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4;
        Parameters:
        value - The enum numeric value on the wire for crossSeriesReducer to set.
        Returns:
        This builder for chaining.
      • getCrossSeriesReducer

        public Aggregation.Reducer getCrossSeriesReducer()
         The reduction operation to be used to combine time series into a single
         time series, where the value of each data point in the resulting series is
         a function of all the already aligned values in the input time series.
        
         Not all reducer operations can be applied to all time series. The valid
         choices depend on the `metric_kind` and the `value_type` of the original
         time series. Reduction can yield a time series with a different
         `metric_kind` or `value_type` than the input time series.
        
         Time series data must first be aligned (see `per_series_aligner`) in order
         to perform cross-time series reduction. If `cross_series_reducer` is
         specified, then `per_series_aligner` must be specified, and must not be
         `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an
         error is returned.
         
        .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4;
        Specified by:
        getCrossSeriesReducer in interface AggregationOrBuilder
        Returns:
        The crossSeriesReducer.
      • setCrossSeriesReducer

        public Aggregation.Builder setCrossSeriesReducer​(Aggregation.Reducer value)
         The reduction operation to be used to combine time series into a single
         time series, where the value of each data point in the resulting series is
         a function of all the already aligned values in the input time series.
        
         Not all reducer operations can be applied to all time series. The valid
         choices depend on the `metric_kind` and the `value_type` of the original
         time series. Reduction can yield a time series with a different
         `metric_kind` or `value_type` than the input time series.
        
         Time series data must first be aligned (see `per_series_aligner`) in order
         to perform cross-time series reduction. If `cross_series_reducer` is
         specified, then `per_series_aligner` must be specified, and must not be
         `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an
         error is returned.
         
        .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4;
        Parameters:
        value - The crossSeriesReducer to set.
        Returns:
        This builder for chaining.
      • clearCrossSeriesReducer

        public Aggregation.Builder clearCrossSeriesReducer()
         The reduction operation to be used to combine time series into a single
         time series, where the value of each data point in the resulting series is
         a function of all the already aligned values in the input time series.
        
         Not all reducer operations can be applied to all time series. The valid
         choices depend on the `metric_kind` and the `value_type` of the original
         time series. Reduction can yield a time series with a different
         `metric_kind` or `value_type` than the input time series.
        
         Time series data must first be aligned (see `per_series_aligner`) in order
         to perform cross-time series reduction. If `cross_series_reducer` is
         specified, then `per_series_aligner` must be specified, and must not be
         `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an
         error is returned.
         
        .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4;
        Returns:
        This builder for chaining.
      • getGroupByFieldsList

        public com.google.protobuf.ProtocolStringList getGroupByFieldsList()
         The set of fields to preserve when `cross_series_reducer` is
         specified. The `group_by_fields` determine how the time series are
         partitioned into subsets prior to applying the aggregation
         operation. 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
         `cross_series_reducer` 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 `group_by_fields` are aggregated away.  If
         `group_by_fields` 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 `cross_series_reducer` is not
         defined, this field is ignored.
         
        repeated string group_by_fields = 5;
        Specified by:
        getGroupByFieldsList in interface AggregationOrBuilder
        Returns:
        A list containing the groupByFields.
      • getGroupByFieldsCount

        public int getGroupByFieldsCount()
         The set of fields to preserve when `cross_series_reducer` is
         specified. The `group_by_fields` determine how the time series are
         partitioned into subsets prior to applying the aggregation
         operation. 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
         `cross_series_reducer` 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 `group_by_fields` are aggregated away.  If
         `group_by_fields` 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 `cross_series_reducer` is not
         defined, this field is ignored.
         
        repeated string group_by_fields = 5;
        Specified by:
        getGroupByFieldsCount in interface AggregationOrBuilder
        Returns:
        The count of groupByFields.
      • getGroupByFields

        public String getGroupByFields​(int index)
         The set of fields to preserve when `cross_series_reducer` is
         specified. The `group_by_fields` determine how the time series are
         partitioned into subsets prior to applying the aggregation
         operation. 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
         `cross_series_reducer` 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 `group_by_fields` are aggregated away.  If
         `group_by_fields` 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 `cross_series_reducer` is not
         defined, this field is ignored.
         
        repeated string group_by_fields = 5;
        Specified by:
        getGroupByFields in interface AggregationOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The groupByFields at the given index.
      • getGroupByFieldsBytes

        public com.google.protobuf.ByteString getGroupByFieldsBytes​(int index)
         The set of fields to preserve when `cross_series_reducer` is
         specified. The `group_by_fields` determine how the time series are
         partitioned into subsets prior to applying the aggregation
         operation. 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
         `cross_series_reducer` 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 `group_by_fields` are aggregated away.  If
         `group_by_fields` 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 `cross_series_reducer` is not
         defined, this field is ignored.
         
        repeated string group_by_fields = 5;
        Specified by:
        getGroupByFieldsBytes in interface AggregationOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the groupByFields at the given index.
      • setGroupByFields

        public Aggregation.Builder setGroupByFields​(int index,
                                                    String value)
         The set of fields to preserve when `cross_series_reducer` is
         specified. The `group_by_fields` determine how the time series are
         partitioned into subsets prior to applying the aggregation
         operation. 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
         `cross_series_reducer` 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 `group_by_fields` are aggregated away.  If
         `group_by_fields` 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 `cross_series_reducer` is not
         defined, this field is ignored.
         
        repeated string group_by_fields = 5;
        Parameters:
        index - The index to set the value at.
        value - The groupByFields to set.
        Returns:
        This builder for chaining.
      • addGroupByFields

        public Aggregation.Builder addGroupByFields​(String value)
         The set of fields to preserve when `cross_series_reducer` is
         specified. The `group_by_fields` determine how the time series are
         partitioned into subsets prior to applying the aggregation
         operation. 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
         `cross_series_reducer` 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 `group_by_fields` are aggregated away.  If
         `group_by_fields` 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 `cross_series_reducer` is not
         defined, this field is ignored.
         
        repeated string group_by_fields = 5;
        Parameters:
        value - The groupByFields to add.
        Returns:
        This builder for chaining.
      • addAllGroupByFields

        public Aggregation.Builder addAllGroupByFields​(Iterable<String> values)
         The set of fields to preserve when `cross_series_reducer` is
         specified. The `group_by_fields` determine how the time series are
         partitioned into subsets prior to applying the aggregation
         operation. 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
         `cross_series_reducer` 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 `group_by_fields` are aggregated away.  If
         `group_by_fields` 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 `cross_series_reducer` is not
         defined, this field is ignored.
         
        repeated string group_by_fields = 5;
        Parameters:
        values - The groupByFields to add.
        Returns:
        This builder for chaining.
      • clearGroupByFields

        public Aggregation.Builder clearGroupByFields()
         The set of fields to preserve when `cross_series_reducer` is
         specified. The `group_by_fields` determine how the time series are
         partitioned into subsets prior to applying the aggregation
         operation. 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
         `cross_series_reducer` 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 `group_by_fields` are aggregated away.  If
         `group_by_fields` 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 `cross_series_reducer` is not
         defined, this field is ignored.
         
        repeated string group_by_fields = 5;
        Returns:
        This builder for chaining.
      • addGroupByFieldsBytes

        public Aggregation.Builder addGroupByFieldsBytes​(com.google.protobuf.ByteString value)
         The set of fields to preserve when `cross_series_reducer` is
         specified. The `group_by_fields` determine how the time series are
         partitioned into subsets prior to applying the aggregation
         operation. 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
         `cross_series_reducer` 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 `group_by_fields` are aggregated away.  If
         `group_by_fields` 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 `cross_series_reducer` is not
         defined, this field is ignored.
         
        repeated string group_by_fields = 5;
        Parameters:
        value - The bytes of the groupByFields to add.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Aggregation.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>
      • mergeUnknownFields

        public final Aggregation.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Aggregation.Builder>