Class Aggregation.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Aggregation.Builder>
com.google.monitoring.v3.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.GeneratedMessage.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

    Modifier and Type
    Method
    Description
    The set of fields to preserve when `cross_series_reducer` is specified.
    The set of fields to preserve when `cross_series_reducer` is specified.
    addGroupByFieldsBytes(com.google.protobuf.ByteString value)
    The set of fields to preserve when `cross_series_reducer` is specified.
     
     
     
    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.
    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.
    The set of fields to preserve when `cross_series_reducer` is specified.
    An `Aligner` describes how to bring the data points in a single time series into temporal alignment.
    com.google.protobuf.Duration
    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
    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
    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.
    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
    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.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    getGroupByFields(int index)
    The set of fields to preserve when `cross_series_reducer` is specified.
    com.google.protobuf.ByteString
    The set of fields to preserve when `cross_series_reducer` is specified.
    int
    The set of fields to preserve when `cross_series_reducer` is specified.
    com.google.protobuf.ProtocolStringList
    The set of fields to preserve when `cross_series_reducer` is specified.
    An `Aligner` describes how to bring the data points in a single time series into temporal alignment.
    int
    An `Aligner` describes how to bring the data points in a single time series into temporal alignment.
    boolean
    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.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    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.
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    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.
    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.
    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.
    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.
    setGroupByFields(int index, String value)
    The set of fields to preserve when `cross_series_reducer` is specified.
    An `Aligner` describes how to bring the data points in a single time series into temporal alignment.
    An `Aligner` describes how to bring the data points in a single time series into temporal alignment.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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 class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    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 Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public Aggregation.Builder mergeFrom(Aggregation other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.