Class Cron
java.lang.Object
com.azure.resourcemanager.machinelearning.models.Cron
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Cron>
The workflow trigger cron for ComputeStartStop schedule type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the expression property: [Required] Specifies cron expression of schedule.static CronfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Cron from the JsonReader.Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format.timeZone()Get the timeZone property: Specifies time zone in which the schedule runs.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withExpression(String expression) Set the expression property: [Required] Specifies cron expression of schedule.withStartTime(String startTime) Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format.withTimeZone(String timeZone) Set the timeZone property: Specifies time zone in which the schedule runs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
Cron
public Cron()Creates an instance of Cron class.
-
-
Method Details
-
startTime
Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format.- Returns:
- the startTime value.
-
withStartTime
Set the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format.- Parameters:
startTime- the startTime value to set.- Returns:
- the Cron object itself.
-
timeZone
Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11.- Returns:
- the timeZone value.
-
withTimeZone
Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11.- Parameters:
timeZone- the timeZone value to set.- Returns:
- the Cron object itself.
-
expression
Get the expression property: [Required] Specifies cron expression of schedule. The expression should follow NCronTab format.- Returns:
- the expression value.
-
withExpression
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 Cron object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<Cron>- Throws:
IOException
-
fromJson
Reads an instance of Cron from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Cron if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the Cron.
-