Skip to main content

Class: FileDescriptorProto

google.protobuf.FileDescriptorProto

Represents a FileDescriptorProto.

Implements#

Constructors#

constructor#

new FileDescriptorProto(properties?)

Constructs a new FileDescriptorProto.

Parameters#

NameType
properties?IFileDescriptorProto

Properties#

dependency#

dependency: string[]

FileDescriptorProto dependency.

Implementation of#

IFileDescriptorProto.dependency


enumType#

enumType: IEnumDescriptorProto[]

FileDescriptorProto enumType.

Implementation of#

IFileDescriptorProto.enumType


extension#

extension: IFieldDescriptorProto[]

FileDescriptorProto extension.

Implementation of#

IFileDescriptorProto.extension


messageType#

messageType: IDescriptorProto[]

FileDescriptorProto messageType.

Implementation of#

IFileDescriptorProto.messageType


name#

name: string

FileDescriptorProto name.

Implementation of#

IFileDescriptorProto.name


options#

Optional options: null | IFileOptions

FileDescriptorProto options.

Implementation of#

IFileDescriptorProto.options


package#

package: string

FileDescriptorProto package.

Implementation of#

IFileDescriptorProto.package


publicDependency#

publicDependency: number[]

FileDescriptorProto publicDependency.

Implementation of#

IFileDescriptorProto.publicDependency


service#

service: IServiceDescriptorProto[]

FileDescriptorProto service.

Implementation of#

IFileDescriptorProto.service


sourceCodeInfo#

Optional sourceCodeInfo: null | ISourceCodeInfo

FileDescriptorProto sourceCodeInfo.

Implementation of#

IFileDescriptorProto.sourceCodeInfo


syntax#

syntax: string

FileDescriptorProto syntax.

Implementation of#

IFileDescriptorProto.syntax


weakDependency#

weakDependency: number[]

FileDescriptorProto weakDependency.

Implementation of#

IFileDescriptorProto.weakDependency

Methods#

toJSON#

toJSON(): Object

Converts this FileDescriptorProto to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): FileDescriptorProto

Decodes a FileDescriptorProto message from the specified reader or buffer.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters#

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?number-

Returns#

FileDescriptorProto

FileDescriptorProto


decodeDelimited#

Static decodeDelimited(reader): FileDescriptorProto

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

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters#

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns#

FileDescriptorProto

FileDescriptorProto


encode#

Static encode(message, writer?): Writer

Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.

Parameters#

NameTypeDescription
messageIFileDescriptorProtoFileDescriptorProto message or plain object to encode
writer?Writer-

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.

Parameters#

NameTypeDescription
messageIFileDescriptorProtoFileDescriptorProto message or plain object to encode
writer?Writer-

Returns#

Writer

Writer


fromObject#

Static fromObject(object): FileDescriptorProto

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

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

FileDescriptorProto

FileDescriptorProto


toObject#

Static toObject(message, options?): Object

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

Parameters#

NameTypeDescription
messageFileDescriptorProtoFileDescriptorProto
options?IConversionOptions-

Returns#

Object

Plain object