Cardinality
Whether a field is optional, required, or repeated.
enum Cardinality
Whether a field is optional, required, or repeated.
enum Cardinality
import SwiftProtobuf
Support library for Swift code generated by protoc-gen-swift.
struct Google_Protobuf_Field
A single field of a message type.
case unknown
For fields with unknown cardinality.
case optional
For optional fields.
case required
For required fields. Proto2 syntax only.
case repeated
For repeated fields.
case UNRECOGNIZED(Int)
init()
static let _protobuf_nameMap: _NameMap
static let protoMessageName: String
var cardinality: Google_Protobuf_Field.Cardinality
The field cardinality.
var defaultValue: String
The string value of the default value of this field. Proto2 syntax only.
var jsonName: String
The field JSON name.
var kind: Google_Protobuf_Field.Kind
The field type.
var name: String
The field name.
var number: Int32
The field number.
var oneofIndex: Int32
The index of the field type in Type.oneofs
, for message or enumeration types. The first type has index 1; zero means the type is not in the list.
var options: [Google_Protobuf_Option]
The protocol buffer options.
var packed: Bool
Whether to use alternative packed wire representation.
var typeURL: String
The field type URL, without the scheme, for message or enumeration types. Example: "type.googleapis.com/google.protobuf.Timestamp"
.
var unknownFields: UnknownStorage
static func == (lhs: Google_Protobuf_Field, rhs: Google_Protobuf_Field) -> Bool
mutating func decodeMessage<D>(decoder: inout D) throws where D : Decoder
func traverse<V>(visitor: inout V) throws where V : Visitor
enum Kind
Basic field types.
protocol CaseIterable
A type that provides a collection of all of its values.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
@preconcurrency protocol Enum : Hashable, RawRepresentable, Sendable
Generated enum types conform to this protocol.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
protocol _ProtoNameProviding
SwiftProtobuf Internal: Common support looking up field names.
init()
init?(rawValue: Int)
static let _protobuf_nameMap: _NameMap
static let allCases: [Google_Protobuf_Field.Cardinality]
var rawValue: Int { get }
typealias RawValue = Int
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)