Class VMScaleSetLifecycleHookEventAdditionalContext
java.lang.Object
com.azure.resourcemanager.compute.models.VMScaleSetLifecycleHookEventAdditionalContext
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventAdditionalContext>
public final class VMScaleSetLifecycleHookEventAdditionalContext
extends Object
implements com.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventAdditionalContext>
Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data.
The keys in this dictionary are specific to the lifecycle hook type. Different lifecycle hook events can have
different sets of keys in the additional context depending on the lifecycle hook type.
For example, for a lifecycle hook event with UpgradeAutoOSScheduling type,
the additional context can contain the key "priority" that helps customer identify the priority of the Auto OS
Upgrade operation triggered on the virtual machine scale set.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of VMScaleSetLifecycleHookEventAdditionalContext class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VMScaleSetLifecycleHookEventAdditionalContext from the JsonReader.priority()Get the priority property: Can only be present for a lifecycle hook event of type "UpgradeAutoOSScheduling".com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withPriority(String priority) Set the priority property: Can only be present for a lifecycle hook event of type "UpgradeAutoOSScheduling".Methods inherited from class 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
-
VMScaleSetLifecycleHookEventAdditionalContext
public VMScaleSetLifecycleHookEventAdditionalContext()Creates an instance of VMScaleSetLifecycleHookEventAdditionalContext class.
-
-
Method Details
-
priority
Get the priority property: Can only be present for a lifecycle hook event of type "UpgradeAutoOSScheduling". Denotes the priority of the virtual machine scale set lifecycle hook event for the Auto OS Upgrade scheduled on the virtual machine scale set.- Returns:
- the priority value.
-
withPriority
Set the priority property: Can only be present for a lifecycle hook event of type "UpgradeAutoOSScheduling". Denotes the priority of the virtual machine scale set lifecycle hook event for the Auto OS Upgrade scheduled on the virtual machine scale set.- Parameters:
priority- the priority value to set.- Returns:
- the VMScaleSetLifecycleHookEventAdditionalContext 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<VMScaleSetLifecycleHookEventAdditionalContext>- Throws:
IOException
-
fromJson
public static VMScaleSetLifecycleHookEventAdditionalContext fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of VMScaleSetLifecycleHookEventAdditionalContext from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of VMScaleSetLifecycleHookEventAdditionalContext 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 VMScaleSetLifecycleHookEventAdditionalContext.
-