Share via


MetricResult Class

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

public final class MetricResult

The metrics result of a query.

Constructor Summary

Constructor Description
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.

Method Summary

Modifier and Type Method and Description
String getDescription()

Returns the description of the metric.

ResponseError getError()

Returns the error message encountered querying this specific metric.

String getId()

Returns the metrics id.

String getMetricName()

Returns the name of the metrics.

String getResourceType()

Returns the resource type of the metric resource.

List<TimeSeriesElement> getTimeSeries()

Returns the time series returned when a data query is performed.

MetricUnit getUnit()

Returns the metrics unit of the metrics.

Methods inherited from java.lang.Object

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

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.

getId

public String getId()

Returns the metrics id.

Returns:

the metrics id.

getMetricName

public String getMetricName()

Returns the name of the metrics.

Returns:

the name of the metrics.

getResourceType

public String getResourceType()

Returns the resource type of the metric resource.

Returns:

the resource type of the metric resource.

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.

getUnit

public MetricUnit getUnit()

Returns the metrics unit of the metrics.

Returns:

the unit of the metrics.

Applies to