Class ScaleRuleInner
java.lang.Object
com.azure.resourcemanager.monitor.fluent.models.ScaleRuleInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ScaleRuleInner>
public final class ScaleRuleInner
extends Object
implements com.azure.json.JsonSerializable<ScaleRuleInner>
A rule that provide the triggers and parameters for the scaling action.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ScaleRuleInner
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ScaleRuleInner from the JsonReader.Get the metricTrigger property: the trigger that results in a scaling action.Get the scaleAction property: the parameters for the scaling action.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withMetricTrigger
(MetricTrigger metricTrigger) Set the metricTrigger property: the trigger that results in a scaling action.withScaleAction
(ScaleAction scaleAction) Set the scaleAction property: the parameters for the scaling action.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
-
ScaleRuleInner
public ScaleRuleInner()Creates an instance of ScaleRuleInner class.
-
-
Method Details
-
metricTrigger
Get the metricTrigger property: the trigger that results in a scaling action.- Returns:
- the metricTrigger value.
-
withMetricTrigger
Set the metricTrigger property: the trigger that results in a scaling action.- Parameters:
metricTrigger
- the metricTrigger value to set.- Returns:
- the ScaleRuleInner object itself.
-
scaleAction
Get the scaleAction property: the parameters for the scaling action.- Returns:
- the scaleAction value.
-
withScaleAction
Set the scaleAction property: the parameters for the scaling action.- Parameters:
scaleAction
- the scaleAction value to set.- Returns:
- the ScaleRuleInner 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<ScaleRuleInner>
- Throws:
IOException
-
fromJson
Reads an instance of ScaleRuleInner from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ScaleRuleInner 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 ScaleRuleInner.
-