Class DeleteRetentionPolicy
java.lang.Object
com.azure.resourcemanager.elasticsan.models.DeleteRetentionPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DeleteRetentionPolicy>
public final class DeleteRetentionPolicy
extends Object
implements com.azure.json.JsonSerializable<DeleteRetentionPolicy>
Response for Delete Retention Policy object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DeleteRetentionPolicy
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of DeleteRetentionPolicy from the JsonReader.Get the policyState property: The policyState property.Get the retentionPeriodDays property: The number of days to retain the resources after deletion.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withPolicyState
(PolicyState policyState) Set the policyState property: The policyState property.withRetentionPeriodDays
(Integer retentionPeriodDays) Set the retentionPeriodDays property: The number of days to retain the resources after deletion.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DeleteRetentionPolicy
public DeleteRetentionPolicy()Creates an instance of DeleteRetentionPolicy class.
-
-
Method Details
-
policyState
Get the policyState property: The policyState property.- Returns:
- the policyState value.
-
withPolicyState
Set the policyState property: The policyState property.- Parameters:
policyState
- the policyState value to set.- Returns:
- the DeleteRetentionPolicy object itself.
-
retentionPeriodDays
Get the retentionPeriodDays property: The number of days to retain the resources after deletion.- Returns:
- the retentionPeriodDays value.
-
withRetentionPeriodDays
Set the retentionPeriodDays property: The number of days to retain the resources after deletion.- Parameters:
retentionPeriodDays
- the retentionPeriodDays value to set.- Returns:
- the DeleteRetentionPolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<DeleteRetentionPolicy>
- Throws:
IOException
-
fromJson
public static DeleteRetentionPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of DeleteRetentionPolicy from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of DeleteRetentionPolicy 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 DeleteRetentionPolicy.
-