Class QueryMetricInterval

java.lang.Object
com.azure.resourcemanager.sql.models.QueryMetricInterval
All Implemented Interfaces:
com.azure.json.JsonSerializable<QueryMetricInterval>

public final class QueryMetricInterval extends Object implements com.azure.json.JsonSerializable<QueryMetricInterval>
Properties of a query metrics interval.
  • Constructor Details

    • QueryMetricInterval

      public QueryMetricInterval()
      Creates an instance of QueryMetricInterval class.
  • Method Details

    • 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.
    • executionCount

      public Long executionCount()
      Get the executionCount property: Execution count of a query in this interval.
      Returns:
      the executionCount value.
    • metrics

      public List<QueryMetricProperties> metrics()
      Get the metrics property: List of metric objects for this interval.
      Returns:
      the metrics value.
    • withMetrics

      public QueryMetricInterval withMetrics(List<QueryMetricProperties> metrics)
      Set the metrics property: List of metric objects for this interval.
      Parameters:
      metrics - the metrics value to set.
      Returns:
      the QueryMetricInterval object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

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

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