Class TimeSeries (3.19.0)

public final class TimeSeries extends GeneratedMessageV3 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 Fields

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
TypeDescription
int

METRIC_FIELD_NUMBER

public static final int METRIC_FIELD_NUMBER
Field Value
TypeDescription
int

METRIC_KIND_FIELD_NUMBER

public static final int METRIC_KIND_FIELD_NUMBER
Field Value
TypeDescription
int

POINTS_FIELD_NUMBER

public static final int POINTS_FIELD_NUMBER
Field Value
TypeDescription
int

RESOURCE_FIELD_NUMBER

public static final int RESOURCE_FIELD_NUMBER
Field Value
TypeDescription
int

UNIT_FIELD_NUMBER

public static final int UNIT_FIELD_NUMBER
Field Value
TypeDescription
int

VALUE_TYPE_FIELD_NUMBER

public static final int VALUE_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TimeSeries getDefaultInstance()
Returns
TypeDescription
TimeSeries

getDescriptor()

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

newBuilder()

public static TimeSeries.Builder newBuilder()
Returns
TypeDescription
TimeSeries.Builder

newBuilder(TimeSeries prototype)

public static TimeSeries.Builder newBuilder(TimeSeries prototype)
Parameter
NameDescription
prototypeTimeSeries
Returns
TypeDescription
TimeSeries.Builder

parseDelimitedFrom(InputStream input)

public static TimeSeries parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TimeSeries parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TimeSeries parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TimeSeries parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TimeSeries parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TimeSeries parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TimeSeries parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TimeSeries parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TimeSeries parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TimeSeries parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TimeSeries parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TimeSeries parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TimeSeries
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TimeSeries> parser()
Returns
TypeDescription
Parser<TimeSeries>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public TimeSeries getDefaultInstanceForType()
Returns
TypeDescription
TimeSeries

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.

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.

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

getParserForType()

public Parser<TimeSeries> getParserForType()
Returns
TypeDescription
Parser<TimeSeries>
Overrides

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

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public TimeSeries.Builder newBuilderForType()
Returns
TypeDescription
TimeSeries.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TimeSeries.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TimeSeries.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public TimeSeries.Builder toBuilder()
Returns
TypeDescription
TimeSeries.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException