Class LongTermRetentionPolicy

java.lang.Object
com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy
com.azure.resourcemanager.recoveryservicesbackup.models.LongTermRetentionPolicy

public final class LongTermRetentionPolicy extends RetentionPolicy
Long term retention policy.
  • Constructor Details

    • LongTermRetentionPolicy

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

    • dailySchedule

      public DailyRetentionSchedule dailySchedule()
      Get the dailySchedule property: Daily retention schedule of the protection policy.
      Returns:
      the dailySchedule value.
    • withDailySchedule

      public LongTermRetentionPolicy withDailySchedule(DailyRetentionSchedule dailySchedule)
      Set the dailySchedule property: Daily retention schedule of the protection policy.
      Parameters:
      dailySchedule - the dailySchedule value to set.
      Returns:
      the LongTermRetentionPolicy object itself.
    • weeklySchedule

      public WeeklyRetentionSchedule weeklySchedule()
      Get the weeklySchedule property: Weekly retention schedule of the protection policy.
      Returns:
      the weeklySchedule value.
    • withWeeklySchedule

      public LongTermRetentionPolicy withWeeklySchedule(WeeklyRetentionSchedule weeklySchedule)
      Set the weeklySchedule property: Weekly retention schedule of the protection policy.
      Parameters:
      weeklySchedule - the weeklySchedule value to set.
      Returns:
      the LongTermRetentionPolicy object itself.
    • monthlySchedule

      public MonthlyRetentionSchedule monthlySchedule()
      Get the monthlySchedule property: Monthly retention schedule of the protection policy.
      Returns:
      the monthlySchedule value.
    • withMonthlySchedule

      public LongTermRetentionPolicy withMonthlySchedule(MonthlyRetentionSchedule monthlySchedule)
      Set the monthlySchedule property: Monthly retention schedule of the protection policy.
      Parameters:
      monthlySchedule - the monthlySchedule value to set.
      Returns:
      the LongTermRetentionPolicy object itself.
    • yearlySchedule

      public YearlyRetentionSchedule yearlySchedule()
      Get the yearlySchedule property: Yearly retention schedule of the protection policy.
      Returns:
      the yearlySchedule value.
    • withYearlySchedule

      public LongTermRetentionPolicy withYearlySchedule(YearlyRetentionSchedule yearlySchedule)
      Set the yearlySchedule property: Yearly retention schedule of the protection policy.
      Parameters:
      yearlySchedule - the yearlySchedule value to set.
      Returns:
      the LongTermRetentionPolicy object itself.
    • validate

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