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 Summary
ConstructorsConstructorDescriptionCreates an instance of VMScaleSetLifecycleHookEventTargetResource class. -
Method Summary
Modifier and TypeMethodDescriptionGet the actionState property: State of the lifecycle hook for the target resource.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VMScaleSetLifecycleHookEventTargetResource from the JsonReader.resource()Get the resource property: Specifies the target ARM resource.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withActionState(LifecycleHookActionState actionState) Set the actionState property: State of the lifecycle hook for the target resource.withResource(ApiEntityReference resource) Set the resource property: Specifies the target ARM resource.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
-
VMScaleSetLifecycleHookEventTargetResource
public VMScaleSetLifecycleHookEventTargetResource()Creates an instance of VMScaleSetLifecycleHookEventTargetResource class.
-
-
Method Details
-
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
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
public VMScaleSetLifecycleHookEventTargetResource withActionState(LifecycleHookActionState actionState) 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
- Specified by:
toJsonin interfacecom.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.
-