Table of Contents

Class CalendarSpec

Namespace
Temporalio.Api.Schedule.V1
Assembly
Temporalio.dll

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.

public sealed class CalendarSpec : IMessage<CalendarSpec>, IEquatable<CalendarSpec>, IDeepCloneable<CalendarSpec>, IBufferMessage, IMessage
Inheritance
CalendarSpec
Implements
IMessage<CalendarSpec>
IDeepCloneable<CalendarSpec>
IBufferMessage
IMessage
Inherited Members

Constructors

CalendarSpec()

public CalendarSpec()

CalendarSpec(CalendarSpec)

public CalendarSpec(CalendarSpec other)

Parameters

other CalendarSpec

Fields

CommentFieldNumber

Field number for the "comment" field.

public const int CommentFieldNumber = 8

Field Value

int

DayOfMonthFieldNumber

Field number for the "day_of_month" field.

public const int DayOfMonthFieldNumber = 4

Field Value

int

DayOfWeekFieldNumber

Field number for the "day_of_week" field.

public const int DayOfWeekFieldNumber = 7

Field Value

int

HourFieldNumber

Field number for the "hour" field.

public const int HourFieldNumber = 3

Field Value

int

MinuteFieldNumber

Field number for the "minute" field.

public const int MinuteFieldNumber = 2

Field Value

int

MonthFieldNumber

Field number for the "month" field.

public const int MonthFieldNumber = 5

Field Value

int

SecondFieldNumber

Field number for the "second" field.

public const int SecondFieldNumber = 1

Field Value

int

YearFieldNumber

Field number for the "year" field.

public const int YearFieldNumber = 6

Field Value

int

Properties

Comment

Free-form comment describing the intention of this spec.

public string Comment { get; set; }

Property Value

string

DayOfMonth

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

public string DayOfMonth { get; set; }

Property Value

string

DayOfWeek

Expression to match days of the week. Default: *

public string DayOfWeek { get; set; }

Property Value

string

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

Hour

Expression to match hours. Default: 0

public string Hour { get; set; }

Property Value

string

Minute

Expression to match minutes. Default: 0

public string Minute { get; set; }

Property Value

string

Month

Expression to match months. Default: *

public string Month { get; set; }

Property Value

string

Parser

public static MessageParser<CalendarSpec> Parser { get; }

Property Value

MessageParser<CalendarSpec>

Second

Expression to match seconds. Default: 0

public string Second { get; set; }

Property Value

string

Year

Expression to match years. Default: *

public string Year { get; set; }

Property Value

string

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

Clone()

Creates a deep clone of this object.

public CalendarSpec Clone()

Returns

CalendarSpec

A deep clone of this object.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(CalendarSpec)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CalendarSpec other)

Parameters

other CalendarSpec

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(CalendarSpec)

Merges the given message into this one.

public void MergeFrom(CalendarSpec other)

Parameters

other CalendarSpec

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.