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

public final class WeeklySchedule extends Object implements com.azure.json.JsonSerializable<WeeklySchedule>
For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the dayOfWeek property: Specifies on which day of the week the maintenance occurs.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of WeeklySchedule from the JsonReader.
    int
    Get the intervalWeeks property: Specifies the number of weeks between each set of occurrences.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the dayOfWeek property: Specifies on which day of the week the maintenance occurs.
    withIntervalWeeks(int intervalWeeks)
    Set the intervalWeeks property: Specifies the number of weeks between each set of occurrences.

    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

    • WeeklySchedule

      public WeeklySchedule()
      Creates an instance of WeeklySchedule class.
  • Method Details

    • intervalWeeks

      public int intervalWeeks()
      Get the intervalWeeks property: Specifies the number of weeks between each set of occurrences.
      Returns:
      the intervalWeeks value.
    • withIntervalWeeks

      public WeeklySchedule withIntervalWeeks(int intervalWeeks)
      Set the intervalWeeks property: Specifies the number of weeks between each set of occurrences.
      Parameters:
      intervalWeeks - the intervalWeeks value to set.
      Returns:
      the WeeklySchedule object itself.
    • dayOfWeek

      public WeekDay dayOfWeek()
      Get the dayOfWeek property: Specifies on which day of the week the maintenance occurs.
      Returns:
      the dayOfWeek value.
    • withDayOfWeek

      public WeeklySchedule withDayOfWeek(WeekDay dayOfWeek)
      Set the dayOfWeek property: Specifies on which day of the week the maintenance occurs.
      Parameters:
      dayOfWeek - the dayOfWeek value to set.
      Returns:
      the WeeklySchedule 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<WeeklySchedule>
      Throws:
      IOException
    • fromJson

      public static WeeklySchedule fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of WeeklySchedule from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of WeeklySchedule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the WeeklySchedule.