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

Represents a LicenseCode.

Package

@google-cloud/compute

Constructors

(constructor)(properties)

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

Constructs a new LicenseCode.

Parameter
NameDescription
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
NameDescription
properties ILicenseCode

Properties to set

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

Reader or buffer to decode from

length number

Message length if known beforehand

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

Reader or buffer to decode from

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

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

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

Parameters
NameDescription
message ILicenseCode

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

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

LicenseCode

getTypeUrl(typeUrlPrefix)

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

Gets the default type url for LicenseCode

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

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

LicenseCode

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