Partager via


MetricValue Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.MetricValue

Implements

public class MetricValue
implements JsonSerializable<MetricValue>

Represents metrics values.

Constructor Summary

Constructor Description
MetricValue()

Creates an instance of MetricValue class.

Method Summary

Modifier and Type Method and Description
Double average()

Get the average property: The average value of the metric.

Integer count()

Get the count property: The number of values for the metric.

static MetricValue fromJson(JsonReader jsonReader)

Reads an instance of MetricValue from the JsonReader.

Double maximum()

Get the maximum property: The max value of the metric.

Double minimum()

Get the minimum property: The min value of the metric.

OffsetDateTime timestamp()

Get the timestamp property: The metric timestamp (ISO-8601 format).

JsonWriter toJson(JsonWriter jsonWriter)
Double total()

Get the total property: The total value of the metric.

void validate()

Validates the instance.

Methods inherited from java.lang.Object

Constructor Details

MetricValue

public MetricValue()

Creates an instance of MetricValue class.

Method Details

average

public Double average()

Get the average property: The average value of the metric.

Returns:

the average value.

count

public Integer count()

Get the count property: The number of values for the metric.

Returns:

the count value.

fromJson

public static MetricValue fromJson(JsonReader jsonReader)

Reads an instance of MetricValue from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MetricValue 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 MetricValue.

maximum

public Double maximum()

Get the maximum property: The max value of the metric.

Returns:

the maximum value.

minimum

public Double minimum()

Get the minimum property: The min value of the metric.

Returns:

the minimum value.

timestamp

public OffsetDateTime timestamp()

Get the timestamp property: The metric timestamp (ISO-8601 format).

Returns:

the timestamp value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

total

public Double total()

Get the total property: The total value of the metric.

Returns:

the total value.

validate

public void validate()

Validates the instance.

Applies to