Class Recurrence
java.lang.Object
com.azure.resourcemanager.monitor.models.Recurrence
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Recurrence>
The repeating times at which this profile begins. This element is not used if the FixedDate element is used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the frequency property: the recurrence frequency.static Recurrence
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of Recurrence from the JsonReader.schedule()
Get the schedule property: the scheduling constraints for when the profile begins.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withFrequency
(RecurrenceFrequency frequency) Set the frequency property: the recurrence frequency.withSchedule
(RecurrentSchedule schedule) Set the schedule property: the scheduling constraints for when the profile begins.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
-
Recurrence
public Recurrence()Creates an instance of Recurrence class.
-
-
Method Details
-
frequency
Get the frequency property: the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning each week will have the same set of profiles. For example, to set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly.- Returns:
- the frequency value.
-
withFrequency
Set the frequency property: the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning each week will have the same set of profiles. For example, to set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly.- Parameters:
frequency
- the frequency value to set.- Returns:
- the Recurrence object itself.
-
schedule
Get the schedule property: the scheduling constraints for when the profile begins.- Returns:
- the schedule value.
-
withSchedule
Set the schedule property: the scheduling constraints for when the profile begins.- Parameters:
schedule
- the schedule value to set.- Returns:
- the Recurrence 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<Recurrence>
- Throws:
IOException
-
fromJson
Reads an instance of Recurrence from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of Recurrence 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 Recurrence.
-