WeeklyRecurrence Class

public final class WeeklyRecurrence
extends Recurrence

Recurrence model when frequency is set as weekly.

Constructor Summary

Constructor Description
WeeklyRecurrence()

Creates an instance of WeeklyRecurrence class.

Method Summary

Modifier and Type Method and Description
static WeeklyRecurrence fromJson(JsonReader jsonReader)

Reads an instance of WeeklyRecurrence from the JsonReader.

List<WeekDays> getDaysOfWeek()

Get the daysOfWeek property: Recurrence set to repeat on the specified days of the week.

Frequency getFrequency()

Get the frequency property: Frequency of the recurrence.

Integer getInterval()

Get the interval property: The interval at which the recurrence should repeat.

WeeklyRecurrence setDaysOfWeek(List<WeekDays> daysOfWeek)

Set the daysOfWeek property: Recurrence set to repeat on the specified days of the week.

WeeklyRecurrence setInterval(Integer interval)

Set the interval property: The interval at which the recurrence should repeat.

WeeklyRecurrence setRecurrenceEnd(RecurrenceEnd recurrenceEnd)

Set the recurrenceEnd property: Recurrence end model.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from Recurrence

Methods inherited from java.lang.Object

Constructor Details

WeeklyRecurrence

public WeeklyRecurrence()

Creates an instance of WeeklyRecurrence class.

Method Details

fromJson

public static WeeklyRecurrence fromJson(JsonReader jsonReader)

Reads an instance of WeeklyRecurrence from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of WeeklyRecurrence 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 WeeklyRecurrence.

getDaysOfWeek

public List<WeekDays> getDaysOfWeek()

Get the daysOfWeek property: Recurrence set to repeat on the specified days of the week.

Returns:

the daysOfWeek value.

getFrequency

public Frequency getFrequency()

Get the frequency property: Frequency of the recurrence.

Overrides:

WeeklyRecurrence.getFrequency()

Returns:

the frequency value.

getInterval

public Integer getInterval()

Get the interval property: The interval at which the recurrence should repeat. It signifies the number of weeks between each recurrence.

Returns:

the interval value.

setDaysOfWeek

public WeeklyRecurrence setDaysOfWeek(List<WeekDays> daysOfWeek)

Set the daysOfWeek property: Recurrence set to repeat on the specified days of the week.

Parameters:

daysOfWeek - the daysOfWeek value to set.

Returns:

the WeeklyRecurrence object itself.

setInterval

public WeeklyRecurrence setInterval(Integer interval)

Set the interval property: The interval at which the recurrence should repeat. It signifies the number of weeks between each recurrence.

Parameters:

interval - the interval value to set.

Returns:

the WeeklyRecurrence object itself.

setRecurrenceEnd

public WeeklyRecurrence setRecurrenceEnd(RecurrenceEnd recurrenceEnd)

Set the recurrenceEnd property: Recurrence end model. You can specify the end either by providing a numberOfOccurrences (which will end the recurrence after the specified number of occurrences) or by providing an endDateTime (which will end the recurrence after the specified date). If neither value is provided, the recurrence will continue until it is manually ended. However, if both values are provided, an error will be thrown.

Overrides:

WeeklyRecurrence.setRecurrenceEnd(RecurrenceEnd recurrenceEnd)

Parameters:

recurrenceEnd

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

WeeklyRecurrence.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to