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.
Implements
Constructors
constructor
• new IntervalSpec(properties?
): IntervalSpec
Constructs a new IntervalSpec.
Parameters
Name | Type | Description |
---|---|---|
properties? | IIntervalSpec | Properties to set |
Returns
Properties
interval
• Optional
interval: null
| IDuration
IntervalSpec interval.
Implementation of
phase
• Optional
phase: null
| IDuration
IntervalSpec phase.
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this IntervalSpec to JSON.
Returns
Object
JSON object
create
▸ create(properties?
): IntervalSpec
Creates a new IntervalSpec instance using the specified properties.
Parameters
Name | Type | Description |
---|---|---|
properties? | IIntervalSpec | Properties to set |
Returns
IntervalSpec instance
decode
▸ decode(reader
, length?
): IntervalSpec
Decodes an IntervalSpec message from the specified reader or buffer.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
IntervalSpec
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader
): IntervalSpec
Decodes an IntervalSpec message from the specified reader or buffer, length delimited.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
IntervalSpec
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode
▸ encode(message
, writer?
): Writer
Encodes the specified IntervalSpec message. Does not implicitly temporal.api.schedule.v1.IntervalSpec.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IIntervalSpec | IntervalSpec message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message
, writer?
): Writer
Encodes the specified IntervalSpec message, length delimited. Does not implicitly temporal.api.schedule.v1.IntervalSpec.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IIntervalSpec | IntervalSpec message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object
): IntervalSpec
Creates an IntervalSpec message from a plain object. Also converts values to their respective internal types.
Parameters
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
IntervalSpec
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for IntervalSpec
Parameters
Name | Type | Description |
---|---|---|
typeUrlPrefix? | string | your custom typeUrlPrefix(default "type.googleapis.com") |
Returns
string
The default type url
toObject
▸ toObject(message
, options?
): Object
Creates a plain object from an IntervalSpec message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | IntervalSpec | IntervalSpec |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object