MetricSingleDimension Class

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

Implements

public final class MetricSingleDimension
implements JsonSerializable<MetricSingleDimension>

The metric dimension name and value.

Constructor Summary

Constructor Description
MetricSingleDimension()

Creates an instance of MetricSingleDimension class.

Method Summary

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

Reads an instance of MetricSingleDimension from the JsonReader.

String name()

Get the name property: Name of the dimension.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String value()

Get the value property: Value of the dimension.

MetricSingleDimension withName(String name)

Set the name property: Name of the dimension.

MetricSingleDimension withValue(String value)

Set the value property: Value of the dimension.

Methods inherited from java.lang.Object

Constructor Details

MetricSingleDimension

public MetricSingleDimension()

Creates an instance of MetricSingleDimension class.

Method Details

fromJson

public static MetricSingleDimension fromJson(JsonReader jsonReader)

Reads an instance of MetricSingleDimension from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

value

public String value()

Get the value property: Value of the dimension.

Returns:

the value value.

withName

public MetricSingleDimension withName(String name)

Set the name property: Name of the dimension.

Parameters:

name - the name value to set.

Returns:

the MetricSingleDimension object itself.

withValue

public MetricSingleDimension withValue(String value)

Set the value property: Value of the dimension.

Parameters:

value - the value value to set.

Returns:

the MetricSingleDimension object itself.

Applies to