Class AdvancedScheduleMonthlyOccurrence
java.lang.Object
com.azure.resourcemanager.automation.models.AdvancedScheduleMonthlyOccurrence
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AdvancedScheduleMonthlyOccurrence>
public final class AdvancedScheduleMonthlyOccurrence
extends Object
implements com.azure.json.JsonSerializable<AdvancedScheduleMonthlyOccurrence>
The properties of the create advanced schedule monthly occurrence.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AdvancedScheduleMonthlyOccurrence class. -
Method Summary
Modifier and TypeMethodDescriptionday()
Get the day property: Day of the occurrence.fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AdvancedScheduleMonthlyOccurrence from the JsonReader.Get the occurrence property: Occurrence of the week within the month.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withDay
(ScheduleDay day) Set the day property: Day of the occurrence.withOccurrence
(Integer occurrence) Set the occurrence property: Occurrence of the week within the month.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
-
AdvancedScheduleMonthlyOccurrence
public AdvancedScheduleMonthlyOccurrence()Creates an instance of AdvancedScheduleMonthlyOccurrence class.
-
-
Method Details
-
occurrence
Get the occurrence property: Occurrence of the week within the month. Must be between 1 and 5.- Returns:
- the occurrence value.
-
withOccurrence
Set the occurrence property: Occurrence of the week within the month. Must be between 1 and 5.- Parameters:
occurrence
- the occurrence value to set.- Returns:
- the AdvancedScheduleMonthlyOccurrence object itself.
-
day
Get the day property: Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.- Returns:
- the day value.
-
withDay
Set the day property: Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.- Parameters:
day
- the day value to set.- Returns:
- the AdvancedScheduleMonthlyOccurrence object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<AdvancedScheduleMonthlyOccurrence>
- Throws:
IOException
-
fromJson
public static AdvancedScheduleMonthlyOccurrence fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AdvancedScheduleMonthlyOccurrence from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of AdvancedScheduleMonthlyOccurrence 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 AdvancedScheduleMonthlyOccurrence.
-