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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComparisonRulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ComparisonRule from the JsonReader.operator()Get the operator property: The comparison operator.floatGet the threshold property: Threshold setting.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withOperator(ComparisonOperator operator) Set the operator property: The comparison operator.withThreshold(float threshold) Set the threshold property: Threshold setting.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
-
ComparisonRule
public ComparisonRule()Creates an instance of ComparisonRule class.
-
-
Method Details
-
operator
Get the operator property: The comparison operator.- Returns:
- the operator value.
-
withOperator
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
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ComparisonRule>- Throws:
IOException
-
fromJson
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.
-