Class JobSchedule
java.lang.Object
com.azure.resourcemanager.sql.models.JobSchedule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<JobSchedule>
public final class JobSchedule
extends Object
implements com.azure.json.JsonSerializable<JobSchedule>
Scheduling properties of a job.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenabled()Get the enabled property: Whether or not the schedule is enabled.endTime()Get the endTime property: Schedule end time.static JobSchedulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of JobSchedule from the JsonReader.interval()Get the interval property: Value of the schedule's recurring interval, if the ScheduleType is recurring.Get the startTime property: Schedule start time.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Schedule interval type.voidvalidate()Validates the instance.withEnabled(Boolean enabled) Set the enabled property: Whether or not the schedule is enabled.withEndTime(OffsetDateTime endTime) Set the endTime property: Schedule end time.withInterval(String interval) Set the interval property: Value of the schedule's recurring interval, if the ScheduleType is recurring.withStartTime(OffsetDateTime startTime) Set the startTime property: Schedule start time.withType(JobScheduleType type) Set the type property: Schedule interval type.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
-
JobSchedule
public JobSchedule()Creates an instance of JobSchedule class.
-
-
Method Details
-
startTime
Get the startTime property: Schedule start time.- Returns:
- the startTime value.
-
withStartTime
Set the startTime property: Schedule start time.- Parameters:
startTime- the startTime value to set.- Returns:
- the JobSchedule object itself.
-
endTime
Get the endTime property: Schedule end time.- Returns:
- the endTime value.
-
withEndTime
Set the endTime property: Schedule end time.- Parameters:
endTime- the endTime value to set.- Returns:
- the JobSchedule object itself.
-
type
Get the type property: Schedule interval type.- Returns:
- the type value.
-
withType
Set the type property: Schedule interval type.- Parameters:
type- the type value to set.- Returns:
- the JobSchedule object itself.
-
enabled
Get the enabled property: Whether or not the schedule is enabled.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: Whether or not the schedule is enabled.- Parameters:
enabled- the enabled value to set.- Returns:
- the JobSchedule object itself.
-
interval
Get the interval property: Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format.- Returns:
- the interval value.
-
withInterval
Set the interval property: Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format.- Parameters:
interval- the interval value to set.- Returns:
- the JobSchedule 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<JobSchedule>- Throws:
IOException
-
fromJson
Reads an instance of JobSchedule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of JobSchedule 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 JobSchedule.
-