HourlyRecurrence Class

public final class HourlyRecurrence
extends Recurrence

Recurrence model when frequency is set as Hourly.

Constructor Summary

Constructor Description
HourlyRecurrence()

Creates an instance of HourlyRecurrence class.

Method Summary

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

Reads an instance of HourlyRecurrence from the JsonReader.

Frequency getFrequency()

Get the frequency property: Frequency of the recurrence.

int getInterval()

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

HourlyRecurrence setInterval(int interval)

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

HourlyRecurrence 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

HourlyRecurrence

public HourlyRecurrence()

Creates an instance of HourlyRecurrence class.

Method Details

fromJson

public static HourlyRecurrence fromJson(JsonReader jsonReader)

Reads an instance of HourlyRecurrence from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getFrequency

public Frequency getFrequency()

Get the frequency property: Frequency of the recurrence.

Overrides:

HourlyRecurrence.getFrequency()

Returns:

the frequency value.

getInterval

public int getInterval()

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

Returns:

the interval value.

setInterval

public HourlyRecurrence setInterval(int interval)

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

Required when create the resource.

Parameters:

interval - the interval value to set.

Returns:

the HourlyRecurrence object itself.

setRecurrenceEnd

public HourlyRecurrence 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:

HourlyRecurrence.setRecurrenceEnd(RecurrenceEnd recurrenceEnd)

Parameters:

recurrenceEnd

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

HourlyRecurrence.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to