Class WeeklyRecurrence

java.lang.Object
com.azure.resourcemanager.storagemover.models.Recurrence
com.azure.resourcemanager.storagemover.models.WeeklyRecurrence
All Implemented Interfaces:
com.azure.json.JsonSerializable<Recurrence>
Direct Known Subclasses:
UploadLimitWeeklyRecurrence

public class WeeklyRecurrence extends Recurrence
The weekly recurrence of the schedule.
  • Constructor Details

    • WeeklyRecurrence

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

    • days

      public List<DayOfWeek> days()
      Get the days property: The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence.
      Returns:
      the days value.
    • withDays

      public WeeklyRecurrence withDays(List<DayOfWeek> days)
      Set the days property: The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence.
      Parameters:
      days - the days value to set.
      Returns:
      the WeeklyRecurrence object itself.
    • withStartTime

      public WeeklyRecurrence withStartTime(Time startTime)
      Set the startTime property: The start time of the schedule recurrence. Full hour and 30-minute intervals are supported.
      Overrides:
      withStartTime in class Recurrence
      Parameters:
      startTime - the startTime value to set.
      Returns:
      the Recurrence object itself.
    • withEndTime

      public WeeklyRecurrence withEndTime(Time endTime)
      Set the endTime property: The end time of the schedule recurrence. Full hour and 30-minute intervals are supported.
      Overrides:
      withEndTime in class Recurrence
      Parameters:
      endTime - the endTime value to set.
      Returns:
      the Recurrence object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class Recurrence
      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<Recurrence>
      Overrides:
      toJson in class Recurrence
      Throws:
      IOException
    • fromJson

      public static WeeklyRecurrence fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of WeeklyRecurrence from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of WeeklyRecurrence 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 WeeklyRecurrence.