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 Type
    Method
    Description
    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.
    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.
    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

      public OffsetDateTime getTimeStamp()
      Get the timeStamp property: The timestamp for the metric value in ISO 8601 format.
      Returns:
      the timeStamp value.
    • getAverage

      public Double getAverage()
      Get the average property: The average value in the time range.
      Returns:
      the average value.
    • getMinimum

      public Double getMinimum()
      Get the minimum property: The least value in the time range.
      Returns:
      the minimum value.
    • getMaximum

      public Double getMaximum()
      Get the maximum property: The greatest value in the time range.
      Returns:
      the maximum value.
    • getTotal

      public Double getTotal()
      Get the total property: The sum of all of the values in the time range.
      Returns:
      the total value.
    • getCount

      public Double 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<MetricValue>
      Throws:
      IOException
    • fromJson

      public static MetricValue fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.