Class WeeklySchedule
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 -
Method Summary
Modifier and TypeMethodDescriptionGet the dayOfWeek property: Specifies on which day of the week the maintenance occurs.static WeeklySchedulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of WeeklySchedule from the JsonReader.intGet the intervalWeeks property: Specifies the number of weeks between each set of occurrences.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDayOfWeek(WeekDay dayOfWeek) 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, waitMethods 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
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
Get the dayOfWeek property: Specifies on which day of the week the maintenance occurs.- Returns:
- the dayOfWeek value.
-
withDayOfWeek
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<WeeklySchedule>- Throws:
IOException
-
fromJson
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.
-