Class TimeSeries.Builder (3.22.0)

public static final class TimeSeries.Builder extends GeneratedMessageV3.Builder<TimeSeries.Builder> implements TimeSeriesOrBuilder

A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series.

Protobuf type google.monitoring.v3.TimeSeries

Implements

TimeSeriesOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllPoints(Iterable<? extends Point> values)

public TimeSeries.Builder addAllPoints(Iterable<? extends Point> values)

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.monitoring.v3.Point points = 5;

Parameter
NameDescription
valuesIterable<? extends com.google.monitoring.v3.Point>
Returns
TypeDescription
TimeSeries.Builder

addPoints(Point value)

public TimeSeries.Builder addPoints(Point value)

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.monitoring.v3.Point points = 5;

Parameter
NameDescription
valuePoint
Returns
TypeDescription
TimeSeries.Builder

addPoints(Point.Builder builderForValue)

public TimeSeries.Builder addPoints(Point.Builder builderForValue)

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.monitoring.v3.Point points = 5;

Parameter
NameDescription
builderForValuePoint.Builder
Returns
TypeDescription
TimeSeries.Builder

addPoints(int index, Point value)

public TimeSeries.Builder addPoints(int index, Point value)

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.monitoring.v3.Point points = 5;

Parameters
NameDescription
indexint
valuePoint
Returns
TypeDescription
TimeSeries.Builder

addPoints(int index, Point.Builder builderForValue)

public TimeSeries.Builder addPoints(int index, Point.Builder builderForValue)

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.monitoring.v3.Point points = 5;

Parameters
NameDescription
indexint
builderForValuePoint.Builder
Returns
TypeDescription
TimeSeries.Builder

addPointsBuilder()

public Point.Builder addPointsBuilder()

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.monitoring.v3.Point points = 5;

Returns
TypeDescription
Point.Builder

addPointsBuilder(int index)

public Point.Builder addPointsBuilder(int index)

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.monitoring.v3.Point points = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
Point.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TimeSeries.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TimeSeries.Builder
Overrides

build()

public TimeSeries build()
Returns
TypeDescription
TimeSeries

buildPartial()

public TimeSeries buildPartial()
Returns
TypeDescription
TimeSeries

clear()

public TimeSeries.Builder clear()
Returns
TypeDescription
TimeSeries.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public TimeSeries.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TimeSeries.Builder
Overrides

clearMetadata()

public TimeSeries.Builder clearMetadata()

Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored.

.google.api.MonitoredResourceMetadata metadata = 7;

Returns
TypeDescription
TimeSeries.Builder

clearMetric()

public TimeSeries.Builder clearMetric()

The associated metric. A fully-specified metric used to identify the time series.

.google.api.Metric metric = 1;

Returns
TypeDescription
TimeSeries.Builder

clearMetricKind()

public TimeSeries.Builder clearMetricKind()

The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. 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;

Returns
TypeDescription
TimeSeries.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public TimeSeries.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TimeSeries.Builder
Overrides

clearPoints()

public TimeSeries.Builder clearPoints()

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.monitoring.v3.Point points = 5;

Returns
TypeDescription
TimeSeries.Builder

clearResource()

public TimeSeries.Builder clearResource()

The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics.

.google.api.MonitoredResource resource = 2;

Returns
TypeDescription
TimeSeries.Builder

clearUnit()

public TimeSeries.Builder clearUnit()

The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.

string unit = 8;

Returns
TypeDescription
TimeSeries.Builder

This builder for chaining.

clearValueType()

public TimeSeries.Builder clearValueType()

The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field.

.google.api.MetricDescriptor.ValueType value_type = 4;

Returns
TypeDescription
TimeSeries.Builder

This builder for chaining.

clone()

public TimeSeries.Builder clone()
Returns
TypeDescription
TimeSeries.Builder
Overrides

getDefaultInstanceForType()

public TimeSeries getDefaultInstanceForType()
Returns
TypeDescription
TimeSeries

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMetadata()

public MonitoredResourceMetadata getMetadata()

Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored.

.google.api.MonitoredResourceMetadata metadata = 7;

Returns
TypeDescription
com.google.api.MonitoredResourceMetadata

The metadata.

getMetadataBuilder()

public MonitoredResourceMetadata.Builder getMetadataBuilder()

Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored.

.google.api.MonitoredResourceMetadata metadata = 7;

Returns
TypeDescription
com.google.api.MonitoredResourceMetadata.Builder

getMetadataOrBuilder()

public MonitoredResourceMetadataOrBuilder getMetadataOrBuilder()

Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored.

.google.api.MonitoredResourceMetadata metadata = 7;

Returns
TypeDescription
com.google.api.MonitoredResourceMetadataOrBuilder

getMetric()

public Metric getMetric()

The associated metric. A fully-specified metric used to identify the time series.

.google.api.Metric metric = 1;

Returns
TypeDescription
com.google.api.Metric

The metric.

getMetricBuilder()

public Metric.Builder getMetricBuilder()

The associated metric. A fully-specified metric used to identify the time series.

.google.api.Metric metric = 1;

Returns
TypeDescription
com.google.api.Metric.Builder

getMetricKind()

public MetricDescriptor.MetricKind getMetricKind()

The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. 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;

Returns
TypeDescription
com.google.api.MetricDescriptor.MetricKind

The metricKind.

getMetricKindValue()

public int getMetricKindValue()

The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. 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;

Returns
TypeDescription
int

The enum numeric value on the wire for metricKind.

getMetricOrBuilder()

public MetricOrBuilder getMetricOrBuilder()

The associated metric. A fully-specified metric used to identify the time series.

.google.api.Metric metric = 1;

Returns
TypeDescription
com.google.api.MetricOrBuilder

getPoints(int index)

public Point getPoints(int index)

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.monitoring.v3.Point points = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
Point

getPointsBuilder(int index)

public Point.Builder getPointsBuilder(int index)

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.monitoring.v3.Point points = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
Point.Builder

getPointsBuilderList()

public List<Point.Builder> getPointsBuilderList()

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.monitoring.v3.Point points = 5;

Returns
TypeDescription
List<Builder>

getPointsCount()

public int getPointsCount()

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.monitoring.v3.Point points = 5;

Returns
TypeDescription
int

getPointsList()

public List<Point> getPointsList()

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.monitoring.v3.Point points = 5;

Returns
TypeDescription
List<Point>

getPointsOrBuilder(int index)

public PointOrBuilder getPointsOrBuilder(int index)

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.monitoring.v3.Point points = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
PointOrBuilder

getPointsOrBuilderList()

public List<? extends PointOrBuilder> getPointsOrBuilderList()

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.monitoring.v3.Point points = 5;

Returns
TypeDescription
List<? extends com.google.monitoring.v3.PointOrBuilder>

getResource()

public MonitoredResource getResource()

The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics.

.google.api.MonitoredResource resource = 2;

Returns
TypeDescription
com.google.api.MonitoredResource

The resource.

getResourceBuilder()

public MonitoredResource.Builder getResourceBuilder()

The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics.

.google.api.MonitoredResource resource = 2;

Returns
TypeDescription
com.google.api.MonitoredResource.Builder

getResourceOrBuilder()

public MonitoredResourceOrBuilder getResourceOrBuilder()

The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics.

.google.api.MonitoredResource resource = 2;

Returns
TypeDescription
com.google.api.MonitoredResourceOrBuilder

getUnit()

public String getUnit()

The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.

string unit = 8;

Returns
TypeDescription
String

The unit.

getUnitBytes()

public ByteString getUnitBytes()

The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.

string unit = 8;

Returns
TypeDescription
ByteString

The bytes for unit.

getValueType()

public MetricDescriptor.ValueType getValueType()

The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field.

.google.api.MetricDescriptor.ValueType value_type = 4;

Returns
TypeDescription
com.google.api.MetricDescriptor.ValueType

The valueType.

getValueTypeValue()

public int getValueTypeValue()

The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field.

.google.api.MetricDescriptor.ValueType value_type = 4;

Returns
TypeDescription
int

The enum numeric value on the wire for valueType.

hasMetadata()

public boolean hasMetadata()

Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored.

.google.api.MonitoredResourceMetadata metadata = 7;

Returns
TypeDescription
boolean

Whether the metadata field is set.

hasMetric()

public boolean hasMetric()

The associated metric. A fully-specified metric used to identify the time series.

.google.api.Metric metric = 1;

Returns
TypeDescription
boolean

Whether the metric field is set.

hasResource()

public boolean hasResource()

The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics.

.google.api.MonitoredResource resource = 2;

Returns
TypeDescription
boolean

Whether the resource field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TimeSeries other)

public TimeSeries.Builder mergeFrom(TimeSeries other)
Parameter
NameDescription
otherTimeSeries
Returns
TypeDescription
TimeSeries.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TimeSeries.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TimeSeries.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TimeSeries.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
TimeSeries.Builder
Overrides

mergeMetadata(MonitoredResourceMetadata value)

public TimeSeries.Builder mergeMetadata(MonitoredResourceMetadata value)

Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored.

.google.api.MonitoredResourceMetadata metadata = 7;

Parameter
NameDescription
valuecom.google.api.MonitoredResourceMetadata
Returns
TypeDescription
TimeSeries.Builder

mergeMetric(Metric value)

public TimeSeries.Builder mergeMetric(Metric value)

The associated metric. A fully-specified metric used to identify the time series.

.google.api.Metric metric = 1;

Parameter
NameDescription
valuecom.google.api.Metric
Returns
TypeDescription
TimeSeries.Builder

mergeResource(MonitoredResource value)

public TimeSeries.Builder mergeResource(MonitoredResource value)

The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics.

.google.api.MonitoredResource resource = 2;

Parameter
NameDescription
valuecom.google.api.MonitoredResource
Returns
TypeDescription
TimeSeries.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TimeSeries.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TimeSeries.Builder
Overrides

removePoints(int index)

public TimeSeries.Builder removePoints(int index)

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.monitoring.v3.Point points = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
TimeSeries.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public TimeSeries.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TimeSeries.Builder
Overrides

setMetadata(MonitoredResourceMetadata value)

public TimeSeries.Builder setMetadata(MonitoredResourceMetadata value)

Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored.

.google.api.MonitoredResourceMetadata metadata = 7;

Parameter
NameDescription
valuecom.google.api.MonitoredResourceMetadata
Returns
TypeDescription
TimeSeries.Builder

setMetadata(MonitoredResourceMetadata.Builder builderForValue)

public TimeSeries.Builder setMetadata(MonitoredResourceMetadata.Builder builderForValue)

Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored.

.google.api.MonitoredResourceMetadata metadata = 7;

Parameter
NameDescription
builderForValuecom.google.api.MonitoredResourceMetadata.Builder
Returns
TypeDescription
TimeSeries.Builder

setMetric(Metric value)

public TimeSeries.Builder setMetric(Metric value)

The associated metric. A fully-specified metric used to identify the time series.

.google.api.Metric metric = 1;

Parameter
NameDescription
valuecom.google.api.Metric
Returns
TypeDescription
TimeSeries.Builder

setMetric(Metric.Builder builderForValue)

public TimeSeries.Builder setMetric(Metric.Builder builderForValue)

The associated metric. A fully-specified metric used to identify the time series.

.google.api.Metric metric = 1;

Parameter
NameDescription
builderForValuecom.google.api.Metric.Builder
Returns
TypeDescription
TimeSeries.Builder

setMetricKind(MetricDescriptor.MetricKind value)

public TimeSeries.Builder setMetricKind(MetricDescriptor.MetricKind value)

The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. 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;

Parameter
NameDescription
valuecom.google.api.MetricDescriptor.MetricKind

The metricKind to set.

Returns
TypeDescription
TimeSeries.Builder

This builder for chaining.

setMetricKindValue(int value)

public TimeSeries.Builder setMetricKindValue(int value)

The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. 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;

Parameter
NameDescription
valueint

The enum numeric value on the wire for metricKind to set.

Returns
TypeDescription
TimeSeries.Builder

This builder for chaining.

setPoints(int index, Point value)

public TimeSeries.Builder setPoints(int index, Point value)

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.monitoring.v3.Point points = 5;

Parameters
NameDescription
indexint
valuePoint
Returns
TypeDescription
TimeSeries.Builder

setPoints(int index, Point.Builder builderForValue)

public TimeSeries.Builder setPoints(int index, Point.Builder builderForValue)

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.monitoring.v3.Point points = 5;

Parameters
NameDescription
indexint
builderForValuePoint.Builder
Returns
TypeDescription
TimeSeries.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TimeSeries.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
TimeSeries.Builder
Overrides

setResource(MonitoredResource value)

public TimeSeries.Builder setResource(MonitoredResource value)

The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics.

.google.api.MonitoredResource resource = 2;

Parameter
NameDescription
valuecom.google.api.MonitoredResource
Returns
TypeDescription
TimeSeries.Builder

setResource(MonitoredResource.Builder builderForValue)

public TimeSeries.Builder setResource(MonitoredResource.Builder builderForValue)

The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics.

.google.api.MonitoredResource resource = 2;

Parameter
NameDescription
builderForValuecom.google.api.MonitoredResource.Builder
Returns
TypeDescription
TimeSeries.Builder

setUnit(String value)

public TimeSeries.Builder setUnit(String value)

The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.

string unit = 8;

Parameter
NameDescription
valueString

The unit to set.

Returns
TypeDescription
TimeSeries.Builder

This builder for chaining.

setUnitBytes(ByteString value)

public TimeSeries.Builder setUnitBytes(ByteString value)

The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.

string unit = 8;

Parameter
NameDescription
valueByteString

The bytes for unit to set.

Returns
TypeDescription
TimeSeries.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final TimeSeries.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TimeSeries.Builder
Overrides

setValueType(MetricDescriptor.ValueType value)

public TimeSeries.Builder setValueType(MetricDescriptor.ValueType value)

The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field.

.google.api.MetricDescriptor.ValueType value_type = 4;

Parameter
NameDescription
valuecom.google.api.MetricDescriptor.ValueType

The valueType to set.

Returns
TypeDescription
TimeSeries.Builder

This builder for chaining.

setValueTypeValue(int value)

public TimeSeries.Builder setValueTypeValue(int value)

The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.

When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field.

.google.api.MetricDescriptor.ValueType value_type = 4;

Parameter
NameDescription
valueint

The enum numeric value on the wire for valueType to set.

Returns
TypeDescription
TimeSeries.Builder

This builder for chaining.