Class UpgradeOverrideSettings
java.lang.Object
com.azure.resourcemanager.containerservice.models.UpgradeOverrideSettings
- All Implemented Interfaces:
com.azure.json.JsonSerializable<UpgradeOverrideSettings>
public final class UpgradeOverrideSettings
extends Object
implements com.azure.json.JsonSerializable<UpgradeOverrideSettings>
Settings for overrides when upgrading a cluster.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of UpgradeOverrideSettings class. -
Method Summary
Modifier and TypeMethodDescriptionGet the forceUpgrade property: Whether to force upgrade the cluster.static UpgradeOverrideSettingsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of UpgradeOverrideSettings from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) until()Get the until property: Until when the overrides are effective.voidvalidate()Validates the instance.withForceUpgrade(Boolean forceUpgrade) Set the forceUpgrade property: Whether to force upgrade the cluster.withUntil(OffsetDateTime until) Set the until property: Until when the overrides are effective.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
-
UpgradeOverrideSettings
public UpgradeOverrideSettings()Creates an instance of UpgradeOverrideSettings class.
-
-
Method Details
-
forceUpgrade
Get the forceUpgrade property: Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with caution.- Returns:
- the forceUpgrade value.
-
withForceUpgrade
Set the forceUpgrade property: Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections such as checking for deprecated API usage. Enable this option only with caution.- Parameters:
forceUpgrade- the forceUpgrade value to set.- Returns:
- the UpgradeOverrideSettings object itself.
-
until
Get the until property: Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. It must be set for the overrides to take effect.- Returns:
- the until value.
-
withUntil
Set the until property: Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness won't change once an upgrade starts even if the `until` expires as upgrade proceeds. This field is not set by default. It must be set for the overrides to take effect.- Parameters:
until- the until value to set.- Returns:
- the UpgradeOverrideSettings 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<UpgradeOverrideSettings>- Throws:
IOException
-
fromJson
public static UpgradeOverrideSettings fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of UpgradeOverrideSettings from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of UpgradeOverrideSettings 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 UpgradeOverrideSettings.
-