MetricDefinition Class

  • java.lang.Object
    • com.azure.developer.loadtesting.models.MetricDefinition

Implements

public final class MetricDefinition
implements JsonSerializable<MetricDefinition>

Metric definition.

Method Summary

Modifier and Type Method and Description
static MetricDefinition fromJson(JsonReader jsonReader)

Reads an instance of MetricDefinition from the JsonReader.

String getDescription()

Get the description property: The metric description.

List<NameAndDescription> getDimensions()

Get the dimensions property: List of dimensions.

List<MetricAvailability> getMetricAvailabilities()

Get the metricAvailabilities property: Metric availability specifies the time grain (aggregation interval or frequency).

String getName()

Get the name property: The metric name.

String getNamespace()

Get the namespace property: The namespace the metric belongs to.

AggregationType getPrimaryAggregationType()

Get the primaryAggregationType property: The primary aggregation type value defining how to use the values for display.

List<String> getSupportedAggregationTypes()

Get the supportedAggregationTypes property: The collection of what all aggregation types are supported.

MetricUnit getUnit()

Get the unit property: The unit of the metric.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static MetricDefinition fromJson(JsonReader jsonReader)

Reads an instance of MetricDefinition from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MetricDefinition 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 MetricDefinition.

getDescription

public String getDescription()

Get the description property: The metric description.

Returns:

the description value.

getDimensions

public List<NameAndDescription> getDimensions()

Get the dimensions property: List of dimensions.

Returns:

the dimensions value.

getMetricAvailabilities

public List<MetricAvailability> getMetricAvailabilities()

Get the metricAvailabilities property: Metric availability specifies the time grain (aggregation interval or frequency).

Returns:

the metricAvailabilities value.

getName

public String getName()

Get the name property: The metric name.

Returns:

the name value.

getNamespace

public String getNamespace()

Get the namespace property: The namespace the metric belongs to.

Returns:

the namespace value.

getPrimaryAggregationType

public AggregationType getPrimaryAggregationType()

Get the primaryAggregationType property: The primary aggregation type value defining how to use the values for display.

Returns:

the primaryAggregationType value.

getSupportedAggregationTypes

public List<String> getSupportedAggregationTypes()

Get the supportedAggregationTypes property: The collection of what all aggregation types are supported.

Returns:

the supportedAggregationTypes value.

getUnit

public MetricUnit getUnit()

Get the unit property: The unit of the metric.

Returns:

the unit value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to