| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780 |
- // DO NOT EDIT.
- // swift-format-ignore-file
- // swiftlint:disable all
- //
- // Generated by the Swift generator plugin for the protocol buffer compiler.
- // Source: google/protobuf/type.proto
- //
- // For information on using the generated types, please see the documentation:
- // https://github.com/apple/swift-protobuf/
- // Protocol Buffers - Google's data interchange format
- // Copyright 2008 Google Inc. All rights reserved.
- // https://developers.google.com/protocol-buffers/
- //
- // Redistribution and use in source and binary forms, with or without
- // modification, are permitted provided that the following conditions are
- // met:
- //
- // * Redistributions of source code must retain the above copyright
- // notice, this list of conditions and the following disclaimer.
- // * Redistributions in binary form must reproduce the above
- // copyright notice, this list of conditions and the following disclaimer
- // in the documentation and/or other materials provided with the
- // distribution.
- // * Neither the name of Google Inc. nor the names of its
- // contributors may be used to endorse or promote products derived from
- // this software without specific prior written permission.
- //
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- // 'import SwiftProtobuf' suppressed, this proto file is meant to be bundled in the runtime.
- // If the compiler emits an error on this type, it is because this file
- // was generated by a version of the `protoc` Swift plug-in that is
- // incompatible with the version of SwiftProtobuf to which you are linking.
- // Please ensure that you are building against the same version of the API
- // that was used to generate this file.
- fileprivate struct _GeneratedWithProtocGenSwiftVersion: ProtobufAPIVersionCheck {
- struct _2: ProtobufAPIVersion_2 {}
- typealias Version = _2
- }
- /// The syntax in which a protocol buffer element is defined.
- public enum Google_Protobuf_Syntax: Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- /// Syntax `proto2`.
- case proto2 // = 0
- /// Syntax `proto3`.
- case proto3 // = 1
- /// Syntax `editions`.
- case editions // = 2
- case UNRECOGNIZED(Int)
- public init() {
- self = .proto2
- }
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .proto2
- case 1: self = .proto3
- case 2: self = .editions
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- public var rawValue: Int {
- switch self {
- case .proto2: return 0
- case .proto3: return 1
- case .editions: return 2
- case .UNRECOGNIZED(let i): return i
- }
- }
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Google_Protobuf_Syntax] = [
- .proto2,
- .proto3,
- .editions,
- ]
- }
- /// A protocol buffer message type.
- ///
- /// New usages of this message as an alternative to DescriptorProto are strongly
- /// discouraged. This message does not reliability preserve all information
- /// necessary to model the schema and preserve semantics. Instead make use of
- /// FileDescriptorSet which preserves the necessary information.
- public struct Google_Protobuf_Type: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// The fully qualified message name.
- public var name: String = String()
- /// The list of fields.
- public var fields: [Google_Protobuf_Field] = []
- /// The list of types appearing in `oneof` definitions in this type.
- public var oneofs: [String] = []
- /// The protocol buffer options.
- public var options: [Google_Protobuf_Option] = []
- /// The source context.
- public var sourceContext: Google_Protobuf_SourceContext {
- get {_sourceContext ?? Google_Protobuf_SourceContext()}
- set {_sourceContext = newValue}
- }
- /// Returns true if `sourceContext` has been explicitly set.
- public var hasSourceContext: Bool {self._sourceContext != nil}
- /// Clears the value of `sourceContext`. Subsequent reads from it will return its default value.
- public mutating func clearSourceContext() {self._sourceContext = nil}
- /// The source syntax.
- public var syntax: Google_Protobuf_Syntax = .proto2
- /// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
- public var edition: String = String()
- public var unknownFields = UnknownStorage()
- public init() {}
- fileprivate var _sourceContext: Google_Protobuf_SourceContext? = nil
- }
- /// A single field of a message type.
- ///
- /// New usages of this message as an alternative to FieldDescriptorProto are
- /// strongly discouraged. This message does not reliability preserve all
- /// information necessary to model the schema and preserve semantics. Instead
- /// make use of FileDescriptorSet which preserves the necessary information.
- public struct Google_Protobuf_Field: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// The field type.
- public var kind: Google_Protobuf_Field.Kind = .typeUnknown
- /// The field cardinality.
- public var cardinality: Google_Protobuf_Field.Cardinality = .unknown
- /// The field number.
- public var number: Int32 = 0
- /// The field name.
- public var name: String = String()
- /// The field type URL, without the scheme, for message or enumeration
- /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
- public var typeURL: String = String()
- /// 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.
- public var oneofIndex: Int32 = 0
- /// Whether to use alternative packed wire representation.
- public var packed: Bool = false
- /// The protocol buffer options.
- public var options: [Google_Protobuf_Option] = []
- /// The field JSON name.
- public var jsonName: String = String()
- /// The string value of the default value of this field. Proto2 syntax only.
- public var defaultValue: String = String()
- public var unknownFields = UnknownStorage()
- /// Basic field types.
- public enum Kind: Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- /// Field type unknown.
- case typeUnknown // = 0
- /// Field type double.
- case typeDouble // = 1
- /// Field type float.
- case typeFloat // = 2
- /// Field type int64.
- case typeInt64 // = 3
- /// Field type uint64.
- case typeUint64 // = 4
- /// Field type int32.
- case typeInt32 // = 5
- /// Field type fixed64.
- case typeFixed64 // = 6
- /// Field type fixed32.
- case typeFixed32 // = 7
- /// Field type bool.
- case typeBool // = 8
- /// Field type string.
- case typeString // = 9
- /// Field type group. Proto2 syntax only, and deprecated.
- case typeGroup // = 10
- /// Field type message.
- case typeMessage // = 11
- /// Field type bytes.
- case typeBytes // = 12
- /// Field type uint32.
- case typeUint32 // = 13
- /// Field type enum.
- case typeEnum // = 14
- /// Field type sfixed32.
- case typeSfixed32 // = 15
- /// Field type sfixed64.
- case typeSfixed64 // = 16
- /// Field type sint32.
- case typeSint32 // = 17
- /// Field type sint64.
- case typeSint64 // = 18
- case UNRECOGNIZED(Int)
- public init() {
- self = .typeUnknown
- }
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .typeUnknown
- case 1: self = .typeDouble
- case 2: self = .typeFloat
- case 3: self = .typeInt64
- case 4: self = .typeUint64
- case 5: self = .typeInt32
- case 6: self = .typeFixed64
- case 7: self = .typeFixed32
- case 8: self = .typeBool
- case 9: self = .typeString
- case 10: self = .typeGroup
- case 11: self = .typeMessage
- case 12: self = .typeBytes
- case 13: self = .typeUint32
- case 14: self = .typeEnum
- case 15: self = .typeSfixed32
- case 16: self = .typeSfixed64
- case 17: self = .typeSint32
- case 18: self = .typeSint64
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- public var rawValue: Int {
- switch self {
- case .typeUnknown: return 0
- case .typeDouble: return 1
- case .typeFloat: return 2
- case .typeInt64: return 3
- case .typeUint64: return 4
- case .typeInt32: return 5
- case .typeFixed64: return 6
- case .typeFixed32: return 7
- case .typeBool: return 8
- case .typeString: return 9
- case .typeGroup: return 10
- case .typeMessage: return 11
- case .typeBytes: return 12
- case .typeUint32: return 13
- case .typeEnum: return 14
- case .typeSfixed32: return 15
- case .typeSfixed64: return 16
- case .typeSint32: return 17
- case .typeSint64: return 18
- case .UNRECOGNIZED(let i): return i
- }
- }
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Google_Protobuf_Field.Kind] = [
- .typeUnknown,
- .typeDouble,
- .typeFloat,
- .typeInt64,
- .typeUint64,
- .typeInt32,
- .typeFixed64,
- .typeFixed32,
- .typeBool,
- .typeString,
- .typeGroup,
- .typeMessage,
- .typeBytes,
- .typeUint32,
- .typeEnum,
- .typeSfixed32,
- .typeSfixed64,
- .typeSint32,
- .typeSint64,
- ]
- }
- /// Whether a field is optional, required, or repeated.
- public enum Cardinality: Enum, Swift.CaseIterable {
- public typealias RawValue = Int
- /// For fields with unknown cardinality.
- case unknown // = 0
- /// For optional fields.
- case `optional` // = 1
- /// For required fields. Proto2 syntax only.
- case `required` // = 2
- /// For repeated fields.
- case repeated // = 3
- case UNRECOGNIZED(Int)
- public init() {
- self = .unknown
- }
- public init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .unknown
- case 1: self = .optional
- case 2: self = .required
- case 3: self = .repeated
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- public var rawValue: Int {
- switch self {
- case .unknown: return 0
- case .optional: return 1
- case .required: return 2
- case .repeated: return 3
- case .UNRECOGNIZED(let i): return i
- }
- }
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- public static let allCases: [Google_Protobuf_Field.Cardinality] = [
- .unknown,
- .optional,
- .required,
- .repeated,
- ]
- }
- public init() {}
- }
- /// Enum type definition.
- ///
- /// New usages of this message as an alternative to EnumDescriptorProto are
- /// strongly discouraged. This message does not reliability preserve all
- /// information necessary to model the schema and preserve semantics. Instead
- /// make use of FileDescriptorSet which preserves the necessary information.
- public struct Google_Protobuf_Enum: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Enum type name.
- public var name: String = String()
- /// Enum value definitions.
- public var enumvalue: [Google_Protobuf_EnumValue] = []
- /// Protocol buffer options.
- public var options: [Google_Protobuf_Option] = []
- /// The source context.
- public var sourceContext: Google_Protobuf_SourceContext {
- get {_sourceContext ?? Google_Protobuf_SourceContext()}
- set {_sourceContext = newValue}
- }
- /// Returns true if `sourceContext` has been explicitly set.
- public var hasSourceContext: Bool {self._sourceContext != nil}
- /// Clears the value of `sourceContext`. Subsequent reads from it will return its default value.
- public mutating func clearSourceContext() {self._sourceContext = nil}
- /// The source syntax.
- public var syntax: Google_Protobuf_Syntax = .proto2
- /// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
- public var edition: String = String()
- public var unknownFields = UnknownStorage()
- public init() {}
- fileprivate var _sourceContext: Google_Protobuf_SourceContext? = nil
- }
- /// Enum value definition.
- ///
- /// New usages of this message as an alternative to EnumValueDescriptorProto are
- /// strongly discouraged. This message does not reliability preserve all
- /// information necessary to model the schema and preserve semantics. Instead
- /// make use of FileDescriptorSet which preserves the necessary information.
- public struct Google_Protobuf_EnumValue: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// Enum value name.
- public var name: String = String()
- /// Enum value number.
- public var number: Int32 = 0
- /// Protocol buffer options.
- public var options: [Google_Protobuf_Option] = []
- public var unknownFields = UnknownStorage()
- public init() {}
- }
- /// A protocol buffer option, which can be attached to a message, field,
- /// enumeration, etc.
- ///
- /// New usages of this message as an alternative to FileOptions, MessageOptions,
- /// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
- /// are strongly discouraged.
- public struct Google_Protobuf_Option: Sendable {
- // SwiftProtobuf.Message conformance is added in an extension below. See the
- // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
- // methods supported on all messages.
- /// The option's name. For protobuf built-in options (options defined in
- /// descriptor.proto), this is the short name. For example, `"map_entry"`.
- /// For custom options, it should be the fully-qualified name. For example,
- /// `"google.api.http"`.
- public var name: String = String()
- /// The option's value packed in an Any message. If the value is a primitive,
- /// the corresponding wrapper type defined in google/protobuf/wrappers.proto
- /// should be used. If the value is an enum, it should be stored as an int32
- /// value using the google.protobuf.Int32Value type.
- public var value: Google_Protobuf_Any {
- get {_value ?? Google_Protobuf_Any()}
- set {_value = newValue}
- }
- /// Returns true if `value` has been explicitly set.
- public var hasValue: Bool {self._value != nil}
- /// Clears the value of `value`. Subsequent reads from it will return its default value.
- public mutating func clearValue() {self._value = nil}
- public var unknownFields = UnknownStorage()
- public init() {}
- fileprivate var _value: Google_Protobuf_Any? = nil
- }
- // MARK: - Code below here is support for the SwiftProtobuf runtime.
- fileprivate let _protobuf_package = "google.protobuf"
- extension Google_Protobuf_Syntax: _ProtoNameProviding {
- public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{2}\0SYNTAX_PROTO2\0\u{1}SYNTAX_PROTO3\0\u{1}SYNTAX_EDITIONS\0")
- }
- extension Google_Protobuf_Type: Message, _MessageImplementationBase, _ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".Type"
- public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}fields\0\u{1}oneofs\0\u{1}options\0\u{3}source_context\0\u{1}syntax\0\u{1}edition\0")
- public mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self.name) }()
- case 2: try { try decoder.decodeRepeatedMessageField(value: &self.fields) }()
- case 3: try { try decoder.decodeRepeatedStringField(value: &self.oneofs) }()
- case 4: try { try decoder.decodeRepeatedMessageField(value: &self.options) }()
- case 5: try { try decoder.decodeSingularMessageField(value: &self._sourceContext) }()
- case 6: try { try decoder.decodeSingularEnumField(value: &self.syntax) }()
- case 7: try { try decoder.decodeSingularStringField(value: &self.edition) }()
- default: break
- }
- }
- }
- public func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if !self.name.isEmpty {
- try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
- }
- if !self.fields.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.fields, fieldNumber: 2)
- }
- if !self.oneofs.isEmpty {
- try visitor.visitRepeatedStringField(value: self.oneofs, fieldNumber: 3)
- }
- if !self.options.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 4)
- }
- try { if let v = self._sourceContext {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
- } }()
- if self.syntax != .proto2 {
- try visitor.visitSingularEnumField(value: self.syntax, fieldNumber: 6)
- }
- if !self.edition.isEmpty {
- try visitor.visitSingularStringField(value: self.edition, fieldNumber: 7)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- public static func ==(lhs: Google_Protobuf_Type, rhs: Google_Protobuf_Type) -> Bool {
- if lhs.name != rhs.name {return false}
- if lhs.fields != rhs.fields {return false}
- if lhs.oneofs != rhs.oneofs {return false}
- if lhs.options != rhs.options {return false}
- if lhs._sourceContext != rhs._sourceContext {return false}
- if lhs.syntax != rhs.syntax {return false}
- if lhs.edition != rhs.edition {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_Field: Message, _MessageImplementationBase, _ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".Field"
- public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}kind\0\u{1}cardinality\0\u{1}number\0\u{1}name\0\u{4}\u{2}type_url\0\u{3}oneof_index\0\u{1}packed\0\u{1}options\0\u{3}json_name\0\u{3}default_value\0")
- public mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularEnumField(value: &self.kind) }()
- case 2: try { try decoder.decodeSingularEnumField(value: &self.cardinality) }()
- case 3: try { try decoder.decodeSingularInt32Field(value: &self.number) }()
- case 4: try { try decoder.decodeSingularStringField(value: &self.name) }()
- case 6: try { try decoder.decodeSingularStringField(value: &self.typeURL) }()
- case 7: try { try decoder.decodeSingularInt32Field(value: &self.oneofIndex) }()
- case 8: try { try decoder.decodeSingularBoolField(value: &self.packed) }()
- case 9: try { try decoder.decodeRepeatedMessageField(value: &self.options) }()
- case 10: try { try decoder.decodeSingularStringField(value: &self.jsonName) }()
- case 11: try { try decoder.decodeSingularStringField(value: &self.defaultValue) }()
- default: break
- }
- }
- }
- public func traverse<V: Visitor>(visitor: inout V) throws {
- if self.kind != .typeUnknown {
- try visitor.visitSingularEnumField(value: self.kind, fieldNumber: 1)
- }
- if self.cardinality != .unknown {
- try visitor.visitSingularEnumField(value: self.cardinality, fieldNumber: 2)
- }
- if self.number != 0 {
- try visitor.visitSingularInt32Field(value: self.number, fieldNumber: 3)
- }
- if !self.name.isEmpty {
- try visitor.visitSingularStringField(value: self.name, fieldNumber: 4)
- }
- if !self.typeURL.isEmpty {
- try visitor.visitSingularStringField(value: self.typeURL, fieldNumber: 6)
- }
- if self.oneofIndex != 0 {
- try visitor.visitSingularInt32Field(value: self.oneofIndex, fieldNumber: 7)
- }
- if self.packed != false {
- try visitor.visitSingularBoolField(value: self.packed, fieldNumber: 8)
- }
- if !self.options.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 9)
- }
- if !self.jsonName.isEmpty {
- try visitor.visitSingularStringField(value: self.jsonName, fieldNumber: 10)
- }
- if !self.defaultValue.isEmpty {
- try visitor.visitSingularStringField(value: self.defaultValue, fieldNumber: 11)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- public static func ==(lhs: Google_Protobuf_Field, rhs: Google_Protobuf_Field) -> Bool {
- if lhs.kind != rhs.kind {return false}
- if lhs.cardinality != rhs.cardinality {return false}
- if lhs.number != rhs.number {return false}
- if lhs.name != rhs.name {return false}
- if lhs.typeURL != rhs.typeURL {return false}
- if lhs.oneofIndex != rhs.oneofIndex {return false}
- if lhs.packed != rhs.packed {return false}
- if lhs.options != rhs.options {return false}
- if lhs.jsonName != rhs.jsonName {return false}
- if lhs.defaultValue != rhs.defaultValue {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_Field.Kind: _ProtoNameProviding {
- public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{2}\0TYPE_UNKNOWN\0\u{1}TYPE_DOUBLE\0\u{1}TYPE_FLOAT\0\u{1}TYPE_INT64\0\u{1}TYPE_UINT64\0\u{1}TYPE_INT32\0\u{1}TYPE_FIXED64\0\u{1}TYPE_FIXED32\0\u{1}TYPE_BOOL\0\u{1}TYPE_STRING\0\u{1}TYPE_GROUP\0\u{1}TYPE_MESSAGE\0\u{1}TYPE_BYTES\0\u{1}TYPE_UINT32\0\u{1}TYPE_ENUM\0\u{1}TYPE_SFIXED32\0\u{1}TYPE_SFIXED64\0\u{1}TYPE_SINT32\0\u{1}TYPE_SINT64\0")
- }
- extension Google_Protobuf_Field.Cardinality: _ProtoNameProviding {
- public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{2}\0CARDINALITY_UNKNOWN\0\u{1}CARDINALITY_OPTIONAL\0\u{1}CARDINALITY_REQUIRED\0\u{1}CARDINALITY_REPEATED\0")
- }
- extension Google_Protobuf_Enum: Message, _MessageImplementationBase, _ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".Enum"
- public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}enumvalue\0\u{1}options\0\u{3}source_context\0\u{1}syntax\0\u{1}edition\0")
- public mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self.name) }()
- case 2: try { try decoder.decodeRepeatedMessageField(value: &self.enumvalue) }()
- case 3: try { try decoder.decodeRepeatedMessageField(value: &self.options) }()
- case 4: try { try decoder.decodeSingularMessageField(value: &self._sourceContext) }()
- case 5: try { try decoder.decodeSingularEnumField(value: &self.syntax) }()
- case 6: try { try decoder.decodeSingularStringField(value: &self.edition) }()
- default: break
- }
- }
- }
- public func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if !self.name.isEmpty {
- try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
- }
- if !self.enumvalue.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.enumvalue, fieldNumber: 2)
- }
- if !self.options.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 3)
- }
- try { if let v = self._sourceContext {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- } }()
- if self.syntax != .proto2 {
- try visitor.visitSingularEnumField(value: self.syntax, fieldNumber: 5)
- }
- if !self.edition.isEmpty {
- try visitor.visitSingularStringField(value: self.edition, fieldNumber: 6)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- public static func ==(lhs: Google_Protobuf_Enum, rhs: Google_Protobuf_Enum) -> Bool {
- if lhs.name != rhs.name {return false}
- if lhs.enumvalue != rhs.enumvalue {return false}
- if lhs.options != rhs.options {return false}
- if lhs._sourceContext != rhs._sourceContext {return false}
- if lhs.syntax != rhs.syntax {return false}
- if lhs.edition != rhs.edition {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_EnumValue: Message, _MessageImplementationBase, _ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".EnumValue"
- public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}number\0\u{1}options\0")
- public mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self.name) }()
- case 2: try { try decoder.decodeSingularInt32Field(value: &self.number) }()
- case 3: try { try decoder.decodeRepeatedMessageField(value: &self.options) }()
- default: break
- }
- }
- }
- public func traverse<V: Visitor>(visitor: inout V) throws {
- if !self.name.isEmpty {
- try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
- }
- if self.number != 0 {
- try visitor.visitSingularInt32Field(value: self.number, fieldNumber: 2)
- }
- if !self.options.isEmpty {
- try visitor.visitRepeatedMessageField(value: self.options, fieldNumber: 3)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- public static func ==(lhs: Google_Protobuf_EnumValue, rhs: Google_Protobuf_EnumValue) -> Bool {
- if lhs.name != rhs.name {return false}
- if lhs.number != rhs.number {return false}
- if lhs.options != rhs.options {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Google_Protobuf_Option: Message, _MessageImplementationBase, _ProtoNameProviding {
- public static let protoMessageName: String = _protobuf_package + ".Option"
- public static let _protobuf_nameMap = _NameMap(bytecode: "\0\u{1}name\0\u{1}value\0")
- public mutating func decodeMessage<D: Decoder>(decoder: inout D) throws {
- while let fieldNumber = try decoder.nextFieldNumber() {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every case branch when no optimizations are
- // enabled. https://github.com/apple/swift-protobuf/issues/1034
- switch fieldNumber {
- case 1: try { try decoder.decodeSingularStringField(value: &self.name) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &self._value) }()
- default: break
- }
- }
- }
- public func traverse<V: Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- if !self.name.isEmpty {
- try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
- }
- try { if let v = self._value {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- public static func ==(lhs: Google_Protobuf_Option, rhs: Google_Protobuf_Option) -> Bool {
- if lhs.name != rhs.name {return false}
- if lhs._value != rhs._value {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
|