java.lang.Object
com.azure.resourcemanager.machinelearning.models.Cron
All Implemented Interfaces:
com.azure.json.JsonSerializable<Cron>

public final class Cron extends Object implements com.azure.json.JsonSerializable<Cron>
The workflow trigger cron for ComputeStartStop schedule type.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of Cron class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the expression property: [Required] Specifies cron expression of schedule.
    static Cron
    fromJson(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.
    Get the timeZone property: Specifies time zone in which the schedule runs.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    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, wait

    Methods 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

      public String startTime()
      Get the startTime property: The start time in yyyy-MM-ddTHH:mm:ss format.
      Returns:
      the startTime value.
    • withStartTime

      public Cron withStartTime(String startTime)
      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

      public String 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

      public Cron withTimeZone(String timeZone)
      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

      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 Cron 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 Cron object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<Cron>
      Throws:
      IOException
    • fromJson

      public static Cron fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.