Class: IntervalSpec
IntervalSpec matches times that can be expressed as: epoch + n * interval + phase where n is an integer. phase defaults to zero if missing. interval is required. Both interval and phase must be non-negative and are truncated to the nearest second before any calculations. For example, an interval of 1 hour with phase of zero would match every hour, on the hour. The same interval but a phase of 19 minutes would match every xx:19:00. An interval of 28 days with phase zero would match 2022-02-17T00:00:00Z (among other times). The same interval with a phase of 3 days, 5 hours, and 23 minutes would match 2022-02-20T05:23:00Z instead.
Properties
interval?
optionalinterval?:$Properties|null
IntervalSpec interval.
phase?
optionalphase?:$Properties|null
IntervalSpec phase.
Methods
toJSON()
toJSON():
object
Converts this IntervalSpec to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):IntervalSpec&$Properties
Creates a new IntervalSpec instance using the specified properties.
Parameters
properties?
Properties to set
Returns
IntervalSpec & $Properties
IntervalSpec instance
Call Signature
staticcreate(properties?):IntervalSpec
Creates a new IntervalSpec instance using the specified properties.
Parameters
properties?
Properties to set
Returns
IntervalSpec
IntervalSpec instance
decode()
staticdecode(reader,length?):IntervalSpec&$Properties
Decodes an IntervalSpec message from the specified reader or buffer.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
length?
number
Message length if known beforehand
Returns
IntervalSpec & $Properties
IntervalSpec
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):IntervalSpec&$Properties
Decodes an IntervalSpec message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
IntervalSpec & $Properties
IntervalSpec
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode()
staticencode(message,writer?):Writer
Encodes the specified IntervalSpec message. Does not implicitly temporal.api.schedule.v1.IntervalSpec.verify|verify messages.
Parameters
message
IntervalSpec message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified IntervalSpec message, length delimited. Does not implicitly temporal.api.schedule.v1.IntervalSpec.verify|verify messages.
Parameters
message
IntervalSpec message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):IntervalSpec
Creates an IntervalSpec message from a plain object. Also converts values to their respective internal types.
Parameters
object
Plain object
Returns
IntervalSpec
IntervalSpec
toObject()
statictoObject(message,options?):object
Creates a plain object from an IntervalSpec message. Also converts values to other types if specified.
Parameters
message
IntervalSpec
IntervalSpec
options?
IConversionOptions
Conversion options
Returns
object
Plain object