Skip to main content

Class: RateLimit

taskqueue.v1.RateLimit

Represents a RateLimit.

Implements

Constructors

constructor

new RateLimit(properties?): RateLimit

Constructs a new RateLimit.

Parameters

NameTypeDescription
properties?IRateLimitProperties to set

Returns

RateLimit

Properties

requestsPerSecond

requestsPerSecond: number

Zero is a valid rate limit.

Implementation of

IRateLimit.requestsPerSecond

Methods

toJSON

toJSON(): Object

Converts this RateLimit to JSON.

Returns

Object

JSON object


create

create(properties?): RateLimit

Creates a new RateLimit instance using the specified properties.

Parameters

NameTypeDescription
properties?IRateLimitProperties to set

Returns

RateLimit

RateLimit instance


decode

decode(reader, length?): RateLimit

Decodes a RateLimit message from the specified reader or buffer.

Parameters

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

Returns

RateLimit

RateLimit

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): RateLimit

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

RateLimit

RateLimit

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

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): RateLimit

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

RateLimit

RateLimit


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for RateLimit

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

Parameters

NameTypeDescription
messageRateLimitRateLimit
options?IConversionOptionsConversion options

Returns

Object

Plain object