Skip to main content

Class: StructuredCalendarSpec

schedule.v1.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. TODO: add relative-to-end-of-month TODO: add nth day-of-week in month

Implements

Constructors

constructor

new StructuredCalendarSpec(properties?): StructuredCalendarSpec

Constructs a new StructuredCalendarSpec.

Parameters

NameTypeDescription
properties?IStructuredCalendarSpecProperties to set

Returns

StructuredCalendarSpec

Properties

comment

comment: string

Free-form comment describing the intention of this spec.

Implementation of

IStructuredCalendarSpec.comment


dayOfMonth

dayOfMonth: IRange[]

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

Implementation of

IStructuredCalendarSpec.dayOfMonth


dayOfWeek

dayOfWeek: IRange[]

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

Implementation of

IStructuredCalendarSpec.dayOfWeek


hour

hour: IRange[]

Match hours (0-23)

Implementation of

IStructuredCalendarSpec.hour


minute

minute: IRange[]

Match minutes (0-59)

Implementation of

IStructuredCalendarSpec.minute


month

month: IRange[]

Match months (1-12)

Implementation of

IStructuredCalendarSpec.month


second

second: IRange[]

Match seconds (0-59)

Implementation of

IStructuredCalendarSpec.second


year

year: IRange[]

Match years.

Implementation of

IStructuredCalendarSpec.year

Methods

toJSON

toJSON(): Object

Converts this StructuredCalendarSpec to JSON.

Returns

Object

JSON object


create

create(properties?): StructuredCalendarSpec

Creates a new StructuredCalendarSpec instance using the specified properties.

Parameters

NameTypeDescription
properties?IStructuredCalendarSpecProperties to set

Returns

StructuredCalendarSpec

StructuredCalendarSpec instance


decode

decode(reader, length?): StructuredCalendarSpec

Decodes a StructuredCalendarSpec message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

StructuredCalendarSpec

StructuredCalendarSpec

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): StructuredCalendarSpec

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

StructuredCalendarSpec

StructuredCalendarSpec

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 StructuredCalendarSpec message. Does not implicitly temporal.api.schedule.v1.StructuredCalendarSpec.verify|verify messages.

Parameters

NameTypeDescription
messageIStructuredCalendarSpecStructuredCalendarSpec message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
messageIStructuredCalendarSpecStructuredCalendarSpec message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): StructuredCalendarSpec

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

StructuredCalendarSpec

StructuredCalendarSpec


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for StructuredCalendarSpec

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageStructuredCalendarSpecStructuredCalendarSpec
options?IConversionOptionsConversion options

Returns

Object

Plain object