ScaleRuleMetricDimension Class

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

Implements

public final class ScaleRuleMetricDimension
implements JsonSerializable<ScaleRuleMetricDimension>

Specifies an auto scale rule metric dimension.

Constructor Summary

Constructor Description
ScaleRuleMetricDimension()

Creates an instance of ScaleRuleMetricDimension class.

Method Summary

Modifier and Type Method and Description
String dimensionName()

Get the dimensionName property: Name of the dimension.

static ScaleRuleMetricDimension fromJson(JsonReader jsonReader)

Reads an instance of ScaleRuleMetricDimension from the JsonReader.

ScaleRuleMetricDimensionOperationType 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.

ScaleRuleMetricDimension withDimensionName(String dimensionName)

Set the dimensionName property: Name of the dimension.

ScaleRuleMetricDimension withOperator(ScaleRuleMetricDimensionOperationType operator)

Set the operator property: the dimension operator.

ScaleRuleMetricDimension withValues(List<String> values)

Set the values property: list of dimension values.

Methods inherited from java.lang.Object

Constructor Details

ScaleRuleMetricDimension

public ScaleRuleMetricDimension()

Creates an instance of ScaleRuleMetricDimension class.

Method Details

dimensionName

public String dimensionName()

Get the dimensionName property: Name of the dimension.

Returns:

the dimensionName value.

fromJson

public static ScaleRuleMetricDimension fromJson(JsonReader jsonReader)

Reads an instance of ScaleRuleMetricDimension from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

operator

public ScaleRuleMetricDimensionOperationType operator()

Get the operator property: the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values.

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. For example: ["App1","App2"].

Returns:

the values value.

withDimensionName

public ScaleRuleMetricDimension withDimensionName(String dimensionName)

Set the dimensionName property: Name of the dimension.

Parameters:

dimensionName - the dimensionName value to set.

Returns:

the ScaleRuleMetricDimension object itself.

withOperator

public ScaleRuleMetricDimension withOperator(ScaleRuleMetricDimensionOperationType operator)

Set the operator property: the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values.

Parameters:

operator - the operator value to set.

Returns:

the ScaleRuleMetricDimension object itself.

withValues

public ScaleRuleMetricDimension withValues(List values)

Set the values property: list of dimension values. For example: ["App1","App2"].

Parameters:

values - the values value to set.

Returns:

the ScaleRuleMetricDimension object itself.

Applies to