Class SimpleRetentionPolicy
java.lang.Object
com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy
com.azure.resourcemanager.recoveryservicesbackup.models.SimpleRetentionPolicy
Simple policy retention.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the retentionDuration property: Retention duration of the protection policy.void
validate()
Validates the instance.withRetentionDuration
(RetentionDuration retentionDuration) Set the retentionDuration property: Retention duration of the protection policy.
-
Constructor Details
-
SimpleRetentionPolicy
public SimpleRetentionPolicy()Creates an instance of SimpleRetentionPolicy class.
-
-
Method Details
-
retentionDuration
Get the retentionDuration property: Retention duration of the protection policy.- Returns:
- the retentionDuration value.
-
withRetentionDuration
Set the retentionDuration property: Retention duration of the protection policy.- Parameters:
retentionDuration
- the retentionDuration value to set.- Returns:
- the SimpleRetentionPolicy object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classRetentionPolicy
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-