Package com.azure.compute.batch.models
Class UpgradePolicy
java.lang.Object
com.azure.compute.batch.models.UpgradePolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<UpgradePolicy>
public final class UpgradePolicy
extends Object
implements com.azure.json.JsonSerializable<UpgradePolicy>
Describes an upgrade policy - automatic, manual, or rolling.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UpgradePolicy
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of UpgradePolicy from the JsonReader.Get the automaticOsUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.getMode()
Get the mode property: Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set.Get the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.setAutomaticOsUpgradePolicy
(AutomaticOsUpgradePolicy automaticOsUpgradePolicy) Set the automaticOsUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade.setRollingUpgradePolicy
(RollingUpgradePolicy rollingUpgradePolicy) Set the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) 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
-
UpgradePolicy
Creates an instance of UpgradePolicy class.- Parameters:
mode
- the mode value to set.
-
-
Method Details
-
getMode
Get the mode property: Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs updates in batches with an optional pause time in between.- Returns:
- the mode value.
-
getAutomaticOsUpgradePolicy
Get the automaticOsUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade.- Returns:
- the automaticOsUpgradePolicy value.
-
setAutomaticOsUpgradePolicy
Set the automaticOsUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade.- Parameters:
automaticOsUpgradePolicy
- the automaticOsUpgradePolicy value to set.- Returns:
- the UpgradePolicy object itself.
-
getRollingUpgradePolicy
Get the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.- Returns:
- the rollingUpgradePolicy value.
-
setRollingUpgradePolicy
Set the rollingUpgradePolicy property: The configuration parameters used while performing a rolling upgrade.- Parameters:
rollingUpgradePolicy
- the rollingUpgradePolicy value to set.- Returns:
- the UpgradePolicy object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<UpgradePolicy>
- Throws:
IOException
-
fromJson
Reads an instance of UpgradePolicy from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of UpgradePolicy 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 UpgradePolicy.
-