unittest_swift_groups.pb.swift 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. // swiftlint:disable all
  4. //
  5. // Generated by the Swift generator plugin for the protocol buffer compiler.
  6. // Source: unittest_swift_groups.proto
  7. //
  8. // For information on using the generated types, please see the documentation:
  9. // https://github.com/apple/swift-protobuf/
  10. // Protocol Buffers - Google's data interchange format
  11. // Copyright 2015 Google Inc. All rights reserved.
  12. // https://developers.google.com/protocol-buffers/
  13. //
  14. // Redistribution and use in source and binary forms, with or without
  15. // modification, are permitted provided that the following conditions are
  16. // met:
  17. //
  18. // * Redistributions of source code must retain the above copyright
  19. // notice, this list of conditions and the following disclaimer.
  20. // * Redistributions in binary form must reproduce the above
  21. // copyright notice, this list of conditions and the following disclaimer
  22. // in the documentation and/or other materials provided with the
  23. // distribution.
  24. // * Neither the name of Google Inc. nor the names of its
  25. // contributors may be used to endorse or promote products derived from
  26. // this software without specific prior written permission.
  27. //
  28. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  29. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  30. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  31. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  32. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  33. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  34. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  35. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  36. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  38. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. import SwiftProtobuf
  40. // If the compiler emits an error on this type, it is because this file
  41. // was generated by a version of the `protoc` Swift plug-in that is
  42. // incompatible with the version of SwiftProtobuf to which you are linking.
  43. // Please ensure that you are building against the same version of the API
  44. // that was used to generate this file.
  45. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  46. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  47. typealias Version = _2
  48. }
  49. /// Same field number appears inside and outside of the group.
  50. struct SwiftProtoTesting_GroupExtensions: SwiftProtobuf.ExtensibleMessage, Sendable {
  51. // SwiftProtobuf.Message conformance is added in an extension below. See the
  52. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  53. // methods supported on all messages.
  54. var a: Int32 {
  55. get {_a ?? 0}
  56. set {_a = newValue}
  57. }
  58. /// Returns true if `a` has been explicitly set.
  59. var hasA: Bool {self._a != nil}
  60. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  61. mutating func clearA() {self._a = nil}
  62. var unknownFields = SwiftProtobuf.UnknownStorage()
  63. init() {}
  64. var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  65. fileprivate var _a: Int32? = nil
  66. }
  67. struct SwiftProtoTesting_ExtensionGroup: Sendable {
  68. // SwiftProtobuf.Message conformance is added in an extension below. See the
  69. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  70. // methods supported on all messages.
  71. var a: Int32 {
  72. get {_a ?? 0}
  73. set {_a = newValue}
  74. }
  75. /// Returns true if `a` has been explicitly set.
  76. var hasA: Bool {self._a != nil}
  77. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  78. mutating func clearA() {self._a = nil}
  79. var unknownFields = SwiftProtobuf.UnknownStorage()
  80. init() {}
  81. fileprivate var _a: Int32? = nil
  82. }
  83. struct SwiftProtoTesting_RepeatedExtensionGroup: Sendable {
  84. // SwiftProtobuf.Message conformance is added in an extension below. See the
  85. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  86. // methods supported on all messages.
  87. var a: Int32 {
  88. get {_a ?? 0}
  89. set {_a = newValue}
  90. }
  91. /// Returns true if `a` has been explicitly set.
  92. var hasA: Bool {self._a != nil}
  93. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  94. mutating func clearA() {self._a = nil}
  95. var unknownFields = SwiftProtobuf.UnknownStorage()
  96. init() {}
  97. fileprivate var _a: Int32? = nil
  98. }
  99. struct SwiftProtoTesting_GroupUnextended: Sendable {
  100. // SwiftProtobuf.Message conformance is added in an extension below. See the
  101. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  102. // methods supported on all messages.
  103. var a: Int32 {
  104. get {_a ?? 0}
  105. set {_a = newValue}
  106. }
  107. /// Returns true if `a` has been explicitly set.
  108. var hasA: Bool {self._a != nil}
  109. /// Clears the value of `a`. Subsequent reads from it will return its default value.
  110. mutating func clearA() {self._a = nil}
  111. var unknownFields = SwiftProtobuf.UnknownStorage()
  112. init() {}
  113. fileprivate var _a: Int32? = nil
  114. }
  115. struct SwiftProtoTesting_NestingGroupsMessage: Sendable {
  116. // SwiftProtobuf.Message conformance is added in an extension below. See the
  117. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  118. // methods supported on all messages.
  119. var outerA: Int32 {
  120. get {_outerA ?? 0}
  121. set {_outerA = newValue}
  122. }
  123. /// Returns true if `outerA` has been explicitly set.
  124. var hasOuterA: Bool {self._outerA != nil}
  125. /// Clears the value of `outerA`. Subsequent reads from it will return its default value.
  126. mutating func clearOuterA() {self._outerA = nil}
  127. var subGroup1: SwiftProtoTesting_NestingGroupsMessage.SubGroup1 {
  128. get {_subGroup1 ?? SwiftProtoTesting_NestingGroupsMessage.SubGroup1()}
  129. set {_subGroup1 = newValue}
  130. }
  131. /// Returns true if `subGroup1` has been explicitly set.
  132. var hasSubGroup1: Bool {self._subGroup1 != nil}
  133. /// Clears the value of `subGroup1`. Subsequent reads from it will return its default value.
  134. mutating func clearSubGroup1() {self._subGroup1 = nil}
  135. var subGroup3: [SwiftProtoTesting_NestingGroupsMessage.SubGroup3] = []
  136. var unknownFields = SwiftProtobuf.UnknownStorage()
  137. struct SubGroup1: Sendable {
  138. // SwiftProtobuf.Message conformance is added in an extension below. See the
  139. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  140. // methods supported on all messages.
  141. var sub1A: Int32 {
  142. get {_sub1A ?? 0}
  143. set {_sub1A = newValue}
  144. }
  145. /// Returns true if `sub1A` has been explicitly set.
  146. var hasSub1A: Bool {self._sub1A != nil}
  147. /// Clears the value of `sub1A`. Subsequent reads from it will return its default value.
  148. mutating func clearSub1A() {self._sub1A = nil}
  149. var subGroup2: SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2 {
  150. get {_subGroup2 ?? SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2()}
  151. set {_subGroup2 = newValue}
  152. }
  153. /// Returns true if `subGroup2` has been explicitly set.
  154. var hasSubGroup2: Bool {self._subGroup2 != nil}
  155. /// Clears the value of `subGroup2`. Subsequent reads from it will return its default value.
  156. mutating func clearSubGroup2() {self._subGroup2 = nil}
  157. var unknownFields = SwiftProtobuf.UnknownStorage()
  158. struct SubGroup2: Sendable {
  159. // SwiftProtobuf.Message conformance is added in an extension below. See the
  160. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  161. // methods supported on all messages.
  162. var sub2A: Int32 {
  163. get {_sub2A ?? 0}
  164. set {_sub2A = newValue}
  165. }
  166. /// Returns true if `sub2A` has been explicitly set.
  167. var hasSub2A: Bool {self._sub2A != nil}
  168. /// Clears the value of `sub2A`. Subsequent reads from it will return its default value.
  169. mutating func clearSub2A() {self._sub2A = nil}
  170. var unknownFields = SwiftProtobuf.UnknownStorage()
  171. init() {}
  172. fileprivate var _sub2A: Int32? = nil
  173. }
  174. init() {}
  175. fileprivate var _sub1A: Int32? = nil
  176. fileprivate var _subGroup2: SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2? = nil
  177. }
  178. struct SubGroup3: Sendable {
  179. // SwiftProtobuf.Message conformance is added in an extension below. See the
  180. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  181. // methods supported on all messages.
  182. var sub3A: Int32 {
  183. get {_sub3A ?? 0}
  184. set {_sub3A = newValue}
  185. }
  186. /// Returns true if `sub3A` has been explicitly set.
  187. var hasSub3A: Bool {self._sub3A != nil}
  188. /// Clears the value of `sub3A`. Subsequent reads from it will return its default value.
  189. mutating func clearSub3A() {self._sub3A = nil}
  190. var subGroup4: [SwiftProtoTesting_NestingGroupsMessage.SubGroup3.SubGroup4] = []
  191. var unknownFields = SwiftProtobuf.UnknownStorage()
  192. struct SubGroup4: Sendable {
  193. // SwiftProtobuf.Message conformance is added in an extension below. See the
  194. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  195. // methods supported on all messages.
  196. var sub4A: Int32 {
  197. get {_sub4A ?? 0}
  198. set {_sub4A = newValue}
  199. }
  200. /// Returns true if `sub4A` has been explicitly set.
  201. var hasSub4A: Bool {self._sub4A != nil}
  202. /// Clears the value of `sub4A`. Subsequent reads from it will return its default value.
  203. mutating func clearSub4A() {self._sub4A = nil}
  204. var unknownFields = SwiftProtobuf.UnknownStorage()
  205. init() {}
  206. fileprivate var _sub4A: Int32? = nil
  207. }
  208. init() {}
  209. fileprivate var _sub3A: Int32? = nil
  210. }
  211. init() {}
  212. fileprivate var _outerA: Int32? = nil
  213. fileprivate var _subGroup1: SwiftProtoTesting_NestingGroupsMessage.SubGroup1? = nil
  214. }
  215. // MARK: - Extension support defined in unittest_swift_groups.proto.
  216. // MARK: - Extension Properties
  217. // Swift Extensions on the extended Messages to add easy access to the declared
  218. // extension fields. The names are based on the extension field name from the proto
  219. // declaration. To avoid naming collisions, the names are prefixed with the name of
  220. // the scope where the extend directive occurs.
  221. extension SwiftProtoTesting_GroupExtensions {
  222. var SwiftProtoTesting_extensionGroup: SwiftProtoTesting_ExtensionGroup {
  223. get {return getExtensionValue(ext: SwiftProtoTesting_Extensions_ExtensionGroup) ?? SwiftProtoTesting_ExtensionGroup()}
  224. set {setExtensionValue(ext: SwiftProtoTesting_Extensions_ExtensionGroup, value: newValue)}
  225. }
  226. /// Returns true if extension `SwiftProtoTesting_Extensions_ExtensionGroup`
  227. /// has been explicitly set.
  228. var hasSwiftProtoTesting_extensionGroup: Bool {
  229. return hasExtensionValue(ext: SwiftProtoTesting_Extensions_ExtensionGroup)
  230. }
  231. /// Clears the value of extension `SwiftProtoTesting_Extensions_ExtensionGroup`.
  232. /// Subsequent reads from it will return its default value.
  233. mutating func clearSwiftProtoTesting_extensionGroup() {
  234. clearExtensionValue(ext: SwiftProtoTesting_Extensions_ExtensionGroup)
  235. }
  236. var SwiftProtoTesting_repeatedExtensionGroup: [SwiftProtoTesting_RepeatedExtensionGroup] {
  237. get {return getExtensionValue(ext: SwiftProtoTesting_Extensions_RepeatedExtensionGroup) ?? []}
  238. set {setExtensionValue(ext: SwiftProtoTesting_Extensions_RepeatedExtensionGroup, value: newValue)}
  239. }
  240. }
  241. // MARK: - File's ExtensionMap: SwiftProtoTesting_UnittestSwiftGroups_Extensions
  242. /// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
  243. /// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
  244. /// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
  245. /// a larger `SwiftProtobuf.SimpleExtensionMap`.
  246. let SwiftProtoTesting_UnittestSwiftGroups_Extensions: SwiftProtobuf.SimpleExtensionMap = [
  247. SwiftProtoTesting_Extensions_ExtensionGroup,
  248. SwiftProtoTesting_Extensions_RepeatedExtensionGroup
  249. ]
  250. // Extension Objects - The only reason these might be needed is when manually
  251. // constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
  252. // accessors for the extension fields on the messages directly.
  253. let SwiftProtoTesting_Extensions_ExtensionGroup = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalGroupExtensionField<SwiftProtoTesting_ExtensionGroup>, SwiftProtoTesting_GroupExtensions>(
  254. _protobuf_fieldNumber: 2,
  255. fieldName: "swift_proto_testing.extensiongroup"
  256. )
  257. let SwiftProtoTesting_Extensions_RepeatedExtensionGroup = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedGroupExtensionField<SwiftProtoTesting_RepeatedExtensionGroup>, SwiftProtoTesting_GroupExtensions>(
  258. _protobuf_fieldNumber: 3,
  259. fieldName: "swift_proto_testing.repeatedextensiongroup"
  260. )
  261. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  262. fileprivate let _protobuf_package = "swift_proto_testing"
  263. extension SwiftProtoTesting_GroupExtensions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  264. static let protoMessageName: String = _protobuf_package + ".GroupExtensions"
  265. static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}a\0")
  266. public var isInitialized: Bool {
  267. if !_protobuf_extensionFieldValues.isInitialized {return false}
  268. return true
  269. }
  270. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  271. while let fieldNumber = try decoder.nextFieldNumber() {
  272. // The use of inline closures is to circumvent an issue where the compiler
  273. // allocates stack space for every case branch when no optimizations are
  274. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  275. switch fieldNumber {
  276. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  277. case 2..<11:
  278. try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: SwiftProtoTesting_GroupExtensions.self, fieldNumber: fieldNumber) }()
  279. default: break
  280. }
  281. }
  282. }
  283. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  284. // The use of inline closures is to circumvent an issue where the compiler
  285. // allocates stack space for every if/case branch local when no optimizations
  286. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  287. // https://github.com/apple/swift-protobuf/issues/1182
  288. try { if let v = self._a {
  289. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  290. } }()
  291. try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2, end: 11)
  292. try unknownFields.traverse(visitor: &visitor)
  293. }
  294. static func ==(lhs: SwiftProtoTesting_GroupExtensions, rhs: SwiftProtoTesting_GroupExtensions) -> Bool {
  295. if lhs._a != rhs._a {return false}
  296. if lhs.unknownFields != rhs.unknownFields {return false}
  297. if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
  298. return true
  299. }
  300. }
  301. extension SwiftProtoTesting_ExtensionGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  302. static let protoMessageName: String = _protobuf_package + ".ExtensionGroup"
  303. static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}a\0")
  304. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  305. while let fieldNumber = try decoder.nextFieldNumber() {
  306. // The use of inline closures is to circumvent an issue where the compiler
  307. // allocates stack space for every case branch when no optimizations are
  308. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  309. switch fieldNumber {
  310. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  311. default: break
  312. }
  313. }
  314. }
  315. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  316. // The use of inline closures is to circumvent an issue where the compiler
  317. // allocates stack space for every if/case branch local when no optimizations
  318. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  319. // https://github.com/apple/swift-protobuf/issues/1182
  320. try { if let v = self._a {
  321. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  322. } }()
  323. try unknownFields.traverse(visitor: &visitor)
  324. }
  325. static func ==(lhs: SwiftProtoTesting_ExtensionGroup, rhs: SwiftProtoTesting_ExtensionGroup) -> Bool {
  326. if lhs._a != rhs._a {return false}
  327. if lhs.unknownFields != rhs.unknownFields {return false}
  328. return true
  329. }
  330. }
  331. extension SwiftProtoTesting_RepeatedExtensionGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  332. static let protoMessageName: String = _protobuf_package + ".RepeatedExtensionGroup"
  333. static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}a\0")
  334. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  335. while let fieldNumber = try decoder.nextFieldNumber() {
  336. // The use of inline closures is to circumvent an issue where the compiler
  337. // allocates stack space for every case branch when no optimizations are
  338. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  339. switch fieldNumber {
  340. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  341. default: break
  342. }
  343. }
  344. }
  345. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  346. // The use of inline closures is to circumvent an issue where the compiler
  347. // allocates stack space for every if/case branch local when no optimizations
  348. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  349. // https://github.com/apple/swift-protobuf/issues/1182
  350. try { if let v = self._a {
  351. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  352. } }()
  353. try unknownFields.traverse(visitor: &visitor)
  354. }
  355. static func ==(lhs: SwiftProtoTesting_RepeatedExtensionGroup, rhs: SwiftProtoTesting_RepeatedExtensionGroup) -> Bool {
  356. if lhs._a != rhs._a {return false}
  357. if lhs.unknownFields != rhs.unknownFields {return false}
  358. return true
  359. }
  360. }
  361. extension SwiftProtoTesting_GroupUnextended: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  362. static let protoMessageName: String = _protobuf_package + ".GroupUnextended"
  363. static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}a\0")
  364. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  365. while let fieldNumber = try decoder.nextFieldNumber() {
  366. // The use of inline closures is to circumvent an issue where the compiler
  367. // allocates stack space for every case branch when no optimizations are
  368. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  369. switch fieldNumber {
  370. case 1: try { try decoder.decodeSingularInt32Field(value: &self._a) }()
  371. default: break
  372. }
  373. }
  374. }
  375. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  376. // The use of inline closures is to circumvent an issue where the compiler
  377. // allocates stack space for every if/case branch local when no optimizations
  378. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  379. // https://github.com/apple/swift-protobuf/issues/1182
  380. try { if let v = self._a {
  381. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  382. } }()
  383. try unknownFields.traverse(visitor: &visitor)
  384. }
  385. static func ==(lhs: SwiftProtoTesting_GroupUnextended, rhs: SwiftProtoTesting_GroupUnextended) -> Bool {
  386. if lhs._a != rhs._a {return false}
  387. if lhs.unknownFields != rhs.unknownFields {return false}
  388. return true
  389. }
  390. }
  391. extension SwiftProtoTesting_NestingGroupsMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  392. static let protoMessageName: String = _protobuf_package + ".NestingGroupsMessage"
  393. static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}outer_a\0\u{7}SubGroup1\0\u{7}SubGroup3\0")
  394. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  395. while let fieldNumber = try decoder.nextFieldNumber() {
  396. // The use of inline closures is to circumvent an issue where the compiler
  397. // allocates stack space for every case branch when no optimizations are
  398. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  399. switch fieldNumber {
  400. case 1: try { try decoder.decodeSingularInt32Field(value: &self._outerA) }()
  401. case 2: try { try decoder.decodeSingularGroupField(value: &self._subGroup1) }()
  402. case 3: try { try decoder.decodeRepeatedGroupField(value: &self.subGroup3) }()
  403. default: break
  404. }
  405. }
  406. }
  407. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  408. // The use of inline closures is to circumvent an issue where the compiler
  409. // allocates stack space for every if/case branch local when no optimizations
  410. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  411. // https://github.com/apple/swift-protobuf/issues/1182
  412. try { if let v = self._outerA {
  413. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  414. } }()
  415. try { if let v = self._subGroup1 {
  416. try visitor.visitSingularGroupField(value: v, fieldNumber: 2)
  417. } }()
  418. if !self.subGroup3.isEmpty {
  419. try visitor.visitRepeatedGroupField(value: self.subGroup3, fieldNumber: 3)
  420. }
  421. try unknownFields.traverse(visitor: &visitor)
  422. }
  423. static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage, rhs: SwiftProtoTesting_NestingGroupsMessage) -> Bool {
  424. if lhs._outerA != rhs._outerA {return false}
  425. if lhs._subGroup1 != rhs._subGroup1 {return false}
  426. if lhs.subGroup3 != rhs.subGroup3 {return false}
  427. if lhs.unknownFields != rhs.unknownFields {return false}
  428. return true
  429. }
  430. }
  431. extension SwiftProtoTesting_NestingGroupsMessage.SubGroup1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  432. static let protoMessageName: String = SwiftProtoTesting_NestingGroupsMessage.protoMessageName + ".SubGroup1"
  433. static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sub1_a\0\u{7}SubGroup2\0")
  434. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  435. while let fieldNumber = try decoder.nextFieldNumber() {
  436. // The use of inline closures is to circumvent an issue where the compiler
  437. // allocates stack space for every case branch when no optimizations are
  438. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  439. switch fieldNumber {
  440. case 1: try { try decoder.decodeSingularInt32Field(value: &self._sub1A) }()
  441. case 2: try { try decoder.decodeSingularGroupField(value: &self._subGroup2) }()
  442. default: break
  443. }
  444. }
  445. }
  446. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  447. // The use of inline closures is to circumvent an issue where the compiler
  448. // allocates stack space for every if/case branch local when no optimizations
  449. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  450. // https://github.com/apple/swift-protobuf/issues/1182
  451. try { if let v = self._sub1A {
  452. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  453. } }()
  454. try { if let v = self._subGroup2 {
  455. try visitor.visitSingularGroupField(value: v, fieldNumber: 2)
  456. } }()
  457. try unknownFields.traverse(visitor: &visitor)
  458. }
  459. static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup1, rhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup1) -> Bool {
  460. if lhs._sub1A != rhs._sub1A {return false}
  461. if lhs._subGroup2 != rhs._subGroup2 {return false}
  462. if lhs.unknownFields != rhs.unknownFields {return false}
  463. return true
  464. }
  465. }
  466. extension SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  467. static let protoMessageName: String = SwiftProtoTesting_NestingGroupsMessage.SubGroup1.protoMessageName + ".SubGroup2"
  468. static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sub2_a\0")
  469. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  470. while let fieldNumber = try decoder.nextFieldNumber() {
  471. // The use of inline closures is to circumvent an issue where the compiler
  472. // allocates stack space for every case branch when no optimizations are
  473. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  474. switch fieldNumber {
  475. case 1: try { try decoder.decodeSingularInt32Field(value: &self._sub2A) }()
  476. default: break
  477. }
  478. }
  479. }
  480. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  481. // The use of inline closures is to circumvent an issue where the compiler
  482. // allocates stack space for every if/case branch local when no optimizations
  483. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  484. // https://github.com/apple/swift-protobuf/issues/1182
  485. try { if let v = self._sub2A {
  486. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  487. } }()
  488. try unknownFields.traverse(visitor: &visitor)
  489. }
  490. static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2, rhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2) -> Bool {
  491. if lhs._sub2A != rhs._sub2A {return false}
  492. if lhs.unknownFields != rhs.unknownFields {return false}
  493. return true
  494. }
  495. }
  496. extension SwiftProtoTesting_NestingGroupsMessage.SubGroup3: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  497. static let protoMessageName: String = SwiftProtoTesting_NestingGroupsMessage.protoMessageName + ".SubGroup3"
  498. static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sub3_a\0\u{7}SubGroup4\0")
  499. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  500. while let fieldNumber = try decoder.nextFieldNumber() {
  501. // The use of inline closures is to circumvent an issue where the compiler
  502. // allocates stack space for every case branch when no optimizations are
  503. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  504. switch fieldNumber {
  505. case 1: try { try decoder.decodeSingularInt32Field(value: &self._sub3A) }()
  506. case 2: try { try decoder.decodeRepeatedGroupField(value: &self.subGroup4) }()
  507. default: break
  508. }
  509. }
  510. }
  511. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  512. // The use of inline closures is to circumvent an issue where the compiler
  513. // allocates stack space for every if/case branch local when no optimizations
  514. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  515. // https://github.com/apple/swift-protobuf/issues/1182
  516. try { if let v = self._sub3A {
  517. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  518. } }()
  519. if !self.subGroup4.isEmpty {
  520. try visitor.visitRepeatedGroupField(value: self.subGroup4, fieldNumber: 2)
  521. }
  522. try unknownFields.traverse(visitor: &visitor)
  523. }
  524. static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup3, rhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup3) -> Bool {
  525. if lhs._sub3A != rhs._sub3A {return false}
  526. if lhs.subGroup4 != rhs.subGroup4 {return false}
  527. if lhs.unknownFields != rhs.unknownFields {return false}
  528. return true
  529. }
  530. }
  531. extension SwiftProtoTesting_NestingGroupsMessage.SubGroup3.SubGroup4: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  532. static let protoMessageName: String = SwiftProtoTesting_NestingGroupsMessage.SubGroup3.protoMessageName + ".SubGroup4"
  533. static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sub4_a\0")
  534. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  535. while let fieldNumber = try decoder.nextFieldNumber() {
  536. // The use of inline closures is to circumvent an issue where the compiler
  537. // allocates stack space for every case branch when no optimizations are
  538. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  539. switch fieldNumber {
  540. case 1: try { try decoder.decodeSingularInt32Field(value: &self._sub4A) }()
  541. default: break
  542. }
  543. }
  544. }
  545. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  546. // The use of inline closures is to circumvent an issue where the compiler
  547. // allocates stack space for every if/case branch local when no optimizations
  548. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  549. // https://github.com/apple/swift-protobuf/issues/1182
  550. try { if let v = self._sub4A {
  551. try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
  552. } }()
  553. try unknownFields.traverse(visitor: &visitor)
  554. }
  555. static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup3.SubGroup4, rhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup3.SubGroup4) -> Bool {
  556. if lhs._sub4A != rhs._sub4A {return false}
  557. if lhs.unknownFields != rhs.unknownFields {return false}
  558. return true
  559. }
  560. }