Commitment

google.cloud.compute.v1. Commitment

Represents a Commitment.

Constructor

new Commitment(propertiesopt)

Constructs a new Commitment.

Parameters:
Name Type Attributes Description
properties google.cloud.compute.v1.ICommitment <optional>

Properties to set

Implements:
  • ICommitment

Members

_autoRenew

Commitment _autoRenew.

_category

Commitment _category.

_creationTimestamp

Commitment _creationTimestamp.

_description

Commitment _description.

_endTimestamp

Commitment _endTimestamp.

_id

Commitment _id.

_kind

Commitment _kind.

_licenseResource

Commitment _licenseResource.

_name

Commitment _name.

_plan

Commitment _plan.

_region

Commitment _region.

Commitment _selfLink.

_splitSourceCommitment

Commitment _splitSourceCommitment.

_startTimestamp

Commitment _startTimestamp.

_status

Commitment _status.

_statusMessage

Commitment _statusMessage.

_type

Commitment _type.

autoRenew

Commitment autoRenew.

category

Commitment category.

creationTimestamp

Commitment creationTimestamp.

description

Commitment description.

endTimestamp

Commitment endTimestamp.

id

Commitment id.

kind

Commitment kind.

licenseResource

Commitment licenseResource.

mergeSourceCommitments

Commitment mergeSourceCommitments.

name

Commitment name.

plan

Commitment plan.

region

Commitment region.

reservations

Commitment reservations.

resources

Commitment resources.

Commitment selfLink.

splitSourceCommitment

Commitment splitSourceCommitment.

startTimestamp

Commitment startTimestamp.

status

Commitment status.

statusMessage

Commitment statusMessage.

type

Commitment type.

Category

Category enum.

Properties:
Name Type Description
UNDEFINED_CATEGORY number

UNDEFINED_CATEGORY value

CATEGORY_UNSPECIFIED number

CATEGORY_UNSPECIFIED value

LICENSE number

LICENSE value

MACHINE number

MACHINE value

Plan

Plan enum.

Properties:
Name Type Description
UNDEFINED_PLAN number

UNDEFINED_PLAN value

INVALID number

INVALID value

THIRTY_SIX_MONTH number

THIRTY_SIX_MONTH value

TWELVE_MONTH number

TWELVE_MONTH value

Status

Status enum.

Properties:
Name Type Description
UNDEFINED_STATUS number

UNDEFINED_STATUS value

ACTIVE number

ACTIVE value

CANCELLED number

CANCELLED value

CREATING number

CREATING value

EXPIRED number

EXPIRED value

NOT_YET_ACTIVE number

NOT_YET_ACTIVE value

Type

Type enum.

Properties:
Name Type Description
UNDEFINED_TYPE number

UNDEFINED_TYPE value

ACCELERATOR_OPTIMIZED number

ACCELERATOR_OPTIMIZED value

COMPUTE_OPTIMIZED number

COMPUTE_OPTIMIZED value

COMPUTE_OPTIMIZED_C2D number

COMPUTE_OPTIMIZED_C2D value

COMPUTE_OPTIMIZED_C3 number

COMPUTE_OPTIMIZED_C3 value

GENERAL_PURPOSE number

GENERAL_PURPOSE value

GENERAL_PURPOSE_E2 number

GENERAL_PURPOSE_E2 value

GENERAL_PURPOSE_N2 number

GENERAL_PURPOSE_N2 value

GENERAL_PURPOSE_N2D number

GENERAL_PURPOSE_N2D value

GENERAL_PURPOSE_T2D number

GENERAL_PURPOSE_T2D value

MEMORY_OPTIMIZED number

MEMORY_OPTIMIZED value

MEMORY_OPTIMIZED_M3 number

MEMORY_OPTIMIZED_M3 value

TYPE_UNSPECIFIED number

TYPE_UNSPECIFIED value

Methods

toJSON() → {Object.<string, *>}

Converts this Commitment to JSON.

Returns:
Type Description
Object.<string, *>

JSON object

(static) create(propertiesopt) → {google.cloud.compute.v1.Commitment}

Creates a new Commitment instance using the specified properties.

Parameters:
Name Type Attributes Description
properties google.cloud.compute.v1.ICommitment <optional>

Properties to set

Returns:
Type Description
google.cloud.compute.v1.Commitment

Commitment instance

(static) decode(reader, lengthopt) → {google.cloud.compute.v1.Commitment}

Decodes a Commitment message from the specified reader or buffer.

Parameters:
Name Type Attributes Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

length number <optional>

Message length if known beforehand

Returns:
Type Description
google.cloud.compute.v1.Commitment

Commitment

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) decodeDelimited(reader) → {google.cloud.compute.v1.Commitment}

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

Parameters:
Name Type Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

Returns:
Type Description
google.cloud.compute.v1.Commitment

Commitment

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) encode(message, writeropt) → {$protobuf.Writer}

Encodes the specified Commitment message. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.cloud.compute.v1.ICommitment

Commitment message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

Returns:
Type Description
$protobuf.Writer

Writer

(static) encodeDelimited(message, writeropt) → {$protobuf.Writer}

Encodes the specified Commitment message, length delimited. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.cloud.compute.v1.ICommitment

Commitment message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

Returns:
Type Description
$protobuf.Writer

Writer

(static) fromObject(object) → {google.cloud.compute.v1.Commitment}

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

Parameters:
Name Type Description
object Object.<string, *>

Plain object

Returns:
Type Description
google.cloud.compute.v1.Commitment

Commitment

(static) getTypeUrl(typeUrlPrefixopt) → {string}

Gets the default type url for Commitment

Parameters:
Name Type Attributes Description
typeUrlPrefix string <optional>

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

Returns:
Type Description
string

The default type url

(static) toObject(message, optionsopt) → {Object.<string, *>}

Creates a plain object from a Commitment message. Also converts values to other types if specified.

Parameters:
Name Type Attributes Description
message google.cloud.compute.v1.Commitment

Commitment

options $protobuf.IConversionOptions <optional>

Conversion options

Returns:
Type Description
Object.<string, *>

Plain object

(static) verify(message) → {string|null}

Verifies a Commitment message.

Parameters:
Name Type Description
message Object.<string, *>

Plain object to verify

Returns:
Type Description
string | null

null if valid, otherwise the reason why it is not