Class SimpleRetentionPolicy
- java.lang.Object
-
- com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy
-
- com.azure.resourcemanager.recoveryservicesbackup.models.SimpleRetentionPolicy
-
public final class SimpleRetentionPolicy extends RetentionPolicy
Simple policy retention.
-
-
Constructor Summary
Constructors Constructor Description SimpleRetentionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RetentionDuration
retentionDuration()
Get the retentionDuration property: Retention duration of the protection policy.void
validate()
Validates the instance.SimpleRetentionPolicy
withRetentionDuration(RetentionDuration retentionDuration)
Set the retentionDuration property: Retention duration of the protection policy.
-
-
-
Method Detail
-
retentionDuration
public RetentionDuration retentionDuration()
Get the retentionDuration property: Retention duration of the protection policy.- Returns:
- the retentionDuration value.
-
withRetentionDuration
public SimpleRetentionPolicy withRetentionDuration(RetentionDuration retentionDuration)
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.
-
-