Class DynamicThresholdFailingPeriods
java.lang.Object
com.azure.resourcemanager.monitor.models.DynamicThresholdFailingPeriods
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DynamicThresholdFailingPeriods>
public final class DynamicThresholdFailingPeriods
extends Object
implements com.azure.json.JsonSerializable<DynamicThresholdFailingPeriods>
The minimum number of violations required within the selected lookback time window required to raise an alert.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of DynamicThresholdFailingPeriods class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of DynamicThresholdFailingPeriods from the JsonReader.float
Get the minFailingPeriodsToAlert property: The number of violations to trigger an alert.float
Get the numberOfEvaluationPeriods property: The number of aggregated lookback points.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withMinFailingPeriodsToAlert
(float minFailingPeriodsToAlert) Set the minFailingPeriodsToAlert property: The number of violations to trigger an alert.withNumberOfEvaluationPeriods
(float numberOfEvaluationPeriods) Set the numberOfEvaluationPeriods property: The number of aggregated lookback points.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DynamicThresholdFailingPeriods
public DynamicThresholdFailingPeriods()Creates an instance of DynamicThresholdFailingPeriods class.
-
-
Method Details
-
numberOfEvaluationPeriods
public float numberOfEvaluationPeriods()Get the numberOfEvaluationPeriods property: The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points.- Returns:
- the numberOfEvaluationPeriods value.
-
withNumberOfEvaluationPeriods
public DynamicThresholdFailingPeriods withNumberOfEvaluationPeriods(float numberOfEvaluationPeriods) Set the numberOfEvaluationPeriods property: The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points.- Parameters:
numberOfEvaluationPeriods
- the numberOfEvaluationPeriods value to set.- Returns:
- the DynamicThresholdFailingPeriods object itself.
-
minFailingPeriodsToAlert
public float minFailingPeriodsToAlert()Get the minFailingPeriodsToAlert property: The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.- Returns:
- the minFailingPeriodsToAlert value.
-
withMinFailingPeriodsToAlert
Set the minFailingPeriodsToAlert property: The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods.- Parameters:
minFailingPeriodsToAlert
- the minFailingPeriodsToAlert value to set.- Returns:
- the DynamicThresholdFailingPeriods object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<DynamicThresholdFailingPeriods>
- Throws:
IOException
-
fromJson
public static DynamicThresholdFailingPeriods fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of DynamicThresholdFailingPeriods from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of DynamicThresholdFailingPeriods 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 DynamicThresholdFailingPeriods.
-