Class ScaleRuleMetricDimension
java.lang.Object
com.azure.resourcemanager.monitor.models.ScaleRuleMetricDimension
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ScaleRuleMetricDimension>
public final class ScaleRuleMetricDimension
extends Object
implements com.azure.json.JsonSerializable<ScaleRuleMetricDimension>
Specifies an auto scale rule metric dimension.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ScaleRuleMetricDimension class. -
Method Summary
Modifier and TypeMethodDescriptionGet the dimensionName property: Name of the dimension.static ScaleRuleMetricDimension
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ScaleRuleMetricDimension from the JsonReader.operator()
Get the operator property: the dimension operator.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.values()
Get the values property: list of dimension values.withDimensionName
(String dimensionName) Set the dimensionName property: Name of the dimension.Set the operator property: the dimension operator.withValues
(List<String> values) Set the values property: list of dimension values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ScaleRuleMetricDimension
public ScaleRuleMetricDimension()Creates an instance of ScaleRuleMetricDimension class.
-
-
Method Details
-
dimensionName
Get the dimensionName property: Name of the dimension.- Returns:
- the dimensionName value.
-
withDimensionName
Set the dimensionName property: Name of the dimension.- Parameters:
dimensionName
- the dimensionName value to set.- Returns:
- the ScaleRuleMetricDimension object itself.
-
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.
-
withOperator
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.
-
values
Get the values property: list of dimension values. For example: ["App1","App2"].- Returns:
- the values value.
-
withValues
Set the values property: list of dimension values. For example: ["App1","App2"].- Parameters:
values
- the values value to set.- Returns:
- the ScaleRuleMetricDimension object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ScaleRuleMetricDimension>
- Throws:
IOException
-
fromJson
public static ScaleRuleMetricDimension fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the ScaleRuleMetricDimension.
-