Class protos.google.cloud.compute.v1.LicenseCode (4.8.0)

Represents a LicenseCode.

Package

@google-cloud/compute

Constructors

(constructor)(properties)

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

Constructs a new LicenseCode.

Parameter
Name Description
properties ILicenseCode

Properties to set

Properties

_creationTimestamp

public _creationTimestamp?: "creationTimestamp";

LicenseCode _creationTimestamp.

_description

public _description?: "description";

LicenseCode _description.

_id

public _id?: "id";

LicenseCode _id.

_kind

public _kind?: "kind";

LicenseCode _kind.

_name

public _name?: "name";

LicenseCode _name.

public _selfLink?: "selfLink";

LicenseCode _selfLink.

_state

public _state?: "state";

LicenseCode _state.

_transferable

public _transferable?: "transferable";

LicenseCode _transferable.

creationTimestamp

public creationTimestamp?: (string|null);

LicenseCode creationTimestamp.

description

public description?: (string|null);

LicenseCode description.

id

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

LicenseCode id.

kind

public kind?: (string|null);

LicenseCode kind.

licenseAlias

public licenseAlias: google.cloud.compute.v1.ILicenseCodeLicenseAlias[];

LicenseCode licenseAlias.

name

public name?: (string|null);

LicenseCode name.

public selfLink?: (string|null);

LicenseCode selfLink.

state

public state?: (string|null);

LicenseCode state.

transferable

public transferable?: (boolean|null);

LicenseCode transferable.

Methods

create(properties)

public static create(properties?: google.cloud.compute.v1.ILicenseCode): google.cloud.compute.v1.LicenseCode;

Creates a new LicenseCode instance using the specified properties.

Parameter
Name Description
properties ILicenseCode

Properties to set

Returns
Type Description
LicenseCode

LicenseCode instance

decode(reader, length)

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

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

LicenseCode

decodeDelimited(reader)

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

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

Parameter
Name Description
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
Type Description
LicenseCode

LicenseCode

encode(message, writer)

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

Encodes the specified LicenseCode message. Does not implicitly messages.

Parameters
Name Description
message ILicenseCode

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

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

Parameters
Name Description
message ILicenseCode

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

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

LicenseCode

getTypeUrl(typeUrlPrefix)

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

Gets the default type url for LicenseCode

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

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

JSON object

toObject(message, options)

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

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

Parameters
Name Description
message LicenseCode

LicenseCode

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 LicenseCode 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