Class TimeSeriesQuery (2.48.0)

public final class TimeSeriesQuery extends GeneratedMessageV3 implements TimeSeriesQueryOrBuilder

TimeSeriesQuery collects the set of supported methods for querying time series data from the Stackdriver metrics API.

Protobuf type google.monitoring.dashboard.v1.TimeSeriesQuery

Static Fields

OUTPUT_FULL_DURATION_FIELD_NUMBER

public static final int OUTPUT_FULL_DURATION_FIELD_NUMBER
Field Value
Type Description
int

PROMETHEUS_QUERY_FIELD_NUMBER

public static final int PROMETHEUS_QUERY_FIELD_NUMBER
Field Value
Type Description
int

TIME_SERIES_FILTER_FIELD_NUMBER

public static final int TIME_SERIES_FILTER_FIELD_NUMBER
Field Value
Type Description
int

TIME_SERIES_FILTER_RATIO_FIELD_NUMBER

public static final int TIME_SERIES_FILTER_RATIO_FIELD_NUMBER
Field Value
Type Description
int

TIME_SERIES_QUERY_LANGUAGE_FIELD_NUMBER

public static final int TIME_SERIES_QUERY_LANGUAGE_FIELD_NUMBER
Field Value
Type Description
int

UNIT_OVERRIDE_FIELD_NUMBER

public static final int UNIT_OVERRIDE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static TimeSeriesQuery getDefaultInstance()
Returns
Type Description
TimeSeriesQuery

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static TimeSeriesQuery.Builder newBuilder()
Returns
Type Description
TimeSeriesQuery.Builder

newBuilder(TimeSeriesQuery prototype)

public static TimeSeriesQuery.Builder newBuilder(TimeSeriesQuery prototype)
Parameter
Name Description
prototype TimeSeriesQuery
Returns
Type Description
TimeSeriesQuery.Builder

parseDelimitedFrom(InputStream input)

public static TimeSeriesQuery parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TimeSeriesQuery parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static TimeSeriesQuery parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TimeSeriesQuery parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TimeSeriesQuery parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TimeSeriesQuery parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TimeSeriesQuery parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TimeSeriesQuery parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static TimeSeriesQuery parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TimeSeriesQuery parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static TimeSeriesQuery parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TimeSeriesQuery parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TimeSeriesQuery
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<TimeSeriesQuery> parser()
Returns
Type Description
Parser<TimeSeriesQuery>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public TimeSeriesQuery getDefaultInstanceForType()
Returns
Type Description
TimeSeriesQuery

getOutputFullDuration()

public boolean getOutputFullDuration()

Optional. If set, Cloud Monitoring will treat the full query duration as the alignment period so that there will be only 1 output value.

*Note: This could override the configured alignment period except for the cases where a series of data points are expected, like

  • XyChart
  • Scorecard's spark chart

bool output_full_duration = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The outputFullDuration.

getParserForType()

public Parser<TimeSeriesQuery> getParserForType()
Returns
Type Description
Parser<TimeSeriesQuery>
Overrides

getPrometheusQuery()

public String getPrometheusQuery()

A query used to fetch time series with PromQL.

string prometheus_query = 6;

Returns
Type Description
String

The prometheusQuery.

getPrometheusQueryBytes()

public ByteString getPrometheusQueryBytes()

A query used to fetch time series with PromQL.

string prometheus_query = 6;

Returns
Type Description
ByteString

The bytes for prometheusQuery.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSourceCase()

public TimeSeriesQuery.SourceCase getSourceCase()
Returns
Type Description
TimeSeriesQuery.SourceCase

getTimeSeriesFilter()

public TimeSeriesFilter getTimeSeriesFilter()

Filter parameters to fetch time series.

.google.monitoring.dashboard.v1.TimeSeriesFilter time_series_filter = 1;

Returns
Type Description
TimeSeriesFilter

The timeSeriesFilter.

getTimeSeriesFilterOrBuilder()

public TimeSeriesFilterOrBuilder getTimeSeriesFilterOrBuilder()

Filter parameters to fetch time series.

.google.monitoring.dashboard.v1.TimeSeriesFilter time_series_filter = 1;

Returns
Type Description
TimeSeriesFilterOrBuilder

getTimeSeriesFilterRatio()

public TimeSeriesFilterRatio getTimeSeriesFilterRatio()

Parameters to fetch a ratio between two time series filters.

.google.monitoring.dashboard.v1.TimeSeriesFilterRatio time_series_filter_ratio = 2;

Returns
Type Description
TimeSeriesFilterRatio

The timeSeriesFilterRatio.

getTimeSeriesFilterRatioOrBuilder()

public TimeSeriesFilterRatioOrBuilder getTimeSeriesFilterRatioOrBuilder()

Parameters to fetch a ratio between two time series filters.

.google.monitoring.dashboard.v1.TimeSeriesFilterRatio time_series_filter_ratio = 2;

Returns
Type Description
TimeSeriesFilterRatioOrBuilder

getTimeSeriesQueryLanguage()

public String getTimeSeriesQueryLanguage()

A query used to fetch time series with MQL.

string time_series_query_language = 3;

Returns
Type Description
String

The timeSeriesQueryLanguage.

getTimeSeriesQueryLanguageBytes()

public ByteString getTimeSeriesQueryLanguageBytes()

A query used to fetch time series with MQL.

string time_series_query_language = 3;

Returns
Type Description
ByteString

The bytes for timeSeriesQueryLanguage.

getUnitOverride()

public String getUnitOverride()

The unit of data contained in fetched time series. If non-empty, this unit will override any unit that accompanies fetched data. The format is the same as the unit field in MetricDescriptor.

string unit_override = 5;

Returns
Type Description
String

The unitOverride.

getUnitOverrideBytes()

public ByteString getUnitOverrideBytes()

The unit of data contained in fetched time series. If non-empty, this unit will override any unit that accompanies fetched data. The format is the same as the unit field in MetricDescriptor.

string unit_override = 5;

Returns
Type Description
ByteString

The bytes for unitOverride.

hasPrometheusQuery()

public boolean hasPrometheusQuery()

A query used to fetch time series with PromQL.

string prometheus_query = 6;

Returns
Type Description
boolean

Whether the prometheusQuery field is set.

hasTimeSeriesFilter()

public boolean hasTimeSeriesFilter()

Filter parameters to fetch time series.

.google.monitoring.dashboard.v1.TimeSeriesFilter time_series_filter = 1;

Returns
Type Description
boolean

Whether the timeSeriesFilter field is set.

hasTimeSeriesFilterRatio()

public boolean hasTimeSeriesFilterRatio()

Parameters to fetch a ratio between two time series filters.

.google.monitoring.dashboard.v1.TimeSeriesFilterRatio time_series_filter_ratio = 2;

Returns
Type Description
boolean

Whether the timeSeriesFilterRatio field is set.

hasTimeSeriesQueryLanguage()

public boolean hasTimeSeriesQueryLanguage()

A query used to fetch time series with MQL.

string time_series_query_language = 3;

Returns
Type Description
boolean

Whether the timeSeriesQueryLanguage field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public TimeSeriesQuery.Builder newBuilderForType()
Returns
Type Description
TimeSeriesQuery.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TimeSeriesQuery.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TimeSeriesQuery.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public TimeSeriesQuery.Builder toBuilder()
Returns
Type Description
TimeSeriesQuery.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException