var containingOneof: OneofDescriptor?The oneof this field is a member of.
var containingType: Descriptor!The Descriptor of the message which this is a field of. For extensions, this is the extended type.
let defaultValue: String?The explicitly declared default value for this field.
var enumType: EnumDescriptor!When this is a enum field, that enum’s EnumDescriptor.
var extensionScope: Descriptor?Extensions can be declared within the scope of another message. If this is an extension field, then this will be the scope it was declared in nil if was declared at a global scope.
let features: Google_Protobuf_FeatureSetvar file: FileDescriptor!File in which this field was defined.
var fullName: StringFully-qualified name of the field.
var hasPresence: BoolReturns true if this field tracks presence, ie. does the field distinguish between “unset” and “present with default value.” This includes required, optional, and oneof fields. It excludes maps, repeated fields, and singular proto3 fields without “optional”.
let index: IntIndex of this field within the message’s fields, or the file or extension scope’s extensions.
let isExtension: BoolIf this is an extension field.
var isGroupLike: BoolHelper to see if this is “group-like”. Edition 2024 will likely provide a new feature to better deal with this. See upsteam protobuf for more details on the problem.
var isMap: BoolTrue if this field is a map.
var isPackable: BoolIs this field packable.
var isPacked: BoolIf this field is packable and packed.
var isRepeated: BoolWhether or not the field is repeated/map field.
var isRequired: BoolWhether or not the field is required. For proto2 required fields and Editions LEGACY_REQUIRED fields.
let jsonName: String?JSON name of this field.
var messageType: Descriptor!When this is a message/group field, that message’s Descriptor.
let name: StringName of this field within the message.
let number: Int32The field number.
let oneofIndex: Int32?The index in a oneof this field is in.
var options: Google_Protobuf_FieldOptionsThe FieldOptions for this field.
var realContainingOneof: OneofDescriptor?The non synthetic oneof this field is a member of.
var requiresUTF8Validation: BoolReturns true if this is a string field and should do UTF-8 validation.
var type: Google_Protobuf_FieldDescriptorProto.TypeEnumDeclared type of this field.
func getLocationPath(path: inout IndexPath)