Class protos.google.protobuf.FileDescriptorProto (3.16.1)

Represents a FileDescriptorProto.

Package

@google-cloud/asset!

Constructors

(constructor)(properties)

constructor(properties?: google.protobuf.IFileDescriptorProto);

Constructs a new FileDescriptorProto.

Parameter
NameDescription
properties IFileDescriptorProto

Properties to set

Properties

dependency

public dependency: string[];

FileDescriptorProto dependency.

Property Value
TypeDescription
string[]

enumType

public enumType: google.protobuf.IEnumDescriptorProto[];

FileDescriptorProto enumType.

Property Value
TypeDescription
google.protobuf.IEnumDescriptorProto[]

extension

public extension: google.protobuf.IFieldDescriptorProto[];

FileDescriptorProto extension.

Property Value
TypeDescription
google.protobuf.IFieldDescriptorProto[]

messageType

public messageType: google.protobuf.IDescriptorProto[];

FileDescriptorProto messageType.

Property Value
TypeDescription
google.protobuf.IDescriptorProto[]

name

public name: string;

FileDescriptorProto name.

Property Value
TypeDescription
string

options

public options?: (google.protobuf.IFileOptions|null);

FileDescriptorProto options.

Property Value
TypeDescription
(google.protobuf.IFileOptions|null)

package

public package: string;

FileDescriptorProto package.

Property Value
TypeDescription
string

publicDependency

public publicDependency: number[];

FileDescriptorProto publicDependency.

Property Value
TypeDescription
number[]

service

public service: google.protobuf.IServiceDescriptorProto[];

FileDescriptorProto service.

Property Value
TypeDescription
google.protobuf.IServiceDescriptorProto[]

sourceCodeInfo

public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null);

FileDescriptorProto sourceCodeInfo.

Property Value
TypeDescription
(google.protobuf.ISourceCodeInfo|null)

syntax

public syntax: string;

FileDescriptorProto syntax.

Property Value
TypeDescription
string

weakDependency

public weakDependency: number[];

FileDescriptorProto weakDependency.

Property Value
TypeDescription
number[]

Methods

create(properties)

public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto;

Creates a new FileDescriptorProto instance using the specified properties.

Parameter
NameDescription
properties IFileDescriptorProto

Properties to set

Returns
TypeDescription
google.protobuf.FileDescriptorProto

FileDescriptorProto instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto;

Decodes a FileDescriptorProto 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.protobuf.FileDescriptorProto

FileDescriptorProto

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto;

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

Parameter
NameDescription
reader ($protobuf.Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
google.protobuf.FileDescriptorProto

FileDescriptorProto

encode(message, writer)

public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified FileDescriptorProto message. Does not implicitly messages.

Parameters
NameDescription
message IFileDescriptorProto

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

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

Parameters
NameDescription
message IFileDescriptorProto

FileDescriptorProto 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.protobuf.FileDescriptorProto;

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

Parameter
NameDescription
object { [k: string]: any }

Plain object

Returns
TypeDescription
google.protobuf.FileDescriptorProto

FileDescriptorProto

toJSON()

public toJSON(): { [k: string]: any };

Converts this FileDescriptorProto to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };

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

Parameters
NameDescription
message google.protobuf.FileDescriptorProto

FileDescriptorProto

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