Class MetricValue
java.lang.Object
com.azure.monitor.query.metrics.models.MetricValue
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MetricValue>
public final class MetricValue
extends Object
implements com.azure.json.JsonSerializable<MetricValue>
Represents a metric value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MetricValue
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MetricValue from the JsonReader.Get the average property: The average value in the time range.getCount()
Get the count property: The number of samples in the time range.Get the maximum property: The greatest value in the time range.Get the minimum property: The least value in the time range.Get the timeStamp property: The timestamp for the metric value in ISO 8601 format.getTotal()
Get the total property: The sum of all of the values in the time range.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
getTimeStamp
Get the timeStamp property: The timestamp for the metric value in ISO 8601 format.- Returns:
- the timeStamp value.
-
getAverage
Get the average property: The average value in the time range.- Returns:
- the average value.
-
getMinimum
Get the minimum property: The least value in the time range.- Returns:
- the minimum value.
-
getMaximum
Get the maximum property: The greatest value in the time range.- Returns:
- the maximum value.
-
getTotal
Get the total property: The sum of all of the values in the time range.- Returns:
- the total value.
-
getCount
Get the count property: The number of samples in the time range. Can be used to determine the number of values that contributed to the average value.- Returns:
- the count value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MetricValue>
- Throws:
IOException
-
fromJson
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:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the MetricValue.
-