Class RecommendedActionMetricInfo

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

public final class RecommendedActionMetricInfo extends Object implements com.azure.json.JsonSerializable<RecommendedActionMetricInfo>
Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of RecommendedActionMetricInfo class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of RecommendedActionMetricInfo from the JsonReader.
    Get the metricName property: Gets the name of the metric. e.g., CPU, Number of Queries.
    Get the startTime property: Gets the start time of time interval given by this MetricInfo.
    Get the timeGrain property: Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour).
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the unit property: Gets the unit in which metric is measured. e.g., DTU, Frequency.
    void
    Validates the instance.
    Get the value property: Gets the value of the metric in the time interval given by this MetricInfo.

    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
  • Constructor Details

    • RecommendedActionMetricInfo

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

    • metricName

      public String metricName()
      Get the metricName property: Gets the name of the metric. e.g., CPU, Number of Queries.
      Returns:
      the metricName value.
    • unit

      public String unit()
      Get the unit property: Gets the unit in which metric is measured. e.g., DTU, Frequency.
      Returns:
      the unit value.
    • timeGrain

      public String timeGrain()
      Get the timeGrain property: Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour).
      Returns:
      the timeGrain value.
    • startTime

      public OffsetDateTime startTime()
      Get the startTime property: Gets the start time of time interval given by this MetricInfo.
      Returns:
      the startTime value.
    • value

      public Double value()
      Get the value property: Gets the value of the metric in the time interval given by this MetricInfo.
      Returns:
      the value value.
    • 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<RecommendedActionMetricInfo>
      Throws:
      IOException
    • fromJson

      public static RecommendedActionMetricInfo fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RecommendedActionMetricInfo from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RecommendedActionMetricInfo 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 RecommendedActionMetricInfo.