Class ComparisonRule

java.lang.Object
com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule
All Implemented Interfaces:
com.azure.json.JsonSerializable<ComparisonRule>

public final class ComparisonRule extends Object implements com.azure.json.JsonSerializable<ComparisonRule>
The comparison rule.
  • Constructor Details

    • ComparisonRule

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

    • operator

      public ComparisonOperator operator()
      Get the operator property: The comparison operator.
      Returns:
      the operator value.
    • withOperator

      public ComparisonRule withOperator(ComparisonOperator operator)
      Set the operator property: The comparison operator.
      Parameters:
      operator - the operator value to set.
      Returns:
      the ComparisonRule object itself.
    • threshold

      public float threshold()
      Get the threshold property: Threshold setting.
      Returns:
      the threshold value.
    • withThreshold

      public ComparisonRule withThreshold(float threshold)
      Set the threshold property: Threshold setting.
      Parameters:
      threshold - the threshold value to set.
      Returns:
      the ComparisonRule 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<ComparisonRule>
      Throws:
      IOException
    • fromJson

      public static ComparisonRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ComparisonRule from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ComparisonRule 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 ComparisonRule.