Skip to main content

Class: FileDescriptorSet

google.protobuf.FileDescriptorSet

Represents a FileDescriptorSet.

Implements

Constructors

constructor

new FileDescriptorSet(properties?): FileDescriptorSet

Constructs a new FileDescriptorSet.

Parameters

NameTypeDescription
properties?IFileDescriptorSetProperties to set

Returns

FileDescriptorSet

Properties

file

file: IFileDescriptorProto[]

FileDescriptorSet file.

Implementation of

IFileDescriptorSet.file

Methods

toJSON

toJSON(): Object

Converts this FileDescriptorSet to JSON.

Returns

Object

JSON object


create

create(properties?): FileDescriptorSet

Creates a new FileDescriptorSet instance using the specified properties.

Parameters

NameTypeDescription
properties?IFileDescriptorSetProperties to set

Returns

FileDescriptorSet

FileDescriptorSet instance


decode

decode(reader, length?): FileDescriptorSet

Decodes a FileDescriptorSet message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

FileDescriptorSet

FileDescriptorSet

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): FileDescriptorSet

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

FileDescriptorSet

FileDescriptorSet

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 FileDescriptorSet message. Does not implicitly google.protobuf.FileDescriptorSet.verify|verify messages.

Parameters

NameTypeDescription
messageIFileDescriptorSetFileDescriptorSet message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
messageIFileDescriptorSetFileDescriptorSet message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): FileDescriptorSet

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

FileDescriptorSet

FileDescriptorSet


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for FileDescriptorSet

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageFileDescriptorSetFileDescriptorSet
options?IConversionOptionsConversion options

Returns

Object

Plain object