Share via


RecurrencePattern Class

  • java.lang.Object
    • com.azure.resourcemanager.labservices.models.RecurrencePattern

Implements

public final class RecurrencePattern
implements JsonSerializable<RecurrencePattern>

Recurrence pattern of a lab schedule.

Constructor Summary

Constructor Description
RecurrencePattern()

Creates an instance of RecurrencePattern class.

Method Summary

Modifier and Type Method and Description
OffsetDateTime expirationDate()

Get the expirationDate property: When the recurrence will expire.

RecurrenceFrequency frequency()

Get the frequency property: The frequency of the recurrence.

static RecurrencePattern fromJson(JsonReader jsonReader)

Reads an instance of RecurrencePattern from the JsonReader.

Integer interval()

Get the interval property: The interval to invoke the schedule on.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

List<WeekDay> weekDays()

Get the weekDays property: The week days the schedule runs.

RecurrencePattern withExpirationDate(OffsetDateTime expirationDate)

Set the expirationDate property: When the recurrence will expire.

RecurrencePattern withFrequency(RecurrenceFrequency frequency)

Set the frequency property: The frequency of the recurrence.

RecurrencePattern withInterval(Integer interval)

Set the interval property: The interval to invoke the schedule on.

RecurrencePattern withWeekDays(List<WeekDay> weekDays)

Set the weekDays property: The week days the schedule runs.

Methods inherited from java.lang.Object

Constructor Details

RecurrencePattern

public RecurrencePattern()

Creates an instance of RecurrencePattern class.

Method Details

expirationDate

public OffsetDateTime expirationDate()

Get the expirationDate property: When the recurrence will expire. This date is inclusive.

Returns:

the expirationDate value.

frequency

public RecurrenceFrequency frequency()

Get the frequency property: The frequency of the recurrence.

Returns:

the frequency value.

fromJson

public static RecurrencePattern fromJson(JsonReader jsonReader)

Reads an instance of RecurrencePattern from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RecurrencePattern if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

interval

public Integer interval()

Get the interval property: The interval to invoke the schedule on. For example, interval = 2 and RecurrenceFrequency.Daily will run every 2 days. When no interval is supplied, an interval of 1 is used.

Returns:

the interval value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

weekDays

public List<WeekDay> weekDays()

Get the weekDays property: The week days the schedule runs. Used for when the Frequency is set to Weekly.

Returns:

the weekDays value.

withExpirationDate

public RecurrencePattern withExpirationDate(OffsetDateTime expirationDate)

Set the expirationDate property: When the recurrence will expire. This date is inclusive.

Parameters:

expirationDate - the expirationDate value to set.

Returns:

the RecurrencePattern object itself.

withFrequency

public RecurrencePattern withFrequency(RecurrenceFrequency frequency)

Set the frequency property: The frequency of the recurrence.

Parameters:

frequency - the frequency value to set.

Returns:

the RecurrencePattern object itself.

withInterval

public RecurrencePattern withInterval(Integer interval)

Set the interval property: The interval to invoke the schedule on. For example, interval = 2 and RecurrenceFrequency.Daily will run every 2 days. When no interval is supplied, an interval of 1 is used.

Parameters:

interval - the interval value to set.

Returns:

the RecurrencePattern object itself.

withWeekDays

public RecurrencePattern withWeekDays(List<WeekDay> weekDays)

Set the weekDays property: The week days the schedule runs. Used for when the Frequency is set to Weekly.

Parameters:

weekDays - the weekDays value to set.

Returns:

the RecurrencePattern object itself.

Applies to