Class DeleteRetentionPolicy
- java.lang.Object
-
- com.azure.resourcemanager.storage.models.DeleteRetentionPolicy
-
public final class DeleteRetentionPolicy extends Object
The service properties for soft delete.
-
-
Constructor Summary
Constructors Constructor Description DeleteRetentionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integerdays()Get the days property: Indicates the number of days that the deleted item should be retained.Booleanenabled()Get the enabled property: Indicates whether DeleteRetentionPolicy is enabled.voidvalidate()Validates the instance.DeleteRetentionPolicywithDays(Integer days)Set the days property: Indicates the number of days that the deleted item should be retained.DeleteRetentionPolicywithEnabled(Boolean enabled)Set the enabled property: Indicates whether DeleteRetentionPolicy is enabled.
-
-
-
Method Detail
-
enabled
public Boolean enabled()
Get the enabled property: Indicates whether DeleteRetentionPolicy is enabled.- Returns:
- the enabled value.
-
withEnabled
public DeleteRetentionPolicy withEnabled(Boolean enabled)
Set the enabled property: Indicates whether DeleteRetentionPolicy is enabled.- Parameters:
enabled- the enabled value to set.- Returns:
- the DeleteRetentionPolicy object itself.
-
days
public Integer days()
Get the days property: Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365.- Returns:
- the days value.
-
withDays
public DeleteRetentionPolicy withDays(Integer days)
Set the days property: Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365.- Parameters:
days- the days value to set.- Returns:
- the DeleteRetentionPolicy object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-