UtcTimePropertiesBuilder
Builder that creates an instance of the TimeProperties
object.
The UtcTimePropertiesBuilder
allows callers to create an instance
ITimeProperties
in UTC. The constraint is a combination of a start time
and an execution window. For instance, if we want the EPG sync task
to be executed between 2AM and 4AM UTC, then the timeProperties can be built as
UtcTimePropertiesBuilder.startHour(2).startMinute(0).startSecond(0).executionWindowInMinutes(120).build();
Extends
Constructors
new UtcTimePropertiesBuilder()
new UtcTimePropertiesBuilder():
UtcTimePropertiesBuilder
Returns
Inherited from
Methods
build()
build():
ITimeProperties
Builds the TimeProperties
object based on the parameters provided.
Returns
The built TimeProperties
object.
Throws
InvalidArgumentError
if one or more of the required fields are missing.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Overrides
executionWindowInMinutes()
executionWindowInMinutes(
window
):UtcTimePropertiesBuilder
Sets the length of the execution time window in the TimeProperties
.
Parameters
window
number
The length of the execution time window in mins.
Returns
The UtcTimePropertiesBuilder
object with the execution window set.
Details
This field is optional for the time properties. The default value is 60 mins.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if the execution window is smaller than 1 hour.
startHour()
startHour(
hour
):UtcTimePropertiesBuilder
Sets the start hour in the TimeProperties
.
Parameters
hour
number
Represents Hour (0-23).
Returns
The UtcTimePropertiesBuilder
object with the start hour set.
Details
This field is required for the time properties.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if the number of hour is not in the range between 0 and 23.
startMinute()
startMinute(
minute
):UtcTimePropertiesBuilder
Sets the start minute in the TimeProperties
.
Parameters
minute
number
Represents Minute (0-59).
Returns
The UtcTimePropertiesBuilder
object with the start minute set.
Details
This field is required for the time properties.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if the number of minute is not in the range between 0 and 59.
startSecond()
startSecond(
second
):UtcTimePropertiesBuilder
Sets the start second in the TimeProperties
.
Parameters
second
number
Represents Second (0-59).
Returns
The UtcTimePropertiesBuilder
object with the start second set.
Details
This field is required for the time properties.
Throws
IllegalStateError
if the function is called after this builder instance
has already built an object once.
Throws
InvalidArgumentError
if the number of second is not in the range between 0 and 59.
Last updated: Sep 30, 2025