Class: Range
Range represents a set of integer values, used to match fields of a calendar time in StructuredCalendarSpec. If end < start, then end is interpreted as equal to start. This means you can use a Range with start set to a value, and end and step unset (defaulting to 0) to represent a single value.
Implements
Constructors
constructor
• new Range(properties?
): Range
Constructs a new Range.
Parameters
Name | Type | Description |
---|---|---|
properties? | IRange | Properties to set |
Returns
Properties
end
• end: number
End of range (inclusive).
Implementation of
start
• start: number
Start of range (inclusive).
Implementation of
step
• step: number
Step (optional, default 1).
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this Range to JSON.
Returns
Object
JSON object
create
▸ create(properties?
): Range
Creates a new Range instance using the specified properties.
Parameters
Name | Type | Description |
---|---|---|
properties? | IRange | Properties to set |
Returns
Range instance
decode
▸ decode(reader
, length?
): Range
Decodes a Range 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
Range
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader
): Range
Decodes a Range message from the specified reader or buffer, length delimited.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
Range
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 Range message. Does not implicitly temporal.api.schedule.v1.Range.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IRange | Range message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message
, writer?
): Writer
Encodes the specified Range message, length delimited. Does not implicitly temporal.api.schedule.v1.Range.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IRange | Range message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object
): Range
Creates a Range message from a plain object. Also converts values to their respective internal types.
Parameters
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
Range
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for Range
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 Range message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | Range | Range |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object