MetricDefinitionInner Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.fluent.models.MetricDefinitionInner

Implements

public final class MetricDefinitionInner
implements JsonSerializable<MetricDefinitionInner>

Metric definition class specifies the metadata for a metric.

Constructor Summary

Constructor Description
MetricDefinitionInner()

Creates an instance of MetricDefinitionInner class.

Method Summary

Modifier and Type Method and Description
String category()

Get the category property: Custom category name for this metric.

List<LocalizableStringInner> dimensions()

Get the dimensions property: the name and the display name of the dimension, i.e.

String displayDescription()

Get the displayDescription property: Detailed description of this metric.

static MetricDefinitionInner fromJson(JsonReader jsonReader)

Reads an instance of MetricDefinitionInner from the JsonReader.

String id()

Get the id property: the resource identifier of the metric definition.

Boolean isDimensionRequired()

Get the isDimensionRequired property: Flag to indicate whether the dimension is required.

List<MetricAvailability> metricAvailabilities()

Get the metricAvailabilities property: the collection of what aggregation intervals are available to be queried.

MetricClass metricClass()

Get the metricClass property: The class of the metric.

LocalizableStringInner name()

Get the name property: the name and the display name of the metric, i.e.

String namespace()

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

AggregationType primaryAggregationType()

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

String resourceId()

Get the resourceId property: the resource identifier of the resource that emitted the metric.

List<AggregationType> supportedAggregationTypes()

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

JsonWriter toJson(JsonWriter jsonWriter)
Unit unit()

Get the unit property: The unit of the metric.

void validate()

Validates the instance.

MetricDefinitionInner withCategory(String category)

Set the category property: Custom category name for this metric.

MetricDefinitionInner withDimensions(List<LocalizableStringInner> dimensions)

Set the dimensions property: the name and the display name of the dimension, i.e.

MetricDefinitionInner withDisplayDescription(String displayDescription)

Set the displayDescription property: Detailed description of this metric.

MetricDefinitionInner withId(String id)

Set the id property: the resource identifier of the metric definition.

MetricDefinitionInner withIsDimensionRequired(Boolean isDimensionRequired)

Set the isDimensionRequired property: Flag to indicate whether the dimension is required.

MetricDefinitionInner withMetricAvailabilities(List<MetricAvailability> metricAvailabilities)

Set the metricAvailabilities property: the collection of what aggregation intervals are available to be queried.

MetricDefinitionInner withMetricClass(MetricClass metricClass)

Set the metricClass property: The class of the metric.

MetricDefinitionInner withName(LocalizableStringInner name)

Set the name property: the name and the display name of the metric, i.e.

MetricDefinitionInner withNamespace(String namespace)

Set the namespace property: the namespace the metric belongs to.

MetricDefinitionInner withPrimaryAggregationType(AggregationType primaryAggregationType)

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

MetricDefinitionInner withResourceId(String resourceId)

Set the resourceId property: the resource identifier of the resource that emitted the metric.

MetricDefinitionInner withSupportedAggregationTypes(List<AggregationType> supportedAggregationTypes)

Set the supportedAggregationTypes property: the collection of what aggregation types are supported.

MetricDefinitionInner withUnit(Unit unit)

Set the unit property: The unit of the metric.

Methods inherited from java.lang.Object

Constructor Details

MetricDefinitionInner

public MetricDefinitionInner()

Creates an instance of MetricDefinitionInner class.

Method Details

category

public String category()

Get the category property: Custom category name for this metric.

Returns:

the category value.

dimensions

public List dimensions()

Get the dimensions property: the name and the display name of the dimension, i.e. it is a localizable string.

Returns:

the dimensions value.

displayDescription

public String displayDescription()

Get the displayDescription property: Detailed description of this metric.

Returns:

the displayDescription value.

fromJson

public static MetricDefinitionInner fromJson(JsonReader jsonReader)

Reads an instance of MetricDefinitionInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

id

public String id()

Get the id property: the resource identifier of the metric definition.

Returns:

the id value.

isDimensionRequired

public Boolean isDimensionRequired()

Get the isDimensionRequired property: Flag to indicate whether the dimension is required.

Returns:

the isDimensionRequired value.

metricAvailabilities

public List metricAvailabilities()

Get the metricAvailabilities property: the collection of what aggregation intervals are available to be queried.

Returns:

the metricAvailabilities value.

metricClass

public MetricClass metricClass()

Get the metricClass property: The class of the metric.

Returns:

the metricClass value.

name

public LocalizableStringInner name()

Get the name property: the name and the display name of the metric, i.e. it is a localizable string.

Returns:

the name value.

namespace

public String namespace()

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

Returns:

the namespace value.

primaryAggregationType

public AggregationType primaryAggregationType()

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

Returns:

the primaryAggregationType value.

resourceId

public String resourceId()

Get the resourceId property: the resource identifier of the resource that emitted the metric.

Returns:

the resourceId value.

supportedAggregationTypes

public List supportedAggregationTypes()

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

Returns:

the supportedAggregationTypes value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

unit

public Unit unit()

Get the unit property: The unit of the metric.

Returns:

the unit value.

validate

public void validate()

Validates the instance.

withCategory

public MetricDefinitionInner withCategory(String category)

Set the category property: Custom category name for this metric.

Parameters:

category - the category value to set.

Returns:

the MetricDefinitionInner object itself.

withDimensions

public MetricDefinitionInner withDimensions(List dimensions)

Set the dimensions property: the name and the display name of the dimension, i.e. it is a localizable string.

Parameters:

dimensions - the dimensions value to set.

Returns:

the MetricDefinitionInner object itself.

withDisplayDescription

public MetricDefinitionInner withDisplayDescription(String displayDescription)

Set the displayDescription property: Detailed description of this metric.

Parameters:

displayDescription - the displayDescription value to set.

Returns:

the MetricDefinitionInner object itself.

withId

public MetricDefinitionInner withId(String id)

Set the id property: the resource identifier of the metric definition.

Parameters:

id - the id value to set.

Returns:

the MetricDefinitionInner object itself.

withIsDimensionRequired

public MetricDefinitionInner withIsDimensionRequired(Boolean isDimensionRequired)

Set the isDimensionRequired property: Flag to indicate whether the dimension is required.

Parameters:

isDimensionRequired - the isDimensionRequired value to set.

Returns:

the MetricDefinitionInner object itself.

withMetricAvailabilities

public MetricDefinitionInner withMetricAvailabilities(List metricAvailabilities)

Set the metricAvailabilities property: the collection of what aggregation intervals are available to be queried.

Parameters:

metricAvailabilities - the metricAvailabilities value to set.

Returns:

the MetricDefinitionInner object itself.

withMetricClass

public MetricDefinitionInner withMetricClass(MetricClass metricClass)

Set the metricClass property: The class of the metric.

Parameters:

metricClass - the metricClass value to set.

Returns:

the MetricDefinitionInner object itself.

withName

public MetricDefinitionInner withName(LocalizableStringInner name)

Set the name property: the name and the display name of the metric, i.e. it is a localizable string.

Parameters:

name - the name value to set.

Returns:

the MetricDefinitionInner object itself.

withNamespace

public MetricDefinitionInner withNamespace(String namespace)

Set the namespace property: the namespace the metric belongs to.

Parameters:

namespace - the namespace value to set.

Returns:

the MetricDefinitionInner object itself.

withPrimaryAggregationType

public MetricDefinitionInner withPrimaryAggregationType(AggregationType primaryAggregationType)

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

Parameters:

primaryAggregationType - the primaryAggregationType value to set.

Returns:

the MetricDefinitionInner object itself.

withResourceId

public MetricDefinitionInner withResourceId(String resourceId)

Set the resourceId property: the resource identifier of the resource that emitted the metric.

Parameters:

resourceId - the resourceId value to set.

Returns:

the MetricDefinitionInner object itself.

withSupportedAggregationTypes

public MetricDefinitionInner withSupportedAggregationTypes(List supportedAggregationTypes)

Set the supportedAggregationTypes property: the collection of what aggregation types are supported.

Parameters:

supportedAggregationTypes - the supportedAggregationTypes value to set.

Returns:

the MetricDefinitionInner object itself.

withUnit

public MetricDefinitionInner withUnit(Unit unit)

Set the unit property: The unit of the metric.

Parameters:

unit - the unit value to set.

Returns:

the MetricDefinitionInner object itself.

Applies to