Class TimeSeries.Builder

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

    public static final class TimeSeries.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TimeSeries.Builder>
    implements TimeSeriesOrBuilder
     The metrics object for a SubTask.
     
    Protobuf type google.cloud.bigquery.migration.v2.TimeSeries
    • 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<TimeSeries.Builder>
      • clear

        public TimeSeries.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<TimeSeries.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<TimeSeries.Builder>
      • getDefaultInstanceForType

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

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

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

        public TimeSeries.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<TimeSeries.Builder>
      • setField

        public TimeSeries.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<TimeSeries.Builder>
      • clearField

        public TimeSeries.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<TimeSeries.Builder>
      • clearOneof

        public TimeSeries.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<TimeSeries.Builder>
      • setRepeatedField

        public TimeSeries.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<TimeSeries.Builder>
      • addRepeatedField

        public TimeSeries.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<TimeSeries.Builder>
      • mergeFrom

        public TimeSeries.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<TimeSeries.Builder>
      • isInitialized

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

        public TimeSeries.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<TimeSeries.Builder>
        Throws:
        IOException
      • getMetric

        public String getMetric()
         Required. The name of the metric.
        
         If the metric is not known by the service yet, it will be auto-created.
         
        string metric = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getMetric in interface TimeSeriesOrBuilder
        Returns:
        The metric.
      • getMetricBytes

        public com.google.protobuf.ByteString getMetricBytes()
         Required. The name of the metric.
        
         If the metric is not known by the service yet, it will be auto-created.
         
        string metric = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getMetricBytes in interface TimeSeriesOrBuilder
        Returns:
        The bytes for metric.
      • setMetric

        public TimeSeries.Builder setMetric​(String value)
         Required. The name of the metric.
        
         If the metric is not known by the service yet, it will be auto-created.
         
        string metric = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The metric to set.
        Returns:
        This builder for chaining.
      • clearMetric

        public TimeSeries.Builder clearMetric()
         Required. The name of the metric.
        
         If the metric is not known by the service yet, it will be auto-created.
         
        string metric = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setMetricBytes

        public TimeSeries.Builder setMetricBytes​(com.google.protobuf.ByteString value)
         Required. The name of the metric.
        
         If the metric is not known by the service yet, it will be auto-created.
         
        string metric = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for metric to set.
        Returns:
        This builder for chaining.
      • getValueTypeValue

        public int getValueTypeValue()
         Required. The value type of the time series.
         
        .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getValueTypeValue in interface TimeSeriesOrBuilder
        Returns:
        The enum numeric value on the wire for valueType.
      • setValueTypeValue

        public TimeSeries.Builder setValueTypeValue​(int value)
         Required. The value type of the time series.
         
        .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The enum numeric value on the wire for valueType to set.
        Returns:
        This builder for chaining.
      • getValueType

        public com.google.api.MetricDescriptor.ValueType getValueType()
         Required. The value type of the time series.
         
        .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getValueType in interface TimeSeriesOrBuilder
        Returns:
        The valueType.
      • setValueType

        public TimeSeries.Builder setValueType​(com.google.api.MetricDescriptor.ValueType value)
         Required. The value type of the time series.
         
        .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The valueType to set.
        Returns:
        This builder for chaining.
      • clearValueType

        public TimeSeries.Builder clearValueType()
         Required. The value type of the time series.
         
        .google.api.MetricDescriptor.ValueType value_type = 2 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • getMetricKindValue

        public int getMetricKindValue()
         Optional. The metric kind of the time series.
        
         If present, it must be the same as the metric kind of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         this field specifies the metric kind of the new descriptor and must be
         either `GAUGE` (the default) or `CUMULATIVE`.
         
        .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMetricKindValue in interface TimeSeriesOrBuilder
        Returns:
        The enum numeric value on the wire for metricKind.
      • setMetricKindValue

        public TimeSeries.Builder setMetricKindValue​(int value)
         Optional. The metric kind of the time series.
        
         If present, it must be the same as the metric kind of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         this field specifies the metric kind of the new descriptor and must be
         either `GAUGE` (the default) or `CUMULATIVE`.
         
        .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The enum numeric value on the wire for metricKind to set.
        Returns:
        This builder for chaining.
      • getMetricKind

        public com.google.api.MetricDescriptor.MetricKind getMetricKind()
         Optional. The metric kind of the time series.
        
         If present, it must be the same as the metric kind of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         this field specifies the metric kind of the new descriptor and must be
         either `GAUGE` (the default) or `CUMULATIVE`.
         
        .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getMetricKind in interface TimeSeriesOrBuilder
        Returns:
        The metricKind.
      • setMetricKind

        public TimeSeries.Builder setMetricKind​(com.google.api.MetricDescriptor.MetricKind value)
         Optional. The metric kind of the time series.
        
         If present, it must be the same as the metric kind of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         this field specifies the metric kind of the new descriptor and must be
         either `GAUGE` (the default) or `CUMULATIVE`.
         
        .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The metricKind to set.
        Returns:
        This builder for chaining.
      • clearMetricKind

        public TimeSeries.Builder clearMetricKind()
         Optional. The metric kind of the time series.
        
         If present, it must be the same as the metric kind of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         this field specifies the metric kind of the new descriptor and must be
         either `GAUGE` (the default) or `CUMULATIVE`.
         
        .google.api.MetricDescriptor.MetricKind metric_kind = 3 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • getPointsList

        public List<Point> getPointsList()
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPointsList in interface TimeSeriesOrBuilder
      • getPointsCount

        public int getPointsCount()
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPointsCount in interface TimeSeriesOrBuilder
      • getPoints

        public Point getPoints​(int index)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPoints in interface TimeSeriesOrBuilder
      • setPoints

        public TimeSeries.Builder setPoints​(int index,
                                            Point value)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • setPoints

        public TimeSeries.Builder setPoints​(int index,
                                            Point.Builder builderForValue)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • addPoints

        public TimeSeries.Builder addPoints​(Point value)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • addPoints

        public TimeSeries.Builder addPoints​(int index,
                                            Point value)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • addPoints

        public TimeSeries.Builder addPoints​(Point.Builder builderForValue)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • addPoints

        public TimeSeries.Builder addPoints​(int index,
                                            Point.Builder builderForValue)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • addAllPoints

        public TimeSeries.Builder addAllPoints​(Iterable<? extends Point> values)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • clearPoints

        public TimeSeries.Builder clearPoints()
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • removePoints

        public TimeSeries.Builder removePoints​(int index)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • getPointsBuilder

        public Point.Builder getPointsBuilder​(int index)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • getPointsOrBuilder

        public PointOrBuilder getPointsOrBuilder​(int index)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPointsOrBuilder in interface TimeSeriesOrBuilder
      • getPointsOrBuilderList

        public List<? extends PointOrBuilder> getPointsOrBuilderList()
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getPointsOrBuilderList in interface TimeSeriesOrBuilder
      • addPointsBuilder

        public Point.Builder addPointsBuilder()
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • addPointsBuilder

        public Point.Builder addPointsBuilder​(int index)
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • getPointsBuilderList

        public List<Point.Builder> getPointsBuilderList()
         Required. The data points of this time series. When listing time series,
         points are returned in reverse time order.
        
         When creating a time series, this field must contain exactly one point and
         the point's type must be the same as the value type of the associated
         metric. If the associated metric's descriptor must be auto-created, then
         the value type of the descriptor is determined by the point's type, which
         must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
         
        repeated .google.cloud.bigquery.migration.v2.Point points = 4 [(.google.api.field_behavior) = REQUIRED];
      • setUnknownFields

        public final TimeSeries.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<TimeSeries.Builder>
      • mergeUnknownFields

        public final TimeSeries.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<TimeSeries.Builder>