Skip to main content

Class: CalendarSpec

schedule.v1.CalendarSpec

CalendarSpec describes an event specification relative to the calendar, similar to a traditional cron specification, but with labeled fields. Each field can be one of: : matches always x: matches when the field equals x x/y : matches when the field equals x+ny where n is an integer x-z: matches when the field is between x and z inclusive w,x,y,...: matches when the field is one of the listed values Each x, y, z, ... is either a decimal integer, or a month or day of week name or abbreviation (in the appropriate fields). A timestamp matches if all fields match. Note that fields have different default values, for convenience. Note that the special case that some cron implementations have for treating day_of_month and day_of_week as "or" instead of "and" when both are set is not implemented. day_of_week can accept 0 or 7 as Sunday CalendarSpec gets compiled into StructuredCalendarSpec, which is what will be returned if you describe the schedule.

Implements

Constructors

constructor

new CalendarSpec(properties?): CalendarSpec

Constructs a new CalendarSpec.

Parameters

NameTypeDescription
properties?ICalendarSpecProperties to set

Returns

CalendarSpec

Properties

comment

comment: string

Free-form comment describing the intention of this spec.

Implementation of

ICalendarSpec.comment


dayOfMonth

dayOfMonth: string

Expression to match days of the month. Default: * (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: standard name of field --)

Implementation of

ICalendarSpec.dayOfMonth


dayOfWeek

dayOfWeek: string

Expression to match days of the week. Default: *

Implementation of

ICalendarSpec.dayOfWeek


hour

hour: string

Expression to match hours. Default: 0

Implementation of

ICalendarSpec.hour


minute

minute: string

Expression to match minutes. Default: 0

Implementation of

ICalendarSpec.minute


month

month: string

Expression to match months. Default: *

Implementation of

ICalendarSpec.month


second

second: string

Expression to match seconds. Default: 0

Implementation of

ICalendarSpec.second


year

year: string

Expression to match years. Default: *

Implementation of

ICalendarSpec.year

Methods

toJSON

toJSON(): Object

Converts this CalendarSpec to JSON.

Returns

Object

JSON object


create

create(properties?): CalendarSpec

Creates a new CalendarSpec instance using the specified properties.

Parameters

NameTypeDescription
properties?ICalendarSpecProperties to set

Returns

CalendarSpec

CalendarSpec instance


decode

decode(reader, length?): CalendarSpec

Decodes a CalendarSpec message from the specified reader or buffer.

Parameters

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

Returns

CalendarSpec

CalendarSpec

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): CalendarSpec

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

CalendarSpec

CalendarSpec

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

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): CalendarSpec

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

CalendarSpec

CalendarSpec


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for CalendarSpec

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 CalendarSpec message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageCalendarSpecCalendarSpec
options?IConversionOptionsConversion options

Returns

Object

Plain object