MetricDimension Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.MetricDimension

Implements

public final class MetricDimension
implements JsonSerializable<MetricDimension>

Specifies a metric dimension.

Constructor Summary

Constructor Description
MetricDimension()

Creates an instance of MetricDimension class.

Method Summary

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

Reads an instance of MetricDimension from the JsonReader.

String name()

Get the name property: Name of the dimension.

String operator()

Get the operator property: the dimension operator.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

List<String> values()

Get the values property: list of dimension values.

MetricDimension withName(String name)

Set the name property: Name of the dimension.

MetricDimension withOperator(String operator)

Set the operator property: the dimension operator.

MetricDimension withValues(List<String> values)

Set the values property: list of dimension values.

Methods inherited from java.lang.Object

Constructor Details

MetricDimension

public MetricDimension()

Creates an instance of MetricDimension class.

Method Details

fromJson

public static MetricDimension fromJson(JsonReader jsonReader)

Reads an instance of MetricDimension from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MetricDimension if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

name

public String name()

Get the name property: Name of the dimension.

Returns:

the name value.

operator

public String operator()

Get the operator property: the dimension operator. Only 'Include' and 'Exclude' are supported.

Returns:

the operator value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

values

public List values()

Get the values property: list of dimension values.

Returns:

the values value.

withName

public MetricDimension withName(String name)

Set the name property: Name of the dimension.

Parameters:

name - the name value to set.

Returns:

the MetricDimension object itself.

withOperator

public MetricDimension withOperator(String operator)

Set the operator property: the dimension operator. Only 'Include' and 'Exclude' are supported.

Parameters:

operator - the operator value to set.

Returns:

the MetricDimension object itself.

withValues

public MetricDimension withValues(List values)

Set the values property: list of dimension values.

Parameters:

values - the values value to set.

Returns:

the MetricDimension object itself.

Applies to