getLocationPath(path:)
Descriptor+Extensions.swift:79func getLocationPath(path: inout IndexPath)
func getLocationPath(path: inout IndexPath)
s26SwiftProtobufPluginLibrary15FieldDescriptorC15getLocationPath4pathy20FoundationEssentials05IndexI0Vz_tF
What are these?2LGEA
import SwiftProtobufPluginLibrary
A reusable framework for building protoc
plugins in Swift.
final class FieldDescriptor
Describes a single field of a message. To get the descriptor for a given field, first get the Descriptor
for the message in which it is defined, then find the field. To get a FieldDescriptor
for an extension, get the Descriptor
or FileDescriptor
for its containing scope, find the extension.
struct IndexPath
IndexPath
represents the path to a specific node in a tree of nested array collections.
var containingOneof: OneofDescriptor? { get }
The oneof this field is a member of.
var containingType: Descriptor! { get }
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! { get }
When this is a enum field, that enum’s EnumDescriptor
.
var extensionScope: Descriptor? { get }
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_FeatureSet
var file: FileDescriptor! { get }
File in which this field was defined.
var fullName: String { get }
Fully-qualified name of the field.
var hasPresence: Bool { get }
Returns 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: Int
Index of this field within the message’s fields, or the file or extension scope’s extensions.
var internal_isGroupLike: Bool { get }
Helper 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.
let isExtension: Bool
If this is an extension field.
var isMap: Bool { get }
True if this field is a map.
var isOptional: Bool { get }
Shorthand for label
== .optional
var isPackable: Bool { get }
Is this field packable.
var isPacked: Bool { get }
If this field is packable and packed.
var isRepeated: Bool { get }
Shorthand for label
== .repeated
var isRequired: Bool { get }
Shorthand for label
== .required
.
let jsonName: String?
JSON name of this field.
let label: Google_Protobuf_FieldDescriptorProto.Label
optional/required/repeated
var messageType: Descriptor! { get }
When this is a message/group field, that message’s Descriptor
.
let name: String
Name of this field within the message.
let number: Int32
The field number.
let oneofIndex: Int32?
The index in a oneof this field is in.
var options: Google_Protobuf_FieldOptions
The FieldOptions for this field.
var realContainingOneof: OneofDescriptor? { get }
The non synthetic oneof this field is a member of.
var requiresUTF8Validation: Bool { get }
Returns true if this is a string field and should do UTF-8 validation.
var type: Google_Protobuf_FieldDescriptorProto.TypeEnum { get }
Declared type of this field.
func deprecationComment(commentPrefix: String) -> String
var explicitDefaultValue: String? { get }
The explicitly declared default value for this field.
var hasOptionalKeyword: Bool { get }
var oneof: OneofDescriptor? { get }
The oneof this field is a member of.
var proto: Google_Protobuf_FieldDescriptorProto { get }
var realOneof: OneofDescriptor? { get }
The non synthetic oneof this field is a member of.