Class VMScaleSetLifecycleHookEventTargetResource

java.lang.Object
com.azure.resourcemanager.compute.models.VMScaleSetLifecycleHookEventTargetResource
All Implemented Interfaces:
com.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventTargetResource>

public final class VMScaleSetLifecycleHookEventTargetResource extends Object implements com.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventTargetResource>
Define a single target ARM resource in a virtual machine scale set lifecycle hook event. Currently, this can be a virtual machine scale set resource or an individual virtual machine resource within a VMScaleSet.
  • Constructor Details

    • VMScaleSetLifecycleHookEventTargetResource

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

    • resource

      public ApiEntityReference resource()
      Get the resource property: Specifies the target ARM resource. Currently, this can be a virtual machine scale set resource or an individual virtual machine resource within a VMScaleSet.
      Returns:
      the resource value.
    • withResource

      Set the resource property: Specifies the target ARM resource. Currently, this can be a virtual machine scale set resource or an individual virtual machine resource within a VMScaleSet.
      Parameters:
      resource - the resource value to set.
      Returns:
      the VMScaleSetLifecycleHookEventTargetResource object itself.
    • actionState

      public LifecycleHookActionState actionState()
      Get the actionState property: State of the lifecycle hook for the target resource. The customer can patch this property to move the lifecycle hook to a terminal state.
      Returns:
      the actionState value.
    • withActionState

      Set the actionState property: State of the lifecycle hook for the target resource. The customer can patch this property to move the lifecycle hook to a terminal state.
      Parameters:
      actionState - the actionState value to set.
      Returns:
      the VMScaleSetLifecycleHookEventTargetResource 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<VMScaleSetLifecycleHookEventTargetResource>
      Throws:
      IOException
    • fromJson

      public static VMScaleSetLifecycleHookEventTargetResource fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of VMScaleSetLifecycleHookEventTargetResource from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of VMScaleSetLifecycleHookEventTargetResource 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 VMScaleSetLifecycleHookEventTargetResource.