Skip to main content

Class: GeneratedCodeInfo

google.protobuf.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​

▸ create(properties?): GeneratedCodeInfo & $Properties

Creates a new GeneratedCodeInfo instance using the specified properties.

Parameters​

NameTypeDescription
properties?$PropertiesProperties to set

Returns​

GeneratedCodeInfo & $Properties

GeneratedCodeInfo instance

▸ create(properties?): GeneratedCodeInfo

Parameters​

NameType
properties?$Properties

Returns​

GeneratedCodeInfo


decode​

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

Decodes a GeneratedCodeInfo message from the specified reader or buffer.

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage 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​

▸ decodeDelimited(reader): GeneratedCodeInfo & $Properties

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

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader 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​

▸ encode(message, writer?): Writer

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

Parameters​

NameTypeDescription
message$PropertiesGeneratedCodeInfo message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


encodeDelimited​

▸ encodeDelimited(message, writer?): Writer

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

Parameters​

NameTypeDescription
message$PropertiesGeneratedCodeInfo message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


fromObject​

▸ fromObject(object): GeneratedCodeInfo

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

Parameters​

NameTypeDescription
objectObjectPlain object

Returns​

GeneratedCodeInfo

GeneratedCodeInfo


toObject​

▸ toObject(message, options?): Object

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

Parameters​

NameTypeDescription
messageGeneratedCodeInfoGeneratedCodeInfo
options?IConversionOptionsConversion options

Returns​

Object

Plain object