QueryMetricInterval Class

  • java.lang.Object
    • com.azure.resourcemanager.sql.models.QueryMetricInterval

Implements

public final class QueryMetricInterval
implements JsonSerializable<QueryMetricInterval>

Properties of a query metrics interval.

Constructor Summary

Constructor Description
QueryMetricInterval()

Creates an instance of QueryMetricInterval class.

Method Summary

Modifier and Type Method and Description
Long executionCount()

Get the executionCount property: Execution count of a query in this interval.

static QueryMetricInterval fromJson(JsonReader jsonReader)

Reads an instance of QueryMetricInterval from the JsonReader.

String intervalStartTime()

Get the intervalStartTime property: The start time for the metric interval (ISO-8601 format).

QueryTimeGrainType intervalType()

Get the intervalType property: Interval type (length).

List<QueryMetricProperties> metrics()

Get the metrics property: List of metric objects for this interval.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

QueryMetricInterval withMetrics(List<QueryMetricProperties> metrics)

Set the metrics property: List of metric objects for this interval.

Methods inherited from java.lang.Object

Constructor Details

QueryMetricInterval

public QueryMetricInterval()

Creates an instance of QueryMetricInterval class.

Method Details

executionCount

public Long executionCount()

Get the executionCount property: Execution count of a query in this interval.

Returns:

the executionCount value.

fromJson

public static QueryMetricInterval fromJson(JsonReader jsonReader)

Reads an instance of QueryMetricInterval from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of QueryMetricInterval if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the QueryMetricInterval.

intervalStartTime

public String intervalStartTime()

Get the intervalStartTime property: The start time for the metric interval (ISO-8601 format).

Returns:

the intervalStartTime value.

intervalType

public QueryTimeGrainType intervalType()

Get the intervalType property: Interval type (length).

Returns:

the intervalType value.

metrics

public List metrics()

Get the metrics property: List of metric objects for this interval.

Returns:

the metrics value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMetrics

public QueryMetricInterval withMetrics(List metrics)

Set the metrics property: List of metric objects for this interval.

Parameters:

metrics - the metrics value to set.

Returns:

the QueryMetricInterval object itself.

Applies to