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 Details

    • VMScaleSetLifecycleHookEventAdditionalContext

      public VMScaleSetLifecycleHookEventAdditionalContext()
      Creates an instance of VMScaleSetLifecycleHookEventAdditionalContext class.
  • Method Details

    • priority

      public String 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

      public VMScaleSetLifecycleHookEventAdditionalContext withPriority(String priority)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.