Class ScalingRule
java.lang.Object
com.azure.resourcemanager.hdinsight.containers.models.ScalingRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ScalingRule>
public final class ScalingRule
extends Object
implements com.azure.json.JsonSerializable<ScalingRule>
The scaling rule.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the actionType property: The action type.Get the comparisonRule property: The comparison rule.intGet the evaluationCount property: This is an evaluation count for a scaling condition, the number of times a trigger condition should be successful, before scaling activity is triggered.static ScalingRulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ScalingRule from the JsonReader.Get the scalingMetric property: Metrics name for individual workloads.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withActionType(ScaleActionType actionType) Set the actionType property: The action type.withComparisonRule(ComparisonRule comparisonRule) Set the comparisonRule property: The comparison rule.withEvaluationCount(int evaluationCount) Set the evaluationCount property: This is an evaluation count for a scaling condition, the number of times a trigger condition should be successful, before scaling activity is triggered.withScalingMetric(String scalingMetric) Set the scalingMetric property: Metrics name for individual workloads.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ScalingRule
public ScalingRule()Creates an instance of ScalingRule class.
-
-
Method Details
-
actionType
Get the actionType property: The action type.- Returns:
- the actionType value.
-
withActionType
Set the actionType property: The action type.- Parameters:
actionType- the actionType value to set.- Returns:
- the ScalingRule object itself.
-
evaluationCount
public int evaluationCount()Get the evaluationCount property: This is an evaluation count for a scaling condition, the number of times a trigger condition should be successful, before scaling activity is triggered.- Returns:
- the evaluationCount value.
-
withEvaluationCount
Set the evaluationCount property: This is an evaluation count for a scaling condition, the number of times a trigger condition should be successful, before scaling activity is triggered.- Parameters:
evaluationCount- the evaluationCount value to set.- Returns:
- the ScalingRule object itself.
-
scalingMetric
Get the scalingMetric property: Metrics name for individual workloads. For example: cpu.- Returns:
- the scalingMetric value.
-
withScalingMetric
Set the scalingMetric property: Metrics name for individual workloads. For example: cpu.- Parameters:
scalingMetric- the scalingMetric value to set.- Returns:
- the ScalingRule object itself.
-
comparisonRule
Get the comparisonRule property: The comparison rule.- Returns:
- the comparisonRule value.
-
withComparisonRule
Set the comparisonRule property: The comparison rule.- Parameters:
comparisonRule- the comparisonRule value to set.- Returns:
- the ScalingRule object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ScalingRule>- Throws:
IOException
-
fromJson
Reads an instance of ScalingRule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ScalingRule 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 ScalingRule.
-