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 Details

    • ScalingRule

      public ScalingRule()
      Creates an instance of ScalingRule class.
  • Method Details

    • actionType

      public ScaleActionType actionType()
      Get the actionType property: The action type.
      Returns:
      the actionType value.
    • withActionType

      public ScalingRule withActionType(ScaleActionType actionType)
      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

      public ScalingRule 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.
      Parameters:
      evaluationCount - the evaluationCount value to set.
      Returns:
      the ScalingRule object itself.
    • scalingMetric

      public String scalingMetric()
      Get the scalingMetric property: Metrics name for individual workloads. For example: cpu.
      Returns:
      the scalingMetric value.
    • withScalingMetric

      public ScalingRule withScalingMetric(String scalingMetric)
      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

      public ComparisonRule comparisonRule()
      Get the comparisonRule property: The comparison rule.
      Returns:
      the comparisonRule value.
    • withComparisonRule

      public ScalingRule withComparisonRule(ComparisonRule comparisonRule)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ScalingRule>
      Throws:
      IOException
    • fromJson

      public static ScalingRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.