Class CronSchedule
- java.lang.Object
-
- com.azure.resourcemanager.machinelearning.models.ScheduleBase
-
- com.azure.resourcemanager.machinelearning.models.CronSchedule
-
public final class CronSchedule extends ScheduleBase
Cron schedule definition.
-
-
Constructor Summary
Constructors Constructor Description CronSchedule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
expression()
Get the expression property: [Required] Specifies cron expression of schedule.void
validate()
Validates the instance.CronSchedule
withEndTime(OffsetDateTime endTime)
Set the endTime property: Specifies end time of schedule in ISO 8601 format.CronSchedule
withExpression(String expression)
Set the expression property: [Required] Specifies cron expression of schedule.CronSchedule
withScheduleStatus(ScheduleStatus scheduleStatus)
Set the scheduleStatus property: Specifies the schedule's status.CronSchedule
withStartTime(OffsetDateTime startTime)
Set the startTime property: Specifies start time of schedule in ISO 8601 format.CronSchedule
withTimeZone(String timeZone)
Set the timeZone property: Specifies time zone in which the schedule runs.-
Methods inherited from class com.azure.resourcemanager.machinelearning.models.ScheduleBase
endTime, scheduleStatus, startTime, timeZone
-
-
-
-
Method Detail
-
expression
public String expression()
Get the expression property: [Required] Specifies cron expression of schedule. The expression should follow NCronTab format.- Returns:
- the expression value.
-
withExpression
public CronSchedule withExpression(String expression)
Set the expression property: [Required] Specifies cron expression of schedule. The expression should follow NCronTab format.- Parameters:
expression
- the expression value to set.- Returns:
- the CronSchedule object itself.
-
withEndTime
public CronSchedule withEndTime(OffsetDateTime endTime)
Set the endTime property: Specifies end time of schedule in ISO 8601 format. If not present, the schedule will run indefinitely.- Overrides:
withEndTime
in classScheduleBase
- Parameters:
endTime
- the endTime value to set.- Returns:
- the ScheduleBase object itself.
-
withScheduleStatus
public CronSchedule withScheduleStatus(ScheduleStatus scheduleStatus)
Set the scheduleStatus property: Specifies the schedule's status.- Overrides:
withScheduleStatus
in classScheduleBase
- Parameters:
scheduleStatus
- the scheduleStatus value to set.- Returns:
- the ScheduleBase object itself.
-
withStartTime
public CronSchedule withStartTime(OffsetDateTime startTime)
Set the startTime property: Specifies start time of schedule in ISO 8601 format.- Overrides:
withStartTime
in classScheduleBase
- Parameters:
startTime
- the startTime value to set.- Returns:
- the ScheduleBase object itself.
-
withTimeZone
public CronSchedule withTimeZone(String timeZone)
Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time zone format.- Overrides:
withTimeZone
in classScheduleBase
- Parameters:
timeZone
- the timeZone value to set.- Returns:
- the ScheduleBase object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classScheduleBase
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-