Class MetricResult

java.lang.Object
com.azure.monitor.query.models.MetricResult

public final class MetricResult extends Object
The metrics result of a query.
  • Constructor Details

    • MetricResult

      public MetricResult(String id, String resourceType, MetricUnit unit, String metricName, List<TimeSeriesElement> timeSeries, String description, ResponseError httpResponseError)
      Creates an instance of the result data of a query.
      Parameters:
      id - The metrics id.
      resourceType - The resource type of the metrics resource.
      unit - The metrics unit.
      metricName - The name of the metrics.
      timeSeries - The time series returned when the query is performed.
      description - The display description of the metric.
      httpResponseError - The error information if the request failed to fetch the queried metric.
  • Method Details

    • getMetricName

      public String getMetricName()
      Returns the name of the metrics.
      Returns:
      the name of the metrics.
    • getId

      public String getId()
      Returns the metrics id.
      Returns:
      the metrics id.
    • getResourceType

      public String getResourceType()
      Returns the resource type of the metric resource.
      Returns:
      the resource type of the metric resource.
    • getUnit

      public MetricUnit getUnit()
      Returns the metrics unit of the metrics.
      Returns:
      the unit of the metrics.
    • getTimeSeries

      public List<TimeSeriesElement> getTimeSeries()
      Returns the time series returned when a data query is performed.
      Returns:
      the time series returned when a data query is performed.
    • getDescription

      public String getDescription()
      Returns the description of the metric.
      Returns:
      the description of the metric.
    • getError

      public ResponseError getError()
      Returns the error message encountered querying this specific metric.
      Returns:
      the error message encountered querying this specific metric.