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 Details

    • SimpleRetentionPolicy

      public SimpleRetentionPolicy()
      Creates an instance of SimpleRetentionPolicy class.
  • Method Details

    • 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 class RetentionPolicy
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.