EnumValueDescriptor
Describes an individual enum constant of a particular type. To get the EnumValueDescriptor
for a given enum value, first get the EnumDescriptor
for its type.
final class EnumValueDescriptor
Describes an individual enum constant of a particular type. To get the EnumValueDescriptor
for a given enum value, first get the EnumDescriptor
for its type.
final class EnumValueDescriptor
import SwiftProtobufPluginLibrary
A reusable framework for building protoc
plugins in Swift.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Escapable
protocol ProvidesDeprecationComment
Protocol that all the Descriptors conform to provide deprecation comments
protocol ProvidesLocationPath
Protocol that all the Descriptors conform to for original .proto file location lookup.
protocol ProvidesSourceCodeLocation
Protocol that all the Descriptors conform to for original .proto file location lookup.
protocol SimpleProvidesDeprecationComment : ProvidesDeprecationComment
Protocol that a Descriptor can confirm to when only the Type controls depecation.
var enumType: EnumDescriptor! { get }
The type of this value.
let features: Google_Protobuf_FeatureSet
The resolved features for this EnumValue.
var file: FileDescriptor! { get }
The .proto file in which this message type was defined.
var fullName: String { get set }
The full_name of an enum value is a sibling symbol of the enum type. e.g. the full name of FieldDescriptorProto::TYPE_INT32 is actually “google.protobuf.FieldDescriptorProto.TYPE_INT32”, NOT “google.protobuf.FieldDescriptorProto.Type.TYPE_INT32”. This is to conform with C++ scoping rules for enums.
let index: Int
Index within the enums’s EnumDescriptor
.
var isDeprecated: Bool { get }
let name: String
Name of this enum constant.
let number: Int32
Numeric value of this enum constant.
let options: Google_Protobuf_EnumValueOptions
The Google_Protobuf_EnumValueOptions
set on this value.
var typeName: String { get }
func getLocationPath(path: inout IndexPath)
weak var aliasOf: EnumValueDescriptor? { get }
var aliases: [EnumValueDescriptor] { get }
var proto: Google_Protobuf_EnumValueDescriptorProto { get }
var sourceCodeInfoLocation: Google_Protobuf_SourceCodeInfo.Location? { get }
func deprecationComment(commentPrefix: String) -> String
Default implementation to provide the depectation comment.
func protoSourceComments(commentPrefix: String = "///", leadingDetachedPrefix: String? = nil) -> String
Helper to get a source comments as a string.
func protoSourceCommentsWithDeprecation(commentPrefix: String = "///", leadingDetachedPrefix: String? = nil) -> String
Helper to get the protoSourceComments combined with any depectation comment.