Class: 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
| Name | Type | Description | 
|---|---|---|
| properties? | ICalendarSpec | Properties to set | 
Returns
Properties
comment
• comment: string
Free-form comment describing the intention of this spec.
Implementation of
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
dayOfWeek
• dayOfWeek: string
Expression to match days of the week. Default: *
Implementation of
hour
• hour: string
Expression to match hours. Default: 0
Implementation of
minute
• minute: string
Expression to match minutes. Default: 0
Implementation of
month
• month: string
Expression to match months. Default: *
Implementation of
second
• second: string
Expression to match seconds. Default: 0
Implementation of
year
• year: string
Expression to match years. Default: *
Implementation of
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
| Name | Type | Description | 
|---|---|---|
| properties? | ICalendarSpec | Properties to set | 
Returns
CalendarSpec instance
decode
▸ decode(reader, length?): CalendarSpec
Decodes a CalendarSpec 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
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
| Name | Type | Description | 
|---|---|---|
| reader | Uint8Array|Reader | Reader or buffer to decode from | 
Returns
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
| Name | Type | Description | 
|---|---|---|
| message | ICalendarSpec | CalendarSpec message or plain object to encode | 
| writer? | Writer | Writer 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
| Name | Type | Description | 
|---|---|---|
| message | ICalendarSpec | CalendarSpec message or plain object to encode | 
| writer? | Writer | Writer 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
| Name | Type | Description | 
|---|---|---|
| object | Object | Plain object | 
Returns
CalendarSpec
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for CalendarSpec
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 a CalendarSpec message. Also converts values to other types if specified.
Parameters
| Name | Type | Description | 
|---|---|---|
| message | CalendarSpec | CalendarSpec | 
| options? | IConversionOptions | Conversion options | 
Returns
Object
Plain object