Class PredictiveAutoscalePolicy
java.lang.Object
com.azure.resourcemanager.monitor.models.PredictiveAutoscalePolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PredictiveAutoscalePolicy>
public final class PredictiveAutoscalePolicy
extends Object
implements com.azure.json.JsonSerializable<PredictiveAutoscalePolicy>
The parameters for enabling predictive autoscale.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PredictiveAutoscalePolicy class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PredictiveAutoscalePolicy
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of PredictiveAutoscalePolicy from the JsonReader.Get the scaleLookAheadTime property: the amount of time to specify by which instances are launched in advance.Get the scaleMode property: the predictive autoscale mode.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withScaleLookAheadTime
(Duration scaleLookAheadTime) Set the scaleLookAheadTime property: the amount of time to specify by which instances are launched in advance.withScaleMode
(PredictiveAutoscalePolicyScaleMode scaleMode) Set the scaleMode property: the predictive autoscale mode.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
-
PredictiveAutoscalePolicy
public PredictiveAutoscalePolicy()Creates an instance of PredictiveAutoscalePolicy class.
-
-
Method Details
-
scaleMode
Get the scaleMode property: the predictive autoscale mode.- Returns:
- the scaleMode value.
-
withScaleMode
Set the scaleMode property: the predictive autoscale mode.- Parameters:
scaleMode
- the scaleMode value to set.- Returns:
- the PredictiveAutoscalePolicy object itself.
-
scaleLookAheadTime
Get the scaleLookAheadTime property: the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format.- Returns:
- the scaleLookAheadTime value.
-
withScaleLookAheadTime
Set the scaleLookAheadTime property: the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format.- Parameters:
scaleLookAheadTime
- the scaleLookAheadTime value to set.- Returns:
- the PredictiveAutoscalePolicy 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<PredictiveAutoscalePolicy>
- Throws:
IOException
-
fromJson
public static PredictiveAutoscalePolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PredictiveAutoscalePolicy from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of PredictiveAutoscalePolicy 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 PredictiveAutoscalePolicy.
-