GitHub

FileDescriptorProto

API reference for FileDescriptorProto.

Describes a complete .proto file.

Attributes

AttributeTypeDescription
namestr

file name, relative to root of source tree

packagestr

e.g. "foo", "foo.bar", etc.

dependencylist[str]

Names of files imported by this file.

public_dependencylist[int]

Indexes of the public imported files in the dependency list above.

weak_dependencylist[int]

Indexes of the weak imported files in the dependency list. For Google-internal migration only. Do not use.

option_dependencylist[str]

Names of files imported by this file purely for the purpose of providing option extensions. These are excluded from the dependency list above.

message_typelist[DescriptorProto]

All top-level definitions in this file.

enum_typelist[EnumDescriptorProto]
servicelist[ServiceDescriptorProto]
extensionlist[FieldDescriptorProto]
optionsFileOptions
source_code_infoSourceCodeInfo

This field contains optional information about the original source code. You may safely remove this entire field without harming runtime functionality of the descriptors -- the information is needed only by development tools.

syntaxstr

The syntax of the proto file. The supported values are "proto2", "proto3", and "editions".

If edition is present, this value must be "editions". WARNING: This field should only be used by protobuf plugins or special cases like the proto compiler. Other uses are discouraged and developers should rely on the protoreflect APIs for their client language.

editionint

A Edition.

The edition of the proto file. WARNING: This field should only be used by protobuf plugins or special cases like the proto compiler. Other uses are discouraged and developers should rely on the protoreflect APIs for their client language.