Skip to main content

Class: Range

schedule.v1.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

NameTypeDescription
properties?IRangeProperties to set

Returns

Range

Properties

end

end: number

End of range (inclusive).

Implementation of

IRange.end


start

start: number

Start of range (inclusive).

Implementation of

IRange.start


step

step: number

Step (optional, default 1).

Implementation of

IRange.step

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

NameTypeDescription
properties?IRangeProperties to set

Returns

Range

Range instance


decode

decode(reader, length?): Range

Decodes a Range message from the specified reader or buffer.

Parameters

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

Returns

Range

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

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Range

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

NameTypeDescription
messageIRangeRange message or plain object to encode
writer?WriterWriter 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

NameTypeDescription
messageIRangeRange message or plain object to encode
writer?WriterWriter 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

NameTypeDescription
objectObjectPlain object

Returns

Range

Range


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for Range

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

Parameters

NameTypeDescription
messageRangeRange
options?IConversionOptionsConversion options

Returns

Object

Plain object