Class SimpleSchedulePolicy
- java.lang.Object
-
- com.azure.resourcemanager.recoveryservicesbackup.models.SchedulePolicy
-
- com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicy
-
public final class SimpleSchedulePolicy extends SchedulePolicy
Simple policy schedule.
-
-
Constructor Summary
Constructors Constructor Description SimpleSchedulePolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HourlySchedule
hourlySchedule()
Get the hourlySchedule property: Hourly Schedule of this Policy.List<DayOfWeek>
scheduleRunDays()
Get the scheduleRunDays property: List of days of week this schedule has to be run.ScheduleRunType
scheduleRunFrequency()
Get the scheduleRunFrequency property: Frequency of the schedule operation of this policy.List<OffsetDateTime>
scheduleRunTimes()
Get the scheduleRunTimes property: List of times of day this schedule has to be run.Integer
scheduleWeeklyFrequency()
Get the scheduleWeeklyFrequency property: At every number weeks this schedule has to be run.void
validate()
Validates the instance.SimpleSchedulePolicy
withHourlySchedule(HourlySchedule hourlySchedule)
Set the hourlySchedule property: Hourly Schedule of this Policy.SimpleSchedulePolicy
withScheduleRunDays(List<DayOfWeek> scheduleRunDays)
Set the scheduleRunDays property: List of days of week this schedule has to be run.SimpleSchedulePolicy
withScheduleRunFrequency(ScheduleRunType scheduleRunFrequency)
Set the scheduleRunFrequency property: Frequency of the schedule operation of this policy.SimpleSchedulePolicy
withScheduleRunTimes(List<OffsetDateTime> scheduleRunTimes)
Set the scheduleRunTimes property: List of times of day this schedule has to be run.SimpleSchedulePolicy
withScheduleWeeklyFrequency(Integer scheduleWeeklyFrequency)
Set the scheduleWeeklyFrequency property: At every number weeks this schedule has to be run.
-
-
-
Method Detail
-
scheduleRunFrequency
public ScheduleRunType scheduleRunFrequency()
Get the scheduleRunFrequency property: Frequency of the schedule operation of this policy.- Returns:
- the scheduleRunFrequency value.
-
withScheduleRunFrequency
public SimpleSchedulePolicy withScheduleRunFrequency(ScheduleRunType scheduleRunFrequency)
Set the scheduleRunFrequency property: Frequency of the schedule operation of this policy.- Parameters:
scheduleRunFrequency
- the scheduleRunFrequency value to set.- Returns:
- the SimpleSchedulePolicy object itself.
-
scheduleRunDays
public List<DayOfWeek> scheduleRunDays()
Get the scheduleRunDays property: List of days of week this schedule has to be run.- Returns:
- the scheduleRunDays value.
-
withScheduleRunDays
public SimpleSchedulePolicy withScheduleRunDays(List<DayOfWeek> scheduleRunDays)
Set the scheduleRunDays property: List of days of week this schedule has to be run.- Parameters:
scheduleRunDays
- the scheduleRunDays value to set.- Returns:
- the SimpleSchedulePolicy object itself.
-
scheduleRunTimes
public List<OffsetDateTime> scheduleRunTimes()
Get the scheduleRunTimes property: List of times of day this schedule has to be run.- Returns:
- the scheduleRunTimes value.
-
withScheduleRunTimes
public SimpleSchedulePolicy withScheduleRunTimes(List<OffsetDateTime> scheduleRunTimes)
Set the scheduleRunTimes property: List of times of day this schedule has to be run.- Parameters:
scheduleRunTimes
- the scheduleRunTimes value to set.- Returns:
- the SimpleSchedulePolicy object itself.
-
hourlySchedule
public HourlySchedule hourlySchedule()
Get the hourlySchedule property: Hourly Schedule of this Policy.- Returns:
- the hourlySchedule value.
-
withHourlySchedule
public SimpleSchedulePolicy withHourlySchedule(HourlySchedule hourlySchedule)
Set the hourlySchedule property: Hourly Schedule of this Policy.- Parameters:
hourlySchedule
- the hourlySchedule value to set.- Returns:
- the SimpleSchedulePolicy object itself.
-
scheduleWeeklyFrequency
public Integer scheduleWeeklyFrequency()
Get the scheduleWeeklyFrequency property: At every number weeks this schedule has to be run.- Returns:
- the scheduleWeeklyFrequency value.
-
withScheduleWeeklyFrequency
public SimpleSchedulePolicy withScheduleWeeklyFrequency(Integer scheduleWeeklyFrequency)
Set the scheduleWeeklyFrequency property: At every number weeks this schedule has to be run.- Parameters:
scheduleWeeklyFrequency
- the scheduleWeeklyFrequency value to set.- Returns:
- the SimpleSchedulePolicy object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classSchedulePolicy
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-