Skip to main content

Class: StructuredCalendarSpec

StructuredCalendarSpec describes an event specification relative to the calendar, in a form that's easy to work with programmatically. Each field can be one or more ranges. A timestamp matches if at least one range of each field matches the corresponding fields of the timestamp, except for year: if year is missing, that means all years match. For all fields besides year, at least one Range must be present to match anything. Relative expressions such as "last day of the month" or "third Monday" are not currently representable; callers must enumerate the concrete days they require.

Properties​

comment​

comment: string

Free-form comment describing the intention of this spec.


dayOfMonth​

dayOfMonth: $Properties[]

Match days of the month (1-31) (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: standard name of field --)


dayOfWeek​

dayOfWeek: $Properties[]

Match days of the week (0-6; 0 is Sunday).


hour​

hour: $Properties[]

Match hours (0-23)


minute​

minute: $Properties[]

Match minutes (0-59)


month​

month: $Properties[]

Match months (1-12)


second​

second: $Properties[]

Match seconds (0-59)


year​

year: $Properties[]

Match years.

Methods​

toJSON()​

toJSON(): object

Converts this StructuredCalendarSpec to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): StructuredCalendarSpec & $Properties

Creates a new StructuredCalendarSpec instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

StructuredCalendarSpec & $Properties

StructuredCalendarSpec instance

Call Signature​

static create(properties?): StructuredCalendarSpec

Creates a new StructuredCalendarSpec instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

StructuredCalendarSpec

StructuredCalendarSpec instance


decode()​

static decode(reader, length?): StructuredCalendarSpec & $Properties

Decodes a StructuredCalendarSpec 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​

StructuredCalendarSpec & $Properties

StructuredCalendarSpec

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): StructuredCalendarSpec & $Properties

Decodes a StructuredCalendarSpec message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

StructuredCalendarSpec & $Properties

StructuredCalendarSpec

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified StructuredCalendarSpec message. Does not implicitly temporal.api.schedule.v1.StructuredCalendarSpec.verify|verify messages.

Parameters​

message​

$Properties

StructuredCalendarSpec message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified StructuredCalendarSpec message, length delimited. Does not implicitly temporal.api.schedule.v1.StructuredCalendarSpec.verify|verify messages.

Parameters​

message​

$Properties

StructuredCalendarSpec message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): StructuredCalendarSpec

Creates a StructuredCalendarSpec message from a plain object. Also converts values to their respective internal types.

Parameters​

object​

Plain object

Returns​

StructuredCalendarSpec

StructuredCalendarSpec


toObject()​

static toObject(message, options?): object

Creates a plain object from a StructuredCalendarSpec message. Also converts values to other types if specified.

Parameters​

message​

StructuredCalendarSpec

StructuredCalendarSpec

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object