Class protos.google.cloud.compute.v1.MachineType (4.5.0)

Represents a MachineType.

Package

@google-cloud/compute

Constructors

(constructor)(properties)

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

Constructs a new MachineType.

Parameter
Name Description
properties IMachineType

Properties to set

Properties

_creationTimestamp

public _creationTimestamp?: "creationTimestamp";

MachineType _creationTimestamp.

_deprecated

public _deprecated?: "deprecated";

MachineType _deprecated.

_description

public _description?: "description";

MachineType _description.

_guestCpus

public _guestCpus?: "guestCpus";

MachineType _guestCpus.

_id

public _id?: "id";

MachineType _id.

_imageSpaceGb

public _imageSpaceGb?: "imageSpaceGb";

MachineType _imageSpaceGb.

_isSharedCpu

public _isSharedCpu?: "isSharedCpu";

MachineType _isSharedCpu.

_kind

public _kind?: "kind";

MachineType _kind.

_maximumPersistentDisks

public _maximumPersistentDisks?: "maximumPersistentDisks";

MachineType _maximumPersistentDisks.

_maximumPersistentDisksSizeGb

public _maximumPersistentDisksSizeGb?: "maximumPersistentDisksSizeGb";

MachineType _maximumPersistentDisksSizeGb.

_memoryMb

public _memoryMb?: "memoryMb";

MachineType _memoryMb.

_name

public _name?: "name";

MachineType _name.

public _selfLink?: "selfLink";

MachineType _selfLink.

_zone

public _zone?: "zone";

MachineType _zone.

accelerators

public accelerators: google.cloud.compute.v1.IAccelerators[];

MachineType accelerators.

creationTimestamp

public creationTimestamp?: (string|null);

MachineType creationTimestamp.

deprecated

public deprecated?: (google.cloud.compute.v1.IDeprecationStatus|null);

MachineType deprecated.

description

public description?: (string|null);

MachineType description.

guestCpus

public guestCpus?: (number|null);

MachineType guestCpus.

id

public id?: (number|Long|string|null);

MachineType id.

imageSpaceGb

public imageSpaceGb?: (number|null);

MachineType imageSpaceGb.

isSharedCpu

public isSharedCpu?: (boolean|null);

MachineType isSharedCpu.

kind

public kind?: (string|null);

MachineType kind.

maximumPersistentDisks

public maximumPersistentDisks?: (number|null);

MachineType maximumPersistentDisks.

maximumPersistentDisksSizeGb

public maximumPersistentDisksSizeGb?: (number|Long|string|null);

MachineType maximumPersistentDisksSizeGb.

memoryMb

public memoryMb?: (number|null);

MachineType memoryMb.

name

public name?: (string|null);

MachineType name.

scratchDisks

public scratchDisks: google.cloud.compute.v1.IScratchDisks[];

MachineType scratchDisks.

public selfLink?: (string|null);

MachineType selfLink.

zone

public zone?: (string|null);

MachineType zone.

Methods

create(properties)

public static create(properties?: google.cloud.compute.v1.IMachineType): google.cloud.compute.v1.MachineType;

Creates a new MachineType instance using the specified properties.

Parameter
Name Description
properties IMachineType

Properties to set

Returns
Type Description
MachineType

MachineType instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.MachineType;

Decodes a MachineType 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
MachineType

MachineType

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.MachineType;

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

Parameter
Name Description
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
Type Description
MachineType

MachineType

encode(message, writer)

public static encode(message: google.cloud.compute.v1.IMachineType, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified MachineType message. Does not implicitly messages.

Parameters
Name Description
message IMachineType

MachineType 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.IMachineType, writer?: $protobuf.Writer): $protobuf.Writer;

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

Parameters
Name Description
message IMachineType

MachineType 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.MachineType;

Creates a MachineType 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
MachineType

MachineType

getTypeUrl(typeUrlPrefix)

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

Gets the default type url for MachineType

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 MachineType to JSON.

Returns
Type Description
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.compute.v1.MachineType, options?: $protobuf.IConversionOptions): { [k: string]: any };

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

Parameters
Name Description
message MachineType

MachineType

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 MachineType message.

Parameter
Name Description
message { [k: string]: any }

Plain object to verify

Returns
Type Description
(string|null)

null if valid, otherwise the reason why it is not