Class ResiliencyPolicy
java.lang.Object
com.azure.resourcemanager.compute.models.ResiliencyPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ResiliencyPolicy>
public final class ResiliencyPolicy
extends Object
implements com.azure.json.JsonSerializable<ResiliencyPolicy>
Describes an resiliency policy - resilientVMCreationPolicy and/or resilientVMDeletionPolicy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResiliencyPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ResiliencyPolicy from the JsonReader.Get the resilientVMCreationPolicy property: The configuration parameters used while performing resilient VM creation.Get the resilientVMDeletionPolicy property: The configuration parameters used while performing resilient VM deletion.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withResilientVMCreationPolicy(ResilientVMCreationPolicy resilientVMCreationPolicy) Set the resilientVMCreationPolicy property: The configuration parameters used while performing resilient VM creation.withResilientVMDeletionPolicy(ResilientVMDeletionPolicy resilientVMDeletionPolicy) Set the resilientVMDeletionPolicy property: The configuration parameters used while performing resilient VM deletion.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
-
ResiliencyPolicy
public ResiliencyPolicy()Creates an instance of ResiliencyPolicy class.
-
-
Method Details
-
resilientVMCreationPolicy
Get the resilientVMCreationPolicy property: The configuration parameters used while performing resilient VM creation.- Returns:
- the resilientVMCreationPolicy value.
-
withResilientVMCreationPolicy
public ResiliencyPolicy withResilientVMCreationPolicy(ResilientVMCreationPolicy resilientVMCreationPolicy) Set the resilientVMCreationPolicy property: The configuration parameters used while performing resilient VM creation.- Parameters:
resilientVMCreationPolicy- the resilientVMCreationPolicy value to set.- Returns:
- the ResiliencyPolicy object itself.
-
resilientVMDeletionPolicy
Get the resilientVMDeletionPolicy property: The configuration parameters used while performing resilient VM deletion.- Returns:
- the resilientVMDeletionPolicy value.
-
withResilientVMDeletionPolicy
public ResiliencyPolicy withResilientVMDeletionPolicy(ResilientVMDeletionPolicy resilientVMDeletionPolicy) Set the resilientVMDeletionPolicy property: The configuration parameters used while performing resilient VM deletion.- Parameters:
resilientVMDeletionPolicy- the resilientVMDeletionPolicy value to set.- Returns:
- the ResiliencyPolicy 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<ResiliencyPolicy>- Throws:
IOException
-
fromJson
Reads an instance of ResiliencyPolicy from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ResiliencyPolicy 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 ResiliencyPolicy.
-