Skip to main content

Class: GeneratedCodeInfo

Describes the relationship between generated code and its original source file. A GeneratedCodeInfo message is associated with only one generated source file, but may contain references to different source .proto files.

Properties​

annotation​

annotation: $Properties[]

An Annotation connects some span of text in generated code to an element of its generating .proto file.

Methods​

toJSON()​

toJSON(): object

Converts this GeneratedCodeInfo to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): GeneratedCodeInfo & $Properties

Creates a new GeneratedCodeInfo instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

GeneratedCodeInfo & $Properties

GeneratedCodeInfo instance

Call Signature​

static create(properties?): GeneratedCodeInfo

Creates a new GeneratedCodeInfo instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

GeneratedCodeInfo

GeneratedCodeInfo instance


decode()​

static decode(reader, length?): GeneratedCodeInfo & $Properties

Decodes a GeneratedCodeInfo message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

GeneratedCodeInfo & $Properties

GeneratedCodeInfo

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): GeneratedCodeInfo & $Properties

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

GeneratedCodeInfo & $Properties

GeneratedCodeInfo

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified GeneratedCodeInfo message. Does not implicitly google.protobuf.GeneratedCodeInfo.verify|verify messages.

Parameters​

message​

$Properties

GeneratedCodeInfo message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly google.protobuf.GeneratedCodeInfo.verify|verify messages.

Parameters​

message​

$Properties

GeneratedCodeInfo message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): GeneratedCodeInfo

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

GeneratedCodeInfo

GeneratedCodeInfo


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

GeneratedCodeInfo

GeneratedCodeInfo

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object