Class: Capacity
Represents a Capacity.
Implements
Constructors
constructor
• new Capacity(properties?): Capacity
Constructs a new Capacity.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | ICapacity | Properties to set |
Returns
Properties
currentMode
• Optional currentMode: "onDemand" | "provisioned"
Capacity currentMode.
latestRequest
• Optional latestRequest: null | IRequest
The latest requested capacity for the namespace, if any.
Implementation of
onDemand
• Optional onDemand: null | IOnDemand
The status of on-demand capacity mode.
Implementation of
provisioned
• Optional provisioned: null | IProvisioned
The status of provisioned capacity mode.
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this Capacity to JSON.
Returns
Object
JSON object
create
▸ create(properties?): Capacity
Creates a new Capacity instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | ICapacity | Properties to set |
Returns
Capacity instance
decode
▸ decode(reader, length?): Capacity
Decodes a Capacity 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
Capacity
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): Capacity
Decodes a Capacity message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
Capacity
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 Capacity message. Does not implicitly temporal.api.cloud.namespace.v1.Capacity.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | ICapacity | Capacity message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified Capacity message, length delimited. Does not implicitly temporal.api.cloud.namespace.v1.Capacity.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | ICapacity | Capacity message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): Capacity
Creates a Capacity message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
Capacity
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for Capacity
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 Capacity message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | Capacity | Capacity |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object