Class protos.google.cloud.compute.v1.Commitment (3.5.0)

Stay organized with collections Save and categorize content based on your preferences.

Represents a Commitment.

Package

@google-cloud/compute

Constructors

(constructor)(properties)

constructor(properties?: google.cloud.compute.v1.ICommitment);

Constructs a new Commitment.

Parameter
NameDescription
properties ICommitment

Properties to set

Properties

_autoRenew

public _autoRenew?: "autoRenew";

Commitment _autoRenew.

_category

public _category?: "category";

Commitment _category.

_creationTimestamp

public _creationTimestamp?: "creationTimestamp";

Commitment _creationTimestamp.

_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.

public _selfLink?: "selfLink";

Commitment _selfLink.

_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.

description

public description?: (string|null);

Commitment description.

endTimestamp

public endTimestamp?: (string|null);

Commitment endTimestamp.

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.

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.

public selfLink?: (string|null);

Commitment selfLink.

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
NameDescription
properties ICommitment

Properties to set

Returns
TypeDescription
google.cloud.compute.v1.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
NameDescription
reader ($protobuf.Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
TypeDescription
google.cloud.compute.v1.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
NameDescription
reader ($protobuf.Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
google.cloud.compute.v1.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
NameDescription
message ICommitment

Commitment message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$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
NameDescription
message ICommitment

Commitment message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$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
NameDescription
object { [k: string]: any }

Plain object

Returns
TypeDescription
google.cloud.compute.v1.Commitment

Commitment

getTypeUrl(typeUrlPrefix)

public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for Commitment

Parameter
NameDescription
typeUrlPrefix string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns
TypeDescription
string

The default type url

toJSON()

public toJSON(): { [k: string]: any };

Converts this Commitment to JSON.

Returns
TypeDescription
{ [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
NameDescription
message google.cloud.compute.v1.Commitment

Commitment

options $protobuf.IConversionOptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

public static verify(message: { [k: string]: any }): (string|null);

Verifies a Commitment message.

Parameter
NameDescription
message { [k: string]: any }

Plain object to verify

Returns
TypeDescription
(string|null)

null if valid, otherwise the reason why it is not