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 Summary
Constructors Constructor Description LongTermRetentionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DailyRetentionSchedule
dailySchedule()
Get the dailySchedule property: Daily retention schedule of the protection policy.MonthlyRetentionSchedule
monthlySchedule()
Get the monthlySchedule property: Monthly retention schedule of the protection policy.void
validate()
Validates the instance.WeeklyRetentionSchedule
weeklySchedule()
Get the weeklySchedule property: Weekly retention schedule of the protection policy.LongTermRetentionPolicy
withDailySchedule(DailyRetentionSchedule dailySchedule)
Set the dailySchedule property: Daily retention schedule of the protection policy.LongTermRetentionPolicy
withMonthlySchedule(MonthlyRetentionSchedule monthlySchedule)
Set the monthlySchedule property: Monthly retention schedule of the protection policy.LongTermRetentionPolicy
withWeeklySchedule(WeeklyRetentionSchedule weeklySchedule)
Set the weeklySchedule property: Weekly retention schedule of the protection policy.LongTermRetentionPolicy
withYearlySchedule(YearlyRetentionSchedule yearlySchedule)
Set the yearlySchedule property: Yearly retention schedule of the protection policy.YearlyRetentionSchedule
yearlySchedule()
Get the yearlySchedule property: Yearly retention schedule of the protection policy.
-
-
-
Method Detail
-
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 classRetentionPolicy
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-