Class RelativeMonthlySchedule
java.lang.Object
com.azure.resourcemanager.containerservice.models.RelativeMonthlySchedule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RelativeMonthlySchedule>
public final class RelativeMonthlySchedule
extends Object
implements com.azure.json.JsonSerializable<RelativeMonthlySchedule>
For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of RelativeMonthlySchedule class. -
Method Summary
Modifier and TypeMethodDescriptionGet the dayOfWeek property: Specifies on which day of the week the maintenance occurs.static RelativeMonthlySchedulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RelativeMonthlySchedule from the JsonReader.intGet the intervalMonths property: Specifies the number of months between each set of occurrences.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the weekIndex property: Specifies on which week of the month the dayOfWeek applies.withDayOfWeek(WeekDay dayOfWeek) Set the dayOfWeek property: Specifies on which day of the week the maintenance occurs.withIntervalMonths(int intervalMonths) Set the intervalMonths property: Specifies the number of months between each set of occurrences.withWeekIndex(Type weekIndex) Set the weekIndex property: Specifies on which week of the month the dayOfWeek applies.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
-
RelativeMonthlySchedule
public RelativeMonthlySchedule()Creates an instance of RelativeMonthlySchedule class.
-
-
Method Details
-
intervalMonths
public int intervalMonths()Get the intervalMonths property: Specifies the number of months between each set of occurrences.- Returns:
- the intervalMonths value.
-
withIntervalMonths
Set the intervalMonths property: Specifies the number of months between each set of occurrences.- Parameters:
intervalMonths- the intervalMonths value to set.- Returns:
- the RelativeMonthlySchedule object itself.
-
weekIndex
Get the weekIndex property: Specifies on which week of the month the dayOfWeek applies.- Returns:
- the weekIndex value.
-
withWeekIndex
Set the weekIndex property: Specifies on which week of the month the dayOfWeek applies.- Parameters:
weekIndex- the weekIndex value to set.- Returns:
- the RelativeMonthlySchedule 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 RelativeMonthlySchedule 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<RelativeMonthlySchedule>- Throws:
IOException
-
fromJson
public static RelativeMonthlySchedule fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of RelativeMonthlySchedule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of RelativeMonthlySchedule 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 RelativeMonthlySchedule.
-