java.lang.Object
com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration

public final class RetentionDuration extends Object
Retention duration.
  • Constructor Details

    • RetentionDuration

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

    • count

      public Integer count()
      Get the count property: Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.
      Returns:
      the count value.
    • withCount

      public RetentionDuration withCount(Integer count)
      Set the count property: Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.
      Parameters:
      count - the count value to set.
      Returns:
      the RetentionDuration object itself.
    • durationType

      public RetentionDurationType durationType()
      Get the durationType property: Retention duration type of retention policy.
      Returns:
      the durationType value.
    • withDurationType

      public RetentionDuration withDurationType(RetentionDurationType durationType)
      Set the durationType property: Retention duration type of retention policy.
      Parameters:
      durationType - the durationType value to set.
      Returns:
      the RetentionDuration object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.