Class ManagementEventAggregationCondition
java.lang.Object
com.azure.resourcemanager.monitor.models.ManagementEventAggregationCondition
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ManagementEventAggregationCondition>
public final class ManagementEventAggregationCondition
extends Object
implements com.azure.json.JsonSerializable<ManagementEventAggregationCondition>
How the data that is collected should be combined over time.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ManagementEventAggregationCondition class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ManagementEventAggregationCondition from the JsonReader.operator()Get the operator property: the condition operator.Get the threshold property: The threshold value that activates the alert.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.withOperator(ConditionOperator operator) Set the operator property: the condition operator.withThreshold(Double threshold) Set the threshold property: The threshold value that activates the alert.withWindowSize(Duration windowSize) Set the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.Methods inherited from class java.lang.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
-
ManagementEventAggregationCondition
public ManagementEventAggregationCondition()Creates an instance of ManagementEventAggregationCondition class.
-
-
Method Details
-
operator
Get the operator property: the condition operator.- Returns:
- the operator value.
-
withOperator
Set the operator property: the condition operator.- Parameters:
operator- the operator value to set.- Returns:
- the ManagementEventAggregationCondition object itself.
-
threshold
Get the threshold property: The threshold value that activates the alert.- Returns:
- the threshold value.
-
withThreshold
Set the threshold property: The threshold value that activates the alert.- Parameters:
threshold- the threshold value to set.- Returns:
- the ManagementEventAggregationCondition object itself.
-
windowSize
Get the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.- Returns:
- the windowSize value.
-
withWindowSize
Set the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.- Parameters:
windowSize- the windowSize value to set.- Returns:
- the ManagementEventAggregationCondition 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<ManagementEventAggregationCondition>- Throws:
IOException
-
fromJson
public static ManagementEventAggregationCondition fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ManagementEventAggregationCondition from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ManagementEventAggregationCondition if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ManagementEventAggregationCondition.
-