Represents a Commitment.
Package
@google-cloud/computeConstructors
(constructor)(properties)
constructor(properties?: google.cloud.compute.v1.ICommitment);Constructs a new Commitment.
| Parameter | |
|---|---|
| Name | Description |
properties |
ICommitment
Properties to set |
Properties
_autoRenew
public _autoRenew?: "autoRenew";Commitment _autoRenew.
_category
public _category?: "category";Commitment _category.
_creationTimestamp
public _creationTimestamp?: "creationTimestamp";Commitment _creationTimestamp.
_customEndTimestamp
public _customEndTimestamp?: "customEndTimestamp";Commitment _customEndTimestamp.
_description
public _description?: "description";Commitment _description.
_endTimestamp
public _endTimestamp?: "endTimestamp";Commitment _endTimestamp.
_id
public _id?: "id";Commitment _id.
_kind
public _kind?: "kind";Commitment _kind.
_licenseResource
public _licenseResource?: "licenseResource";Commitment _licenseResource.
_name
public _name?: "name";Commitment _name.
_plan
public _plan?: "plan";Commitment _plan.
_region
public _region?: "region";Commitment _region.
_resourceStatus
public _resourceStatus?: "resourceStatus";Commitment _resourceStatus.
_selfLink
public _selfLink?: "selfLink";Commitment _selfLink.
_splitSourceCommitment
public _splitSourceCommitment?: "splitSourceCommitment";Commitment _splitSourceCommitment.
_startTimestamp
public _startTimestamp?: "startTimestamp";Commitment _startTimestamp.
_status
public _status?: "status";Commitment _status.
_statusMessage
public _statusMessage?: "statusMessage";Commitment _statusMessage.
_type
public _type?: "type";Commitment _type.
autoRenew
public autoRenew?: (boolean|null);Commitment autoRenew.
category
public category?: (string|null);Commitment category.
creationTimestamp
public creationTimestamp?: (string|null);Commitment creationTimestamp.
customEndTimestamp
public customEndTimestamp?: (string|null);Commitment customEndTimestamp.
description
public description?: (string|null);Commitment description.
endTimestamp
public endTimestamp?: (string|null);Commitment endTimestamp.
existingReservations
public existingReservations: string[];Commitment existingReservations.
id
public id?: (number|Long|string|null);Commitment id.
kind
public kind?: (string|null);Commitment kind.
licenseResource
public licenseResource?: (google.cloud.compute.v1.ILicenseResourceCommitment|null);Commitment licenseResource.
mergeSourceCommitments
public mergeSourceCommitments: string[];Commitment mergeSourceCommitments.
name
public name?: (string|null);Commitment name.
plan
public plan?: (string|null);Commitment plan.
region
public region?: (string|null);Commitment region.
reservations
public reservations: google.cloud.compute.v1.IReservation[];Commitment reservations.
resources
public resources: google.cloud.compute.v1.IResourceCommitment[];Commitment resources.
resourceStatus
public resourceStatus?: (google.cloud.compute.v1.ICommitmentResourceStatus|null);Commitment resourceStatus.
selfLink
public selfLink?: (string|null);Commitment selfLink.
splitSourceCommitment
public splitSourceCommitment?: (string|null);Commitment splitSourceCommitment.
startTimestamp
public startTimestamp?: (string|null);Commitment startTimestamp.
status
public status?: (string|null);Commitment status.
statusMessage
public statusMessage?: (string|null);Commitment statusMessage.
type
public type?: (string|null);Commitment type.
Methods
create(properties)
public static create(properties?: google.cloud.compute.v1.ICommitment): google.cloud.compute.v1.Commitment;Creates a new Commitment instance using the specified properties.
| Parameter | |
|---|---|
| Name | Description |
properties |
ICommitment
Properties to set |
| Returns | |
|---|---|
| Type | Description |
Commitment |
Commitment instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.Commitment;Decodes a Commitment message from the specified reader or buffer.
| Parameters | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
| Returns | |
|---|---|
| Type | Description |
Commitment |
Commitment |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.Commitment;Decodes a Commitment message from the specified reader or buffer, length delimited.
| Parameter | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
| Returns | |
|---|---|
| Type | Description |
Commitment |
Commitment |
encode(message, writer)
public static encode(message: google.cloud.compute.v1.ICommitment, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Commitment message. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
ICommitment
Commitment message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.cloud.compute.v1.ICommitment, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Commitment message, length delimited. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
ICommitment
Commitment message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.cloud.compute.v1.Commitment;Creates a Commitment message from a plain object. Also converts values to their respective internal types.
| Parameter | |
|---|---|
| Name | Description |
object |
{ [k: string]: any }
Plain object |
| Returns | |
|---|---|
| Type | Description |
Commitment |
Commitment |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;Gets the default type url for Commitment
| Parameter | |
|---|---|
| Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
| Returns | |
|---|---|
| Type | Description |
string |
The default type url |
toJSON()
public toJSON(): { [k: string]: any };Converts this Commitment to JSON.
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
JSON object |
toObject(message, options)
public static toObject(message: google.cloud.compute.v1.Commitment, options?: $protobuf.IConversionOptions): { [k: string]: any };Creates a plain object from a Commitment message. Also converts values to other types if specified.
| Parameters | |
|---|---|
| Name | Description |
message |
Commitment
Commitment |
options |
$protobuf.IConversionOptions
Conversion options |
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);Verifies a Commitment message.
| Parameter | |
|---|---|
| Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
| Returns | |
|---|---|
| Type | Description |
(string|null) |
|