Instance Methodswift-protobuf 1.28.1SwiftProtobufPluginLibrary
relativeName(enumValue:)
Calculate the relative name for the given enum value.
SwiftProtobufNamer.swift:155func relativeName(enumValue: EnumValueDescriptor) -> String
Other members in extension
Typealiases
Type members
init(
) Initializes a a new namer, assuming everything will be in the same Swift module.
init(currentFile: FileDescriptor, protoFileToModuleMappings: ProtoFileToModuleMappings
) Initializes a a new namer. All names will be generated as from the pov of the given file using the provided file to module mapper.
Instance members
let mappings: ProtoFileToModuleMappings
var swiftProtobufModuleName: String
var swiftProtobufModulePrefix: String
let targetModule: String
func dottedRelativeName(enumValue: EnumValueDescriptor
) -> String The relative name with a leading dot so it can be used where the type is known.
func fullName(enum: EnumDescriptor
) -> String Calculate the full name for the given enum.
func fullName(enumValue: EnumValueDescriptor
) -> String Calculate the full name for the given enum value.
func fullName(extensionField: FieldDescriptor
) -> String Calculate the full name for the given extension.
func fullName(message: Descriptor
) -> String Calculate the full name for the given message.
func fullName(oneof: OneofDescriptor
) -> String Calculate the full name for the given oneof.
func messagePropertyName(oneof: OneofDescriptor, prefixed: String
) -> OneofFieldNames Calculate the name to use for the Swift field on the message.
func messagePropertyNames(extensionField: FieldDescriptor
) -> MessageExtensionNames Calculate the names to use for the Swift Extension on the extended message.
func messagePropertyNames(field: FieldDescriptor, prefixed: String, includeHasAndClear: Bool
) -> MessageFieldNames Calculate the names to use for the Swift fields on the message.
func relativeName(enum: EnumDescriptor
) -> String Calculate the relative name for the given enum.
func relativeName(extensionField: FieldDescriptor
) -> String Calculate the relative name for the given entension.
func relativeName(message: Descriptor
) -> String Calculate the relative name for the given message.
func relativeName(oneof: OneofDescriptor
) -> String Calculate the relative name for the given oneof.
func typePrefix(forFile: FileDescriptor
) -> String Calculate the prefix to use for this file, it is derived from the proto package or swift_prefix file option.
Show obsolete interfaces (1)
Hide obsolete interfaces
func uniquelyNamedValues(enum: EnumDescriptor
) -> [EnumValueDescriptor] Filters the Enum’s values to those that will have unique Swift names. Only poorly named proto enum alias values get filtered away, so the assumption is they aren’t really needed from an api pov.