| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951 |
- // DO NOT EDIT.
- // swift-format-ignore-file
- // swiftlint:disable all
- //
- // Generated by the Swift generator plugin for the protocol buffer compiler.
- // Source: google/protobuf/unittest_proto3_arena.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.
- //
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file or at
- // https://developers.google.com/open-source/licenses/bsd
- import Foundation
- import SwiftProtobuf
- // 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: SwiftProtobuf.ProtobufAPIVersionCheck {
- struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
- typealias Version = _2
- }
- enum Proto3ArenaUnittest_ForeignEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
- typealias RawValue = Int
- case foreignZero // = 0
- case foreignFoo // = 4
- case foreignBar // = 5
- case foreignBaz // = 6
- /// Large enough to escape the Boxed Integer cache.
- case foreignLarge // = 123456
- case UNRECOGNIZED(Int)
- init() {
- self = .foreignZero
- }
- init?(rawValue: Int) {
- switch rawValue {
- case 0: self = .foreignZero
- case 4: self = .foreignFoo
- case 5: self = .foreignBar
- case 6: self = .foreignBaz
- case 123456: self = .foreignLarge
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .foreignZero: return 0
- case .foreignFoo: return 4
- case .foreignBar: return 5
- case .foreignBaz: return 6
- case .foreignLarge: return 123456
- case .UNRECOGNIZED(let i): return i
- }
- }
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static let allCases: [Proto3ArenaUnittest_ForeignEnum] = [
- .foreignZero,
- .foreignFoo,
- .foreignBar,
- .foreignBaz,
- .foreignLarge,
- ]
- }
- /// This proto includes every type of field in both singular and repeated
- /// forms.
- struct Proto3ArenaUnittest_TestAllTypes: @unchecked 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.
- /// Singular
- var optionalInt32: Int32 {
- get {return _storage._optionalInt32}
- set {_uniqueStorage()._optionalInt32 = newValue}
- }
- var optionalInt64: Int64 {
- get {return _storage._optionalInt64}
- set {_uniqueStorage()._optionalInt64 = newValue}
- }
- var optionalUint32: UInt32 {
- get {return _storage._optionalUint32}
- set {_uniqueStorage()._optionalUint32 = newValue}
- }
- var optionalUint64: UInt64 {
- get {return _storage._optionalUint64}
- set {_uniqueStorage()._optionalUint64 = newValue}
- }
- var optionalSint32: Int32 {
- get {return _storage._optionalSint32}
- set {_uniqueStorage()._optionalSint32 = newValue}
- }
- var optionalSint64: Int64 {
- get {return _storage._optionalSint64}
- set {_uniqueStorage()._optionalSint64 = newValue}
- }
- var optionalFixed32: UInt32 {
- get {return _storage._optionalFixed32}
- set {_uniqueStorage()._optionalFixed32 = newValue}
- }
- var optionalFixed64: UInt64 {
- get {return _storage._optionalFixed64}
- set {_uniqueStorage()._optionalFixed64 = newValue}
- }
- var optionalSfixed32: Int32 {
- get {return _storage._optionalSfixed32}
- set {_uniqueStorage()._optionalSfixed32 = newValue}
- }
- var optionalSfixed64: Int64 {
- get {return _storage._optionalSfixed64}
- set {_uniqueStorage()._optionalSfixed64 = newValue}
- }
- var optionalFloat: Float {
- get {return _storage._optionalFloat}
- set {_uniqueStorage()._optionalFloat = newValue}
- }
- var optionalDouble: Double {
- get {return _storage._optionalDouble}
- set {_uniqueStorage()._optionalDouble = newValue}
- }
- var optionalBool: Bool {
- get {return _storage._optionalBool}
- set {_uniqueStorage()._optionalBool = newValue}
- }
- var optionalString: String {
- get {return _storage._optionalString}
- set {_uniqueStorage()._optionalString = newValue}
- }
- var optionalBytes: Data {
- get {return _storage._optionalBytes}
- set {_uniqueStorage()._optionalBytes = newValue}
- }
- var optionalNestedMessage: Proto3ArenaUnittest_TestAllTypes.NestedMessage {
- get {return _storage._optionalNestedMessage ?? Proto3ArenaUnittest_TestAllTypes.NestedMessage()}
- set {_uniqueStorage()._optionalNestedMessage = newValue}
- }
- /// Returns true if `optionalNestedMessage` has been explicitly set.
- var hasOptionalNestedMessage: Bool {return _storage._optionalNestedMessage != nil}
- /// Clears the value of `optionalNestedMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalNestedMessage() {_uniqueStorage()._optionalNestedMessage = nil}
- var optionalForeignMessage: Proto3ArenaUnittest_ForeignMessage {
- get {return _storage._optionalForeignMessage ?? Proto3ArenaUnittest_ForeignMessage()}
- set {_uniqueStorage()._optionalForeignMessage = newValue}
- }
- /// Returns true if `optionalForeignMessage` has been explicitly set.
- var hasOptionalForeignMessage: Bool {return _storage._optionalForeignMessage != nil}
- /// Clears the value of `optionalForeignMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalForeignMessage() {_uniqueStorage()._optionalForeignMessage = nil}
- var optionalImportMessage: Proto2UnittestImport_ImportMessage {
- get {return _storage._optionalImportMessage ?? Proto2UnittestImport_ImportMessage()}
- set {_uniqueStorage()._optionalImportMessage = newValue}
- }
- /// Returns true if `optionalImportMessage` has been explicitly set.
- var hasOptionalImportMessage: Bool {return _storage._optionalImportMessage != nil}
- /// Clears the value of `optionalImportMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalImportMessage() {_uniqueStorage()._optionalImportMessage = nil}
- var optionalNestedEnum: Proto3ArenaUnittest_TestAllTypes.NestedEnum {
- get {return _storage._optionalNestedEnum}
- set {_uniqueStorage()._optionalNestedEnum = newValue}
- }
- var optionalForeignEnum: Proto3ArenaUnittest_ForeignEnum {
- get {return _storage._optionalForeignEnum}
- set {_uniqueStorage()._optionalForeignEnum = newValue}
- }
- var optionalStringPiece: String {
- get {return _storage._optionalStringPiece}
- set {_uniqueStorage()._optionalStringPiece = newValue}
- }
- var optionalCord: String {
- get {return _storage._optionalCord}
- set {_uniqueStorage()._optionalCord = newValue}
- }
- var optionalBytesCord: Data {
- get {return _storage._optionalBytesCord}
- set {_uniqueStorage()._optionalBytesCord = newValue}
- }
- /// Defined in unittest_import_public.proto
- var optionalPublicImportMessage: Proto2UnittestImport_PublicImportMessage {
- get {return _storage._optionalPublicImportMessage ?? Proto2UnittestImport_PublicImportMessage()}
- set {_uniqueStorage()._optionalPublicImportMessage = newValue}
- }
- /// Returns true if `optionalPublicImportMessage` has been explicitly set.
- var hasOptionalPublicImportMessage: Bool {return _storage._optionalPublicImportMessage != nil}
- /// Clears the value of `optionalPublicImportMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalPublicImportMessage() {_uniqueStorage()._optionalPublicImportMessage = nil}
- var optionalLazyMessage: Proto3ArenaUnittest_TestAllTypes.NestedMessage {
- get {return _storage._optionalLazyMessage ?? Proto3ArenaUnittest_TestAllTypes.NestedMessage()}
- set {_uniqueStorage()._optionalLazyMessage = newValue}
- }
- /// Returns true if `optionalLazyMessage` has been explicitly set.
- var hasOptionalLazyMessage: Bool {return _storage._optionalLazyMessage != nil}
- /// Clears the value of `optionalLazyMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalLazyMessage() {_uniqueStorage()._optionalLazyMessage = nil}
- var optionalUnverifiedLazyMessage: Proto3ArenaUnittest_TestAllTypes.NestedMessage {
- get {return _storage._optionalUnverifiedLazyMessage ?? Proto3ArenaUnittest_TestAllTypes.NestedMessage()}
- set {_uniqueStorage()._optionalUnverifiedLazyMessage = newValue}
- }
- /// Returns true if `optionalUnverifiedLazyMessage` has been explicitly set.
- var hasOptionalUnverifiedLazyMessage: Bool {return _storage._optionalUnverifiedLazyMessage != nil}
- /// Clears the value of `optionalUnverifiedLazyMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalUnverifiedLazyMessage() {_uniqueStorage()._optionalUnverifiedLazyMessage = nil}
- var optionalLazyImportMessage: Proto2UnittestImport_ImportMessage {
- get {return _storage._optionalLazyImportMessage ?? Proto2UnittestImport_ImportMessage()}
- set {_uniqueStorage()._optionalLazyImportMessage = newValue}
- }
- /// Returns true if `optionalLazyImportMessage` has been explicitly set.
- var hasOptionalLazyImportMessage: Bool {return _storage._optionalLazyImportMessage != nil}
- /// Clears the value of `optionalLazyImportMessage`. Subsequent reads from it will return its default value.
- mutating func clearOptionalLazyImportMessage() {_uniqueStorage()._optionalLazyImportMessage = nil}
- /// Repeated
- var repeatedInt32: [Int32] {
- get {return _storage._repeatedInt32}
- set {_uniqueStorage()._repeatedInt32 = newValue}
- }
- var repeatedInt64: [Int64] {
- get {return _storage._repeatedInt64}
- set {_uniqueStorage()._repeatedInt64 = newValue}
- }
- var repeatedUint32: [UInt32] {
- get {return _storage._repeatedUint32}
- set {_uniqueStorage()._repeatedUint32 = newValue}
- }
- var repeatedUint64: [UInt64] {
- get {return _storage._repeatedUint64}
- set {_uniqueStorage()._repeatedUint64 = newValue}
- }
- var repeatedSint32: [Int32] {
- get {return _storage._repeatedSint32}
- set {_uniqueStorage()._repeatedSint32 = newValue}
- }
- var repeatedSint64: [Int64] {
- get {return _storage._repeatedSint64}
- set {_uniqueStorage()._repeatedSint64 = newValue}
- }
- var repeatedFixed32: [UInt32] {
- get {return _storage._repeatedFixed32}
- set {_uniqueStorage()._repeatedFixed32 = newValue}
- }
- var repeatedFixed64: [UInt64] {
- get {return _storage._repeatedFixed64}
- set {_uniqueStorage()._repeatedFixed64 = newValue}
- }
- var repeatedSfixed32: [Int32] {
- get {return _storage._repeatedSfixed32}
- set {_uniqueStorage()._repeatedSfixed32 = newValue}
- }
- var repeatedSfixed64: [Int64] {
- get {return _storage._repeatedSfixed64}
- set {_uniqueStorage()._repeatedSfixed64 = newValue}
- }
- var repeatedFloat: [Float] {
- get {return _storage._repeatedFloat}
- set {_uniqueStorage()._repeatedFloat = newValue}
- }
- var repeatedDouble: [Double] {
- get {return _storage._repeatedDouble}
- set {_uniqueStorage()._repeatedDouble = newValue}
- }
- var repeatedBool: [Bool] {
- get {return _storage._repeatedBool}
- set {_uniqueStorage()._repeatedBool = newValue}
- }
- var repeatedString: [String] {
- get {return _storage._repeatedString}
- set {_uniqueStorage()._repeatedString = newValue}
- }
- var repeatedBytes: [Data] {
- get {return _storage._repeatedBytes}
- set {_uniqueStorage()._repeatedBytes = newValue}
- }
- /// Optional
- var proto3OptionalInt32: Int32 {
- get {return _storage._proto3OptionalInt32 ?? 0}
- set {_uniqueStorage()._proto3OptionalInt32 = newValue}
- }
- /// Returns true if `proto3OptionalInt32` has been explicitly set.
- var hasProto3OptionalInt32: Bool {return _storage._proto3OptionalInt32 != nil}
- /// Clears the value of `proto3OptionalInt32`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalInt32() {_uniqueStorage()._proto3OptionalInt32 = nil}
- var proto3OptionalInt64: Int64 {
- get {return _storage._proto3OptionalInt64 ?? 0}
- set {_uniqueStorage()._proto3OptionalInt64 = newValue}
- }
- /// Returns true if `proto3OptionalInt64` has been explicitly set.
- var hasProto3OptionalInt64: Bool {return _storage._proto3OptionalInt64 != nil}
- /// Clears the value of `proto3OptionalInt64`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalInt64() {_uniqueStorage()._proto3OptionalInt64 = nil}
- var proto3OptionalUint32: UInt32 {
- get {return _storage._proto3OptionalUint32 ?? 0}
- set {_uniqueStorage()._proto3OptionalUint32 = newValue}
- }
- /// Returns true if `proto3OptionalUint32` has been explicitly set.
- var hasProto3OptionalUint32: Bool {return _storage._proto3OptionalUint32 != nil}
- /// Clears the value of `proto3OptionalUint32`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalUint32() {_uniqueStorage()._proto3OptionalUint32 = nil}
- var proto3OptionalUint64: UInt64 {
- get {return _storage._proto3OptionalUint64 ?? 0}
- set {_uniqueStorage()._proto3OptionalUint64 = newValue}
- }
- /// Returns true if `proto3OptionalUint64` has been explicitly set.
- var hasProto3OptionalUint64: Bool {return _storage._proto3OptionalUint64 != nil}
- /// Clears the value of `proto3OptionalUint64`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalUint64() {_uniqueStorage()._proto3OptionalUint64 = nil}
- var proto3OptionalSint32: Int32 {
- get {return _storage._proto3OptionalSint32 ?? 0}
- set {_uniqueStorage()._proto3OptionalSint32 = newValue}
- }
- /// Returns true if `proto3OptionalSint32` has been explicitly set.
- var hasProto3OptionalSint32: Bool {return _storage._proto3OptionalSint32 != nil}
- /// Clears the value of `proto3OptionalSint32`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalSint32() {_uniqueStorage()._proto3OptionalSint32 = nil}
- var proto3OptionalSint64: Int64 {
- get {return _storage._proto3OptionalSint64 ?? 0}
- set {_uniqueStorage()._proto3OptionalSint64 = newValue}
- }
- /// Returns true if `proto3OptionalSint64` has been explicitly set.
- var hasProto3OptionalSint64: Bool {return _storage._proto3OptionalSint64 != nil}
- /// Clears the value of `proto3OptionalSint64`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalSint64() {_uniqueStorage()._proto3OptionalSint64 = nil}
- var proto3OptionalFixed32: UInt32 {
- get {return _storage._proto3OptionalFixed32 ?? 0}
- set {_uniqueStorage()._proto3OptionalFixed32 = newValue}
- }
- /// Returns true if `proto3OptionalFixed32` has been explicitly set.
- var hasProto3OptionalFixed32: Bool {return _storage._proto3OptionalFixed32 != nil}
- /// Clears the value of `proto3OptionalFixed32`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalFixed32() {_uniqueStorage()._proto3OptionalFixed32 = nil}
- var proto3OptionalFixed64: UInt64 {
- get {return _storage._proto3OptionalFixed64 ?? 0}
- set {_uniqueStorage()._proto3OptionalFixed64 = newValue}
- }
- /// Returns true if `proto3OptionalFixed64` has been explicitly set.
- var hasProto3OptionalFixed64: Bool {return _storage._proto3OptionalFixed64 != nil}
- /// Clears the value of `proto3OptionalFixed64`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalFixed64() {_uniqueStorage()._proto3OptionalFixed64 = nil}
- var proto3OptionalSfixed32: Int32 {
- get {return _storage._proto3OptionalSfixed32 ?? 0}
- set {_uniqueStorage()._proto3OptionalSfixed32 = newValue}
- }
- /// Returns true if `proto3OptionalSfixed32` has been explicitly set.
- var hasProto3OptionalSfixed32: Bool {return _storage._proto3OptionalSfixed32 != nil}
- /// Clears the value of `proto3OptionalSfixed32`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalSfixed32() {_uniqueStorage()._proto3OptionalSfixed32 = nil}
- var proto3OptionalSfixed64: Int64 {
- get {return _storage._proto3OptionalSfixed64 ?? 0}
- set {_uniqueStorage()._proto3OptionalSfixed64 = newValue}
- }
- /// Returns true if `proto3OptionalSfixed64` has been explicitly set.
- var hasProto3OptionalSfixed64: Bool {return _storage._proto3OptionalSfixed64 != nil}
- /// Clears the value of `proto3OptionalSfixed64`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalSfixed64() {_uniqueStorage()._proto3OptionalSfixed64 = nil}
- var proto3OptionalFloat: Float {
- get {return _storage._proto3OptionalFloat ?? 0}
- set {_uniqueStorage()._proto3OptionalFloat = newValue}
- }
- /// Returns true if `proto3OptionalFloat` has been explicitly set.
- var hasProto3OptionalFloat: Bool {return _storage._proto3OptionalFloat != nil}
- /// Clears the value of `proto3OptionalFloat`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalFloat() {_uniqueStorage()._proto3OptionalFloat = nil}
- var proto3OptionalDouble: Double {
- get {return _storage._proto3OptionalDouble ?? 0}
- set {_uniqueStorage()._proto3OptionalDouble = newValue}
- }
- /// Returns true if `proto3OptionalDouble` has been explicitly set.
- var hasProto3OptionalDouble: Bool {return _storage._proto3OptionalDouble != nil}
- /// Clears the value of `proto3OptionalDouble`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalDouble() {_uniqueStorage()._proto3OptionalDouble = nil}
- var proto3OptionalBool: Bool {
- get {return _storage._proto3OptionalBool ?? false}
- set {_uniqueStorage()._proto3OptionalBool = newValue}
- }
- /// Returns true if `proto3OptionalBool` has been explicitly set.
- var hasProto3OptionalBool: Bool {return _storage._proto3OptionalBool != nil}
- /// Clears the value of `proto3OptionalBool`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalBool() {_uniqueStorage()._proto3OptionalBool = nil}
- var proto3OptionalString: String {
- get {return _storage._proto3OptionalString ?? String()}
- set {_uniqueStorage()._proto3OptionalString = newValue}
- }
- /// Returns true if `proto3OptionalString` has been explicitly set.
- var hasProto3OptionalString: Bool {return _storage._proto3OptionalString != nil}
- /// Clears the value of `proto3OptionalString`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalString() {_uniqueStorage()._proto3OptionalString = nil}
- var proto3OptionalBytes: Data {
- get {return _storage._proto3OptionalBytes ?? Data()}
- set {_uniqueStorage()._proto3OptionalBytes = newValue}
- }
- /// Returns true if `proto3OptionalBytes` has been explicitly set.
- var hasProto3OptionalBytes: Bool {return _storage._proto3OptionalBytes != nil}
- /// Clears the value of `proto3OptionalBytes`. Subsequent reads from it will return its default value.
- mutating func clearProto3OptionalBytes() {_uniqueStorage()._proto3OptionalBytes = nil}
- var repeatedNestedMessage: [Proto3ArenaUnittest_TestAllTypes.NestedMessage] {
- get {return _storage._repeatedNestedMessage}
- set {_uniqueStorage()._repeatedNestedMessage = newValue}
- }
- var repeatedForeignMessage: [Proto3ArenaUnittest_ForeignMessage] {
- get {return _storage._repeatedForeignMessage}
- set {_uniqueStorage()._repeatedForeignMessage = newValue}
- }
- var repeatedImportMessage: [Proto2UnittestImport_ImportMessage] {
- get {return _storage._repeatedImportMessage}
- set {_uniqueStorage()._repeatedImportMessage = newValue}
- }
- var repeatedNestedEnum: [Proto3ArenaUnittest_TestAllTypes.NestedEnum] {
- get {return _storage._repeatedNestedEnum}
- set {_uniqueStorage()._repeatedNestedEnum = newValue}
- }
- var repeatedForeignEnum: [Proto3ArenaUnittest_ForeignEnum] {
- get {return _storage._repeatedForeignEnum}
- set {_uniqueStorage()._repeatedForeignEnum = newValue}
- }
- var repeatedStringPiece: [String] {
- get {return _storage._repeatedStringPiece}
- set {_uniqueStorage()._repeatedStringPiece = newValue}
- }
- var repeatedCord: [String] {
- get {return _storage._repeatedCord}
- set {_uniqueStorage()._repeatedCord = newValue}
- }
- var repeatedLazyMessage: [Proto3ArenaUnittest_TestAllTypes.NestedMessage] {
- get {return _storage._repeatedLazyMessage}
- set {_uniqueStorage()._repeatedLazyMessage = newValue}
- }
- var oneofField: OneOf_OneofField? {
- get {return _storage._oneofField}
- set {_uniqueStorage()._oneofField = newValue}
- }
- var oneofUint32: UInt32 {
- get {
- if case .oneofUint32(let v)? = _storage._oneofField {return v}
- return 0
- }
- set {_uniqueStorage()._oneofField = .oneofUint32(newValue)}
- }
- var oneofNestedMessage: Proto3ArenaUnittest_TestAllTypes.NestedMessage {
- get {
- if case .oneofNestedMessage(let v)? = _storage._oneofField {return v}
- return Proto3ArenaUnittest_TestAllTypes.NestedMessage()
- }
- set {_uniqueStorage()._oneofField = .oneofNestedMessage(newValue)}
- }
- var oneofString: String {
- get {
- if case .oneofString(let v)? = _storage._oneofField {return v}
- return String()
- }
- set {_uniqueStorage()._oneofField = .oneofString(newValue)}
- }
- var oneofBytes: Data {
- get {
- if case .oneofBytes(let v)? = _storage._oneofField {return v}
- return Data()
- }
- set {_uniqueStorage()._oneofField = .oneofBytes(newValue)}
- }
- var unknownFields = SwiftProtobuf.UnknownStorage()
- enum OneOf_OneofField: Equatable, @unchecked Sendable {
- case oneofUint32(UInt32)
- case oneofNestedMessage(Proto3ArenaUnittest_TestAllTypes.NestedMessage)
- case oneofString(String)
- case oneofBytes(Data)
- }
- enum NestedEnum: SwiftProtobuf.Enum, Swift.CaseIterable {
- typealias RawValue = Int
- case zero // = 0
- case foo // = 1
- case bar // = 2
- case baz // = 3
- /// Intentionally negative.
- case neg // = -1
- case UNRECOGNIZED(Int)
- init() {
- self = .zero
- }
- init?(rawValue: Int) {
- switch rawValue {
- case -1: self = .neg
- case 0: self = .zero
- case 1: self = .foo
- case 2: self = .bar
- case 3: self = .baz
- default: self = .UNRECOGNIZED(rawValue)
- }
- }
- var rawValue: Int {
- switch self {
- case .neg: return -1
- case .zero: return 0
- case .foo: return 1
- case .bar: return 2
- case .baz: return 3
- case .UNRECOGNIZED(let i): return i
- }
- }
- // The compiler won't synthesize support with the UNRECOGNIZED case.
- static let allCases: [Proto3ArenaUnittest_TestAllTypes.NestedEnum] = [
- .zero,
- .foo,
- .bar,
- .baz,
- .neg,
- ]
- }
- struct NestedMessage: 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 name "b" fails to compile in proto1 because it conflicts with
- /// a local variable named "b" in one of the generated methods. Doh.
- /// This file needs to compile in proto1 to test backwards-compatibility.
- var bb: Int32 = 0
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- struct Proto3ArenaUnittest_TestPackedTypes: 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.
- var packedInt32: [Int32] = []
- var packedInt64: [Int64] = []
- var packedUint32: [UInt32] = []
- var packedUint64: [UInt64] = []
- var packedSint32: [Int32] = []
- var packedSint64: [Int64] = []
- var packedFixed32: [UInt32] = []
- var packedFixed64: [UInt64] = []
- var packedSfixed32: [Int32] = []
- var packedSfixed64: [Int64] = []
- var packedFloat: [Float] = []
- var packedDouble: [Double] = []
- var packedBool: [Bool] = []
- var packedEnum: [Proto3ArenaUnittest_ForeignEnum] = []
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- /// Explicitly set packed to false
- struct Proto3ArenaUnittest_TestUnpackedTypes: 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.
- var repeatedInt32: [Int32] = []
- var repeatedInt64: [Int64] = []
- var repeatedUint32: [UInt32] = []
- var repeatedUint64: [UInt64] = []
- var repeatedSint32: [Int32] = []
- var repeatedSint64: [Int64] = []
- var repeatedFixed32: [UInt32] = []
- var repeatedFixed64: [UInt64] = []
- var repeatedSfixed32: [Int32] = []
- var repeatedSfixed64: [Int64] = []
- var repeatedFloat: [Float] = []
- var repeatedDouble: [Double] = []
- var repeatedBool: [Bool] = []
- var repeatedNestedEnum: [Proto3ArenaUnittest_TestAllTypes.NestedEnum] = []
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- /// This proto includes a recursively nested message.
- struct Proto3ArenaUnittest_NestedTestAllTypes: @unchecked 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.
- var child: Proto3ArenaUnittest_NestedTestAllTypes {
- get {return _storage._child ?? Proto3ArenaUnittest_NestedTestAllTypes()}
- set {_uniqueStorage()._child = newValue}
- }
- /// Returns true if `child` has been explicitly set.
- var hasChild: Bool {return _storage._child != nil}
- /// Clears the value of `child`. Subsequent reads from it will return its default value.
- mutating func clearChild() {_uniqueStorage()._child = nil}
- var payload: Proto3ArenaUnittest_TestAllTypes {
- get {return _storage._payload ?? Proto3ArenaUnittest_TestAllTypes()}
- set {_uniqueStorage()._payload = newValue}
- }
- /// Returns true if `payload` has been explicitly set.
- var hasPayload: Bool {return _storage._payload != nil}
- /// Clears the value of `payload`. Subsequent reads from it will return its default value.
- mutating func clearPayload() {_uniqueStorage()._payload = nil}
- var repeatedChild: [Proto3ArenaUnittest_NestedTestAllTypes] {
- get {return _storage._repeatedChild}
- set {_uniqueStorage()._repeatedChild = newValue}
- }
- var lazyPayload: Proto3ArenaUnittest_TestAllTypes {
- get {return _storage._lazyPayload ?? Proto3ArenaUnittest_TestAllTypes()}
- set {_uniqueStorage()._lazyPayload = newValue}
- }
- /// Returns true if `lazyPayload` has been explicitly set.
- var hasLazyPayload: Bool {return _storage._lazyPayload != nil}
- /// Clears the value of `lazyPayload`. Subsequent reads from it will return its default value.
- mutating func clearLazyPayload() {_uniqueStorage()._lazyPayload = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _storage = _StorageClass.defaultInstance
- }
- /// Define these after TestAllTypes to make sure the compiler can handle
- /// that.
- struct Proto3ArenaUnittest_ForeignMessage: 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.
- var c: Int32 = 0
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- /// TestEmptyMessage is used to test behavior of unknown fields.
- struct Proto3ArenaUnittest_TestEmptyMessage: 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.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- /// Needed for a Python test.
- struct Proto3ArenaUnittest_TestPickleNestedMessage: 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.
- var unknownFields = SwiftProtobuf.UnknownStorage()
- struct NestedMessage: 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.
- var bb: Int32 = 0
- var unknownFields = SwiftProtobuf.UnknownStorage()
- struct NestedNestedMessage: 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.
- var cc: Int32 = 0
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- }
- init() {}
- }
- init() {}
- }
- // MARK: - Code below here is support for the SwiftProtobuf runtime.
- fileprivate let _protobuf_package = "proto3_arena_unittest"
- extension Proto3ArenaUnittest_ForeignEnum: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 0: .same(proto: "FOREIGN_ZERO"),
- 4: .same(proto: "FOREIGN_FOO"),
- 5: .same(proto: "FOREIGN_BAR"),
- 6: .same(proto: "FOREIGN_BAZ"),
- 123456: .same(proto: "FOREIGN_LARGE"),
- ]
- }
- extension Proto3ArenaUnittest_TestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestAllTypes"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "optional_int32"),
- 2: .standard(proto: "optional_int64"),
- 3: .standard(proto: "optional_uint32"),
- 4: .standard(proto: "optional_uint64"),
- 5: .standard(proto: "optional_sint32"),
- 6: .standard(proto: "optional_sint64"),
- 7: .standard(proto: "optional_fixed32"),
- 8: .standard(proto: "optional_fixed64"),
- 9: .standard(proto: "optional_sfixed32"),
- 10: .standard(proto: "optional_sfixed64"),
- 11: .standard(proto: "optional_float"),
- 12: .standard(proto: "optional_double"),
- 13: .standard(proto: "optional_bool"),
- 14: .standard(proto: "optional_string"),
- 15: .standard(proto: "optional_bytes"),
- 18: .standard(proto: "optional_nested_message"),
- 19: .standard(proto: "optional_foreign_message"),
- 20: .standard(proto: "optional_import_message"),
- 21: .standard(proto: "optional_nested_enum"),
- 22: .standard(proto: "optional_foreign_enum"),
- 24: .standard(proto: "optional_string_piece"),
- 25: .standard(proto: "optional_cord"),
- 86: .standard(proto: "optional_bytes_cord"),
- 26: .standard(proto: "optional_public_import_message"),
- 27: .standard(proto: "optional_lazy_message"),
- 28: .standard(proto: "optional_unverified_lazy_message"),
- 115: .standard(proto: "optional_lazy_import_message"),
- 31: .standard(proto: "repeated_int32"),
- 32: .standard(proto: "repeated_int64"),
- 33: .standard(proto: "repeated_uint32"),
- 34: .standard(proto: "repeated_uint64"),
- 35: .standard(proto: "repeated_sint32"),
- 36: .standard(proto: "repeated_sint64"),
- 37: .standard(proto: "repeated_fixed32"),
- 38: .standard(proto: "repeated_fixed64"),
- 39: .standard(proto: "repeated_sfixed32"),
- 40: .standard(proto: "repeated_sfixed64"),
- 41: .standard(proto: "repeated_float"),
- 42: .standard(proto: "repeated_double"),
- 43: .standard(proto: "repeated_bool"),
- 44: .standard(proto: "repeated_string"),
- 45: .standard(proto: "repeated_bytes"),
- 116: .standard(proto: "proto3_optional_int32"),
- 117: .standard(proto: "proto3_optional_int64"),
- 118: .standard(proto: "proto3_optional_uint32"),
- 119: .standard(proto: "proto3_optional_uint64"),
- 120: .standard(proto: "proto3_optional_sint32"),
- 121: .standard(proto: "proto3_optional_sint64"),
- 122: .standard(proto: "proto3_optional_fixed32"),
- 123: .standard(proto: "proto3_optional_fixed64"),
- 124: .standard(proto: "proto3_optional_sfixed32"),
- 125: .standard(proto: "proto3_optional_sfixed64"),
- 126: .standard(proto: "proto3_optional_float"),
- 127: .standard(proto: "proto3_optional_double"),
- 128: .standard(proto: "proto3_optional_bool"),
- 129: .standard(proto: "proto3_optional_string"),
- 130: .standard(proto: "proto3_optional_bytes"),
- 48: .standard(proto: "repeated_nested_message"),
- 49: .standard(proto: "repeated_foreign_message"),
- 50: .standard(proto: "repeated_import_message"),
- 51: .standard(proto: "repeated_nested_enum"),
- 52: .standard(proto: "repeated_foreign_enum"),
- 54: .standard(proto: "repeated_string_piece"),
- 55: .standard(proto: "repeated_cord"),
- 57: .standard(proto: "repeated_lazy_message"),
- 111: .standard(proto: "oneof_uint32"),
- 112: .standard(proto: "oneof_nested_message"),
- 113: .standard(proto: "oneof_string"),
- 114: .standard(proto: "oneof_bytes"),
- ]
- fileprivate class _StorageClass {
- var _optionalInt32: Int32 = 0
- var _optionalInt64: Int64 = 0
- var _optionalUint32: UInt32 = 0
- var _optionalUint64: UInt64 = 0
- var _optionalSint32: Int32 = 0
- var _optionalSint64: Int64 = 0
- var _optionalFixed32: UInt32 = 0
- var _optionalFixed64: UInt64 = 0
- var _optionalSfixed32: Int32 = 0
- var _optionalSfixed64: Int64 = 0
- var _optionalFloat: Float = 0
- var _optionalDouble: Double = 0
- var _optionalBool: Bool = false
- var _optionalString: String = String()
- var _optionalBytes: Data = Data()
- var _optionalNestedMessage: Proto3ArenaUnittest_TestAllTypes.NestedMessage? = nil
- var _optionalForeignMessage: Proto3ArenaUnittest_ForeignMessage? = nil
- var _optionalImportMessage: Proto2UnittestImport_ImportMessage? = nil
- var _optionalNestedEnum: Proto3ArenaUnittest_TestAllTypes.NestedEnum = .zero
- var _optionalForeignEnum: Proto3ArenaUnittest_ForeignEnum = .foreignZero
- var _optionalStringPiece: String = String()
- var _optionalCord: String = String()
- var _optionalBytesCord: Data = Data()
- var _optionalPublicImportMessage: Proto2UnittestImport_PublicImportMessage? = nil
- var _optionalLazyMessage: Proto3ArenaUnittest_TestAllTypes.NestedMessage? = nil
- var _optionalUnverifiedLazyMessage: Proto3ArenaUnittest_TestAllTypes.NestedMessage? = nil
- var _optionalLazyImportMessage: Proto2UnittestImport_ImportMessage? = nil
- var _repeatedInt32: [Int32] = []
- var _repeatedInt64: [Int64] = []
- var _repeatedUint32: [UInt32] = []
- var _repeatedUint64: [UInt64] = []
- var _repeatedSint32: [Int32] = []
- var _repeatedSint64: [Int64] = []
- var _repeatedFixed32: [UInt32] = []
- var _repeatedFixed64: [UInt64] = []
- var _repeatedSfixed32: [Int32] = []
- var _repeatedSfixed64: [Int64] = []
- var _repeatedFloat: [Float] = []
- var _repeatedDouble: [Double] = []
- var _repeatedBool: [Bool] = []
- var _repeatedString: [String] = []
- var _repeatedBytes: [Data] = []
- var _proto3OptionalInt32: Int32? = nil
- var _proto3OptionalInt64: Int64? = nil
- var _proto3OptionalUint32: UInt32? = nil
- var _proto3OptionalUint64: UInt64? = nil
- var _proto3OptionalSint32: Int32? = nil
- var _proto3OptionalSint64: Int64? = nil
- var _proto3OptionalFixed32: UInt32? = nil
- var _proto3OptionalFixed64: UInt64? = nil
- var _proto3OptionalSfixed32: Int32? = nil
- var _proto3OptionalSfixed64: Int64? = nil
- var _proto3OptionalFloat: Float? = nil
- var _proto3OptionalDouble: Double? = nil
- var _proto3OptionalBool: Bool? = nil
- var _proto3OptionalString: String? = nil
- var _proto3OptionalBytes: Data? = nil
- var _repeatedNestedMessage: [Proto3ArenaUnittest_TestAllTypes.NestedMessage] = []
- var _repeatedForeignMessage: [Proto3ArenaUnittest_ForeignMessage] = []
- var _repeatedImportMessage: [Proto2UnittestImport_ImportMessage] = []
- var _repeatedNestedEnum: [Proto3ArenaUnittest_TestAllTypes.NestedEnum] = []
- var _repeatedForeignEnum: [Proto3ArenaUnittest_ForeignEnum] = []
- var _repeatedStringPiece: [String] = []
- var _repeatedCord: [String] = []
- var _repeatedLazyMessage: [Proto3ArenaUnittest_TestAllTypes.NestedMessage] = []
- var _oneofField: Proto3ArenaUnittest_TestAllTypes.OneOf_OneofField?
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _optionalInt32 = source._optionalInt32
- _optionalInt64 = source._optionalInt64
- _optionalUint32 = source._optionalUint32
- _optionalUint64 = source._optionalUint64
- _optionalSint32 = source._optionalSint32
- _optionalSint64 = source._optionalSint64
- _optionalFixed32 = source._optionalFixed32
- _optionalFixed64 = source._optionalFixed64
- _optionalSfixed32 = source._optionalSfixed32
- _optionalSfixed64 = source._optionalSfixed64
- _optionalFloat = source._optionalFloat
- _optionalDouble = source._optionalDouble
- _optionalBool = source._optionalBool
- _optionalString = source._optionalString
- _optionalBytes = source._optionalBytes
- _optionalNestedMessage = source._optionalNestedMessage
- _optionalForeignMessage = source._optionalForeignMessage
- _optionalImportMessage = source._optionalImportMessage
- _optionalNestedEnum = source._optionalNestedEnum
- _optionalForeignEnum = source._optionalForeignEnum
- _optionalStringPiece = source._optionalStringPiece
- _optionalCord = source._optionalCord
- _optionalBytesCord = source._optionalBytesCord
- _optionalPublicImportMessage = source._optionalPublicImportMessage
- _optionalLazyMessage = source._optionalLazyMessage
- _optionalUnverifiedLazyMessage = source._optionalUnverifiedLazyMessage
- _optionalLazyImportMessage = source._optionalLazyImportMessage
- _repeatedInt32 = source._repeatedInt32
- _repeatedInt64 = source._repeatedInt64
- _repeatedUint32 = source._repeatedUint32
- _repeatedUint64 = source._repeatedUint64
- _repeatedSint32 = source._repeatedSint32
- _repeatedSint64 = source._repeatedSint64
- _repeatedFixed32 = source._repeatedFixed32
- _repeatedFixed64 = source._repeatedFixed64
- _repeatedSfixed32 = source._repeatedSfixed32
- _repeatedSfixed64 = source._repeatedSfixed64
- _repeatedFloat = source._repeatedFloat
- _repeatedDouble = source._repeatedDouble
- _repeatedBool = source._repeatedBool
- _repeatedString = source._repeatedString
- _repeatedBytes = source._repeatedBytes
- _proto3OptionalInt32 = source._proto3OptionalInt32
- _proto3OptionalInt64 = source._proto3OptionalInt64
- _proto3OptionalUint32 = source._proto3OptionalUint32
- _proto3OptionalUint64 = source._proto3OptionalUint64
- _proto3OptionalSint32 = source._proto3OptionalSint32
- _proto3OptionalSint64 = source._proto3OptionalSint64
- _proto3OptionalFixed32 = source._proto3OptionalFixed32
- _proto3OptionalFixed64 = source._proto3OptionalFixed64
- _proto3OptionalSfixed32 = source._proto3OptionalSfixed32
- _proto3OptionalSfixed64 = source._proto3OptionalSfixed64
- _proto3OptionalFloat = source._proto3OptionalFloat
- _proto3OptionalDouble = source._proto3OptionalDouble
- _proto3OptionalBool = source._proto3OptionalBool
- _proto3OptionalString = source._proto3OptionalString
- _proto3OptionalBytes = source._proto3OptionalBytes
- _repeatedNestedMessage = source._repeatedNestedMessage
- _repeatedForeignMessage = source._repeatedForeignMessage
- _repeatedImportMessage = source._repeatedImportMessage
- _repeatedNestedEnum = source._repeatedNestedEnum
- _repeatedForeignEnum = source._repeatedForeignEnum
- _repeatedStringPiece = source._repeatedStringPiece
- _repeatedCord = source._repeatedCord
- _repeatedLazyMessage = source._repeatedLazyMessage
- _oneofField = source._oneofField
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- 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.decodeSingularInt32Field(value: &_storage._optionalInt32) }()
- case 2: try { try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64) }()
- case 3: try { try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32) }()
- case 4: try { try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64) }()
- case 5: try { try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32) }()
- case 6: try { try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64) }()
- case 7: try { try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32) }()
- case 8: try { try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64) }()
- case 9: try { try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32) }()
- case 10: try { try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64) }()
- case 11: try { try decoder.decodeSingularFloatField(value: &_storage._optionalFloat) }()
- case 12: try { try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble) }()
- case 13: try { try decoder.decodeSingularBoolField(value: &_storage._optionalBool) }()
- case 14: try { try decoder.decodeSingularStringField(value: &_storage._optionalString) }()
- case 15: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytes) }()
- case 18: try { try decoder.decodeSingularMessageField(value: &_storage._optionalNestedMessage) }()
- case 19: try { try decoder.decodeSingularMessageField(value: &_storage._optionalForeignMessage) }()
- case 20: try { try decoder.decodeSingularMessageField(value: &_storage._optionalImportMessage) }()
- case 21: try { try decoder.decodeSingularEnumField(value: &_storage._optionalNestedEnum) }()
- case 22: try { try decoder.decodeSingularEnumField(value: &_storage._optionalForeignEnum) }()
- case 24: try { try decoder.decodeSingularStringField(value: &_storage._optionalStringPiece) }()
- case 25: try { try decoder.decodeSingularStringField(value: &_storage._optionalCord) }()
- case 26: try { try decoder.decodeSingularMessageField(value: &_storage._optionalPublicImportMessage) }()
- case 27: try { try decoder.decodeSingularMessageField(value: &_storage._optionalLazyMessage) }()
- case 28: try { try decoder.decodeSingularMessageField(value: &_storage._optionalUnverifiedLazyMessage) }()
- case 31: try { try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32) }()
- case 32: try { try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64) }()
- case 33: try { try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32) }()
- case 34: try { try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64) }()
- case 35: try { try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32) }()
- case 36: try { try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64) }()
- case 37: try { try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32) }()
- case 38: try { try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64) }()
- case 39: try { try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32) }()
- case 40: try { try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64) }()
- case 41: try { try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat) }()
- case 42: try { try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble) }()
- case 43: try { try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool) }()
- case 44: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedString) }()
- case 45: try { try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes) }()
- case 48: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedNestedMessage) }()
- case 49: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedForeignMessage) }()
- case 50: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedImportMessage) }()
- case 51: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedNestedEnum) }()
- case 52: try { try decoder.decodeRepeatedEnumField(value: &_storage._repeatedForeignEnum) }()
- case 54: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedStringPiece) }()
- case 55: try { try decoder.decodeRepeatedStringField(value: &_storage._repeatedCord) }()
- case 57: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedLazyMessage) }()
- case 86: try { try decoder.decodeSingularBytesField(value: &_storage._optionalBytesCord) }()
- case 111: try {
- var v: UInt32?
- try decoder.decodeSingularUInt32Field(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofUint32(v)
- }
- }()
- case 112: try {
- var v: Proto3ArenaUnittest_TestAllTypes.NestedMessage?
- var hadOneofValue = false
- if let current = _storage._oneofField {
- hadOneofValue = true
- if case .oneofNestedMessage(let m) = current {v = m}
- }
- try decoder.decodeSingularMessageField(value: &v)
- if let v = v {
- if hadOneofValue {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofNestedMessage(v)
- }
- }()
- case 113: try {
- var v: String?
- try decoder.decodeSingularStringField(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofString(v)
- }
- }()
- case 114: try {
- var v: Data?
- try decoder.decodeSingularBytesField(value: &v)
- if let v = v {
- if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
- _storage._oneofField = .oneofBytes(v)
- }
- }()
- case 115: try { try decoder.decodeSingularMessageField(value: &_storage._optionalLazyImportMessage) }()
- case 116: try { try decoder.decodeSingularInt32Field(value: &_storage._proto3OptionalInt32) }()
- case 117: try { try decoder.decodeSingularInt64Field(value: &_storage._proto3OptionalInt64) }()
- case 118: try { try decoder.decodeSingularUInt32Field(value: &_storage._proto3OptionalUint32) }()
- case 119: try { try decoder.decodeSingularUInt64Field(value: &_storage._proto3OptionalUint64) }()
- case 120: try { try decoder.decodeSingularSInt32Field(value: &_storage._proto3OptionalSint32) }()
- case 121: try { try decoder.decodeSingularSInt64Field(value: &_storage._proto3OptionalSint64) }()
- case 122: try { try decoder.decodeSingularFixed32Field(value: &_storage._proto3OptionalFixed32) }()
- case 123: try { try decoder.decodeSingularFixed64Field(value: &_storage._proto3OptionalFixed64) }()
- case 124: try { try decoder.decodeSingularSFixed32Field(value: &_storage._proto3OptionalSfixed32) }()
- case 125: try { try decoder.decodeSingularSFixed64Field(value: &_storage._proto3OptionalSfixed64) }()
- case 126: try { try decoder.decodeSingularFloatField(value: &_storage._proto3OptionalFloat) }()
- case 127: try { try decoder.decodeSingularDoubleField(value: &_storage._proto3OptionalDouble) }()
- case 128: try { try decoder.decodeSingularBoolField(value: &_storage._proto3OptionalBool) }()
- case 129: try { try decoder.decodeSingularStringField(value: &_storage._proto3OptionalString) }()
- case 130: try { try decoder.decodeSingularBytesField(value: &_storage._proto3OptionalBytes) }()
- default: break
- }
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // 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 _storage._optionalInt32 != 0 {
- try visitor.visitSingularInt32Field(value: _storage._optionalInt32, fieldNumber: 1)
- }
- if _storage._optionalInt64 != 0 {
- try visitor.visitSingularInt64Field(value: _storage._optionalInt64, fieldNumber: 2)
- }
- if _storage._optionalUint32 != 0 {
- try visitor.visitSingularUInt32Field(value: _storage._optionalUint32, fieldNumber: 3)
- }
- if _storage._optionalUint64 != 0 {
- try visitor.visitSingularUInt64Field(value: _storage._optionalUint64, fieldNumber: 4)
- }
- if _storage._optionalSint32 != 0 {
- try visitor.visitSingularSInt32Field(value: _storage._optionalSint32, fieldNumber: 5)
- }
- if _storage._optionalSint64 != 0 {
- try visitor.visitSingularSInt64Field(value: _storage._optionalSint64, fieldNumber: 6)
- }
- if _storage._optionalFixed32 != 0 {
- try visitor.visitSingularFixed32Field(value: _storage._optionalFixed32, fieldNumber: 7)
- }
- if _storage._optionalFixed64 != 0 {
- try visitor.visitSingularFixed64Field(value: _storage._optionalFixed64, fieldNumber: 8)
- }
- if _storage._optionalSfixed32 != 0 {
- try visitor.visitSingularSFixed32Field(value: _storage._optionalSfixed32, fieldNumber: 9)
- }
- if _storage._optionalSfixed64 != 0 {
- try visitor.visitSingularSFixed64Field(value: _storage._optionalSfixed64, fieldNumber: 10)
- }
- if _storage._optionalFloat.bitPattern != 0 {
- try visitor.visitSingularFloatField(value: _storage._optionalFloat, fieldNumber: 11)
- }
- if _storage._optionalDouble.bitPattern != 0 {
- try visitor.visitSingularDoubleField(value: _storage._optionalDouble, fieldNumber: 12)
- }
- if _storage._optionalBool != false {
- try visitor.visitSingularBoolField(value: _storage._optionalBool, fieldNumber: 13)
- }
- if !_storage._optionalString.isEmpty {
- try visitor.visitSingularStringField(value: _storage._optionalString, fieldNumber: 14)
- }
- if !_storage._optionalBytes.isEmpty {
- try visitor.visitSingularBytesField(value: _storage._optionalBytes, fieldNumber: 15)
- }
- try { if let v = _storage._optionalNestedMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
- } }()
- try { if let v = _storage._optionalForeignMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
- } }()
- try { if let v = _storage._optionalImportMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 20)
- } }()
- if _storage._optionalNestedEnum != .zero {
- try visitor.visitSingularEnumField(value: _storage._optionalNestedEnum, fieldNumber: 21)
- }
- if _storage._optionalForeignEnum != .foreignZero {
- try visitor.visitSingularEnumField(value: _storage._optionalForeignEnum, fieldNumber: 22)
- }
- if !_storage._optionalStringPiece.isEmpty {
- try visitor.visitSingularStringField(value: _storage._optionalStringPiece, fieldNumber: 24)
- }
- if !_storage._optionalCord.isEmpty {
- try visitor.visitSingularStringField(value: _storage._optionalCord, fieldNumber: 25)
- }
- try { if let v = _storage._optionalPublicImportMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 26)
- } }()
- try { if let v = _storage._optionalLazyMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 27)
- } }()
- try { if let v = _storage._optionalUnverifiedLazyMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 28)
- } }()
- if !_storage._repeatedInt32.isEmpty {
- try visitor.visitPackedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31)
- }
- if !_storage._repeatedInt64.isEmpty {
- try visitor.visitPackedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32)
- }
- if !_storage._repeatedUint32.isEmpty {
- try visitor.visitPackedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33)
- }
- if !_storage._repeatedUint64.isEmpty {
- try visitor.visitPackedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34)
- }
- if !_storage._repeatedSint32.isEmpty {
- try visitor.visitPackedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35)
- }
- if !_storage._repeatedSint64.isEmpty {
- try visitor.visitPackedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36)
- }
- if !_storage._repeatedFixed32.isEmpty {
- try visitor.visitPackedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37)
- }
- if !_storage._repeatedFixed64.isEmpty {
- try visitor.visitPackedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38)
- }
- if !_storage._repeatedSfixed32.isEmpty {
- try visitor.visitPackedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39)
- }
- if !_storage._repeatedSfixed64.isEmpty {
- try visitor.visitPackedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40)
- }
- if !_storage._repeatedFloat.isEmpty {
- try visitor.visitPackedFloatField(value: _storage._repeatedFloat, fieldNumber: 41)
- }
- if !_storage._repeatedDouble.isEmpty {
- try visitor.visitPackedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42)
- }
- if !_storage._repeatedBool.isEmpty {
- try visitor.visitPackedBoolField(value: _storage._repeatedBool, fieldNumber: 43)
- }
- if !_storage._repeatedString.isEmpty {
- try visitor.visitRepeatedStringField(value: _storage._repeatedString, fieldNumber: 44)
- }
- if !_storage._repeatedBytes.isEmpty {
- try visitor.visitRepeatedBytesField(value: _storage._repeatedBytes, fieldNumber: 45)
- }
- if !_storage._repeatedNestedMessage.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._repeatedNestedMessage, fieldNumber: 48)
- }
- if !_storage._repeatedForeignMessage.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._repeatedForeignMessage, fieldNumber: 49)
- }
- if !_storage._repeatedImportMessage.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._repeatedImportMessage, fieldNumber: 50)
- }
- if !_storage._repeatedNestedEnum.isEmpty {
- try visitor.visitPackedEnumField(value: _storage._repeatedNestedEnum, fieldNumber: 51)
- }
- if !_storage._repeatedForeignEnum.isEmpty {
- try visitor.visitPackedEnumField(value: _storage._repeatedForeignEnum, fieldNumber: 52)
- }
- if !_storage._repeatedStringPiece.isEmpty {
- try visitor.visitRepeatedStringField(value: _storage._repeatedStringPiece, fieldNumber: 54)
- }
- if !_storage._repeatedCord.isEmpty {
- try visitor.visitRepeatedStringField(value: _storage._repeatedCord, fieldNumber: 55)
- }
- if !_storage._repeatedLazyMessage.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._repeatedLazyMessage, fieldNumber: 57)
- }
- if !_storage._optionalBytesCord.isEmpty {
- try visitor.visitSingularBytesField(value: _storage._optionalBytesCord, fieldNumber: 86)
- }
- switch _storage._oneofField {
- case .oneofUint32?: try {
- guard case .oneofUint32(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 111)
- }()
- case .oneofNestedMessage?: try {
- guard case .oneofNestedMessage(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularMessageField(value: v, fieldNumber: 112)
- }()
- case .oneofString?: try {
- guard case .oneofString(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularStringField(value: v, fieldNumber: 113)
- }()
- case .oneofBytes?: try {
- guard case .oneofBytes(let v)? = _storage._oneofField else { preconditionFailure() }
- try visitor.visitSingularBytesField(value: v, fieldNumber: 114)
- }()
- case nil: break
- }
- try { if let v = _storage._optionalLazyImportMessage {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 115)
- } }()
- try { if let v = _storage._proto3OptionalInt32 {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 116)
- } }()
- try { if let v = _storage._proto3OptionalInt64 {
- try visitor.visitSingularInt64Field(value: v, fieldNumber: 117)
- } }()
- try { if let v = _storage._proto3OptionalUint32 {
- try visitor.visitSingularUInt32Field(value: v, fieldNumber: 118)
- } }()
- try { if let v = _storage._proto3OptionalUint64 {
- try visitor.visitSingularUInt64Field(value: v, fieldNumber: 119)
- } }()
- try { if let v = _storage._proto3OptionalSint32 {
- try visitor.visitSingularSInt32Field(value: v, fieldNumber: 120)
- } }()
- try { if let v = _storage._proto3OptionalSint64 {
- try visitor.visitSingularSInt64Field(value: v, fieldNumber: 121)
- } }()
- try { if let v = _storage._proto3OptionalFixed32 {
- try visitor.visitSingularFixed32Field(value: v, fieldNumber: 122)
- } }()
- try { if let v = _storage._proto3OptionalFixed64 {
- try visitor.visitSingularFixed64Field(value: v, fieldNumber: 123)
- } }()
- try { if let v = _storage._proto3OptionalSfixed32 {
- try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 124)
- } }()
- try { if let v = _storage._proto3OptionalSfixed64 {
- try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 125)
- } }()
- try { if let v = _storage._proto3OptionalFloat {
- try visitor.visitSingularFloatField(value: v, fieldNumber: 126)
- } }()
- try { if let v = _storage._proto3OptionalDouble {
- try visitor.visitSingularDoubleField(value: v, fieldNumber: 127)
- } }()
- try { if let v = _storage._proto3OptionalBool {
- try visitor.visitSingularBoolField(value: v, fieldNumber: 128)
- } }()
- try { if let v = _storage._proto3OptionalString {
- try visitor.visitSingularStringField(value: v, fieldNumber: 129)
- } }()
- try { if let v = _storage._proto3OptionalBytes {
- try visitor.visitSingularBytesField(value: v, fieldNumber: 130)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_TestAllTypes, rhs: Proto3ArenaUnittest_TestAllTypes) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._optionalInt32 != rhs_storage._optionalInt32 {return false}
- if _storage._optionalInt64 != rhs_storage._optionalInt64 {return false}
- if _storage._optionalUint32 != rhs_storage._optionalUint32 {return false}
- if _storage._optionalUint64 != rhs_storage._optionalUint64 {return false}
- if _storage._optionalSint32 != rhs_storage._optionalSint32 {return false}
- if _storage._optionalSint64 != rhs_storage._optionalSint64 {return false}
- if _storage._optionalFixed32 != rhs_storage._optionalFixed32 {return false}
- if _storage._optionalFixed64 != rhs_storage._optionalFixed64 {return false}
- if _storage._optionalSfixed32 != rhs_storage._optionalSfixed32 {return false}
- if _storage._optionalSfixed64 != rhs_storage._optionalSfixed64 {return false}
- if _storage._optionalFloat != rhs_storage._optionalFloat {return false}
- if _storage._optionalDouble != rhs_storage._optionalDouble {return false}
- if _storage._optionalBool != rhs_storage._optionalBool {return false}
- if _storage._optionalString != rhs_storage._optionalString {return false}
- if _storage._optionalBytes != rhs_storage._optionalBytes {return false}
- if _storage._optionalNestedMessage != rhs_storage._optionalNestedMessage {return false}
- if _storage._optionalForeignMessage != rhs_storage._optionalForeignMessage {return false}
- if _storage._optionalImportMessage != rhs_storage._optionalImportMessage {return false}
- if _storage._optionalNestedEnum != rhs_storage._optionalNestedEnum {return false}
- if _storage._optionalForeignEnum != rhs_storage._optionalForeignEnum {return false}
- if _storage._optionalStringPiece != rhs_storage._optionalStringPiece {return false}
- if _storage._optionalCord != rhs_storage._optionalCord {return false}
- if _storage._optionalBytesCord != rhs_storage._optionalBytesCord {return false}
- if _storage._optionalPublicImportMessage != rhs_storage._optionalPublicImportMessage {return false}
- if _storage._optionalLazyMessage != rhs_storage._optionalLazyMessage {return false}
- if _storage._optionalUnverifiedLazyMessage != rhs_storage._optionalUnverifiedLazyMessage {return false}
- if _storage._optionalLazyImportMessage != rhs_storage._optionalLazyImportMessage {return false}
- if _storage._repeatedInt32 != rhs_storage._repeatedInt32 {return false}
- if _storage._repeatedInt64 != rhs_storage._repeatedInt64 {return false}
- if _storage._repeatedUint32 != rhs_storage._repeatedUint32 {return false}
- if _storage._repeatedUint64 != rhs_storage._repeatedUint64 {return false}
- if _storage._repeatedSint32 != rhs_storage._repeatedSint32 {return false}
- if _storage._repeatedSint64 != rhs_storage._repeatedSint64 {return false}
- if _storage._repeatedFixed32 != rhs_storage._repeatedFixed32 {return false}
- if _storage._repeatedFixed64 != rhs_storage._repeatedFixed64 {return false}
- if _storage._repeatedSfixed32 != rhs_storage._repeatedSfixed32 {return false}
- if _storage._repeatedSfixed64 != rhs_storage._repeatedSfixed64 {return false}
- if _storage._repeatedFloat != rhs_storage._repeatedFloat {return false}
- if _storage._repeatedDouble != rhs_storage._repeatedDouble {return false}
- if _storage._repeatedBool != rhs_storage._repeatedBool {return false}
- if _storage._repeatedString != rhs_storage._repeatedString {return false}
- if _storage._repeatedBytes != rhs_storage._repeatedBytes {return false}
- if _storage._proto3OptionalInt32 != rhs_storage._proto3OptionalInt32 {return false}
- if _storage._proto3OptionalInt64 != rhs_storage._proto3OptionalInt64 {return false}
- if _storage._proto3OptionalUint32 != rhs_storage._proto3OptionalUint32 {return false}
- if _storage._proto3OptionalUint64 != rhs_storage._proto3OptionalUint64 {return false}
- if _storage._proto3OptionalSint32 != rhs_storage._proto3OptionalSint32 {return false}
- if _storage._proto3OptionalSint64 != rhs_storage._proto3OptionalSint64 {return false}
- if _storage._proto3OptionalFixed32 != rhs_storage._proto3OptionalFixed32 {return false}
- if _storage._proto3OptionalFixed64 != rhs_storage._proto3OptionalFixed64 {return false}
- if _storage._proto3OptionalSfixed32 != rhs_storage._proto3OptionalSfixed32 {return false}
- if _storage._proto3OptionalSfixed64 != rhs_storage._proto3OptionalSfixed64 {return false}
- if _storage._proto3OptionalFloat != rhs_storage._proto3OptionalFloat {return false}
- if _storage._proto3OptionalDouble != rhs_storage._proto3OptionalDouble {return false}
- if _storage._proto3OptionalBool != rhs_storage._proto3OptionalBool {return false}
- if _storage._proto3OptionalString != rhs_storage._proto3OptionalString {return false}
- if _storage._proto3OptionalBytes != rhs_storage._proto3OptionalBytes {return false}
- if _storage._repeatedNestedMessage != rhs_storage._repeatedNestedMessage {return false}
- if _storage._repeatedForeignMessage != rhs_storage._repeatedForeignMessage {return false}
- if _storage._repeatedImportMessage != rhs_storage._repeatedImportMessage {return false}
- if _storage._repeatedNestedEnum != rhs_storage._repeatedNestedEnum {return false}
- if _storage._repeatedForeignEnum != rhs_storage._repeatedForeignEnum {return false}
- if _storage._repeatedStringPiece != rhs_storage._repeatedStringPiece {return false}
- if _storage._repeatedCord != rhs_storage._repeatedCord {return false}
- if _storage._repeatedLazyMessage != rhs_storage._repeatedLazyMessage {return false}
- if _storage._oneofField != rhs_storage._oneofField {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto3ArenaUnittest_TestAllTypes.NestedEnum: SwiftProtobuf._ProtoNameProviding {
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- -1: .same(proto: "NEG"),
- 0: .same(proto: "ZERO"),
- 1: .same(proto: "FOO"),
- 2: .same(proto: "BAR"),
- 3: .same(proto: "BAZ"),
- ]
- }
- extension Proto3ArenaUnittest_TestAllTypes.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = Proto3ArenaUnittest_TestAllTypes.protoMessageName + ".NestedMessage"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "bb"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.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.decodeSingularInt32Field(value: &self.bb) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if self.bb != 0 {
- try visitor.visitSingularInt32Field(value: self.bb, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_TestAllTypes.NestedMessage, rhs: Proto3ArenaUnittest_TestAllTypes.NestedMessage) -> Bool {
- if lhs.bb != rhs.bb {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto3ArenaUnittest_TestPackedTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestPackedTypes"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 90: .standard(proto: "packed_int32"),
- 91: .standard(proto: "packed_int64"),
- 92: .standard(proto: "packed_uint32"),
- 93: .standard(proto: "packed_uint64"),
- 94: .standard(proto: "packed_sint32"),
- 95: .standard(proto: "packed_sint64"),
- 96: .standard(proto: "packed_fixed32"),
- 97: .standard(proto: "packed_fixed64"),
- 98: .standard(proto: "packed_sfixed32"),
- 99: .standard(proto: "packed_sfixed64"),
- 100: .standard(proto: "packed_float"),
- 101: .standard(proto: "packed_double"),
- 102: .standard(proto: "packed_bool"),
- 103: .standard(proto: "packed_enum"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.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 90: try { try decoder.decodeRepeatedInt32Field(value: &self.packedInt32) }()
- case 91: try { try decoder.decodeRepeatedInt64Field(value: &self.packedInt64) }()
- case 92: try { try decoder.decodeRepeatedUInt32Field(value: &self.packedUint32) }()
- case 93: try { try decoder.decodeRepeatedUInt64Field(value: &self.packedUint64) }()
- case 94: try { try decoder.decodeRepeatedSInt32Field(value: &self.packedSint32) }()
- case 95: try { try decoder.decodeRepeatedSInt64Field(value: &self.packedSint64) }()
- case 96: try { try decoder.decodeRepeatedFixed32Field(value: &self.packedFixed32) }()
- case 97: try { try decoder.decodeRepeatedFixed64Field(value: &self.packedFixed64) }()
- case 98: try { try decoder.decodeRepeatedSFixed32Field(value: &self.packedSfixed32) }()
- case 99: try { try decoder.decodeRepeatedSFixed64Field(value: &self.packedSfixed64) }()
- case 100: try { try decoder.decodeRepeatedFloatField(value: &self.packedFloat) }()
- case 101: try { try decoder.decodeRepeatedDoubleField(value: &self.packedDouble) }()
- case 102: try { try decoder.decodeRepeatedBoolField(value: &self.packedBool) }()
- case 103: try { try decoder.decodeRepeatedEnumField(value: &self.packedEnum) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.packedInt32.isEmpty {
- try visitor.visitPackedInt32Field(value: self.packedInt32, fieldNumber: 90)
- }
- if !self.packedInt64.isEmpty {
- try visitor.visitPackedInt64Field(value: self.packedInt64, fieldNumber: 91)
- }
- if !self.packedUint32.isEmpty {
- try visitor.visitPackedUInt32Field(value: self.packedUint32, fieldNumber: 92)
- }
- if !self.packedUint64.isEmpty {
- try visitor.visitPackedUInt64Field(value: self.packedUint64, fieldNumber: 93)
- }
- if !self.packedSint32.isEmpty {
- try visitor.visitPackedSInt32Field(value: self.packedSint32, fieldNumber: 94)
- }
- if !self.packedSint64.isEmpty {
- try visitor.visitPackedSInt64Field(value: self.packedSint64, fieldNumber: 95)
- }
- if !self.packedFixed32.isEmpty {
- try visitor.visitPackedFixed32Field(value: self.packedFixed32, fieldNumber: 96)
- }
- if !self.packedFixed64.isEmpty {
- try visitor.visitPackedFixed64Field(value: self.packedFixed64, fieldNumber: 97)
- }
- if !self.packedSfixed32.isEmpty {
- try visitor.visitPackedSFixed32Field(value: self.packedSfixed32, fieldNumber: 98)
- }
- if !self.packedSfixed64.isEmpty {
- try visitor.visitPackedSFixed64Field(value: self.packedSfixed64, fieldNumber: 99)
- }
- if !self.packedFloat.isEmpty {
- try visitor.visitPackedFloatField(value: self.packedFloat, fieldNumber: 100)
- }
- if !self.packedDouble.isEmpty {
- try visitor.visitPackedDoubleField(value: self.packedDouble, fieldNumber: 101)
- }
- if !self.packedBool.isEmpty {
- try visitor.visitPackedBoolField(value: self.packedBool, fieldNumber: 102)
- }
- if !self.packedEnum.isEmpty {
- try visitor.visitPackedEnumField(value: self.packedEnum, fieldNumber: 103)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_TestPackedTypes, rhs: Proto3ArenaUnittest_TestPackedTypes) -> Bool {
- if lhs.packedInt32 != rhs.packedInt32 {return false}
- if lhs.packedInt64 != rhs.packedInt64 {return false}
- if lhs.packedUint32 != rhs.packedUint32 {return false}
- if lhs.packedUint64 != rhs.packedUint64 {return false}
- if lhs.packedSint32 != rhs.packedSint32 {return false}
- if lhs.packedSint64 != rhs.packedSint64 {return false}
- if lhs.packedFixed32 != rhs.packedFixed32 {return false}
- if lhs.packedFixed64 != rhs.packedFixed64 {return false}
- if lhs.packedSfixed32 != rhs.packedSfixed32 {return false}
- if lhs.packedSfixed64 != rhs.packedSfixed64 {return false}
- if lhs.packedFloat != rhs.packedFloat {return false}
- if lhs.packedDouble != rhs.packedDouble {return false}
- if lhs.packedBool != rhs.packedBool {return false}
- if lhs.packedEnum != rhs.packedEnum {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto3ArenaUnittest_TestUnpackedTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestUnpackedTypes"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .standard(proto: "repeated_int32"),
- 2: .standard(proto: "repeated_int64"),
- 3: .standard(proto: "repeated_uint32"),
- 4: .standard(proto: "repeated_uint64"),
- 5: .standard(proto: "repeated_sint32"),
- 6: .standard(proto: "repeated_sint64"),
- 7: .standard(proto: "repeated_fixed32"),
- 8: .standard(proto: "repeated_fixed64"),
- 9: .standard(proto: "repeated_sfixed32"),
- 10: .standard(proto: "repeated_sfixed64"),
- 11: .standard(proto: "repeated_float"),
- 12: .standard(proto: "repeated_double"),
- 13: .standard(proto: "repeated_bool"),
- 14: .standard(proto: "repeated_nested_enum"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.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.decodeRepeatedInt32Field(value: &self.repeatedInt32) }()
- case 2: try { try decoder.decodeRepeatedInt64Field(value: &self.repeatedInt64) }()
- case 3: try { try decoder.decodeRepeatedUInt32Field(value: &self.repeatedUint32) }()
- case 4: try { try decoder.decodeRepeatedUInt64Field(value: &self.repeatedUint64) }()
- case 5: try { try decoder.decodeRepeatedSInt32Field(value: &self.repeatedSint32) }()
- case 6: try { try decoder.decodeRepeatedSInt64Field(value: &self.repeatedSint64) }()
- case 7: try { try decoder.decodeRepeatedFixed32Field(value: &self.repeatedFixed32) }()
- case 8: try { try decoder.decodeRepeatedFixed64Field(value: &self.repeatedFixed64) }()
- case 9: try { try decoder.decodeRepeatedSFixed32Field(value: &self.repeatedSfixed32) }()
- case 10: try { try decoder.decodeRepeatedSFixed64Field(value: &self.repeatedSfixed64) }()
- case 11: try { try decoder.decodeRepeatedFloatField(value: &self.repeatedFloat) }()
- case 12: try { try decoder.decodeRepeatedDoubleField(value: &self.repeatedDouble) }()
- case 13: try { try decoder.decodeRepeatedBoolField(value: &self.repeatedBool) }()
- case 14: try { try decoder.decodeRepeatedEnumField(value: &self.repeatedNestedEnum) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if !self.repeatedInt32.isEmpty {
- try visitor.visitRepeatedInt32Field(value: self.repeatedInt32, fieldNumber: 1)
- }
- if !self.repeatedInt64.isEmpty {
- try visitor.visitRepeatedInt64Field(value: self.repeatedInt64, fieldNumber: 2)
- }
- if !self.repeatedUint32.isEmpty {
- try visitor.visitRepeatedUInt32Field(value: self.repeatedUint32, fieldNumber: 3)
- }
- if !self.repeatedUint64.isEmpty {
- try visitor.visitRepeatedUInt64Field(value: self.repeatedUint64, fieldNumber: 4)
- }
- if !self.repeatedSint32.isEmpty {
- try visitor.visitRepeatedSInt32Field(value: self.repeatedSint32, fieldNumber: 5)
- }
- if !self.repeatedSint64.isEmpty {
- try visitor.visitRepeatedSInt64Field(value: self.repeatedSint64, fieldNumber: 6)
- }
- if !self.repeatedFixed32.isEmpty {
- try visitor.visitRepeatedFixed32Field(value: self.repeatedFixed32, fieldNumber: 7)
- }
- if !self.repeatedFixed64.isEmpty {
- try visitor.visitRepeatedFixed64Field(value: self.repeatedFixed64, fieldNumber: 8)
- }
- if !self.repeatedSfixed32.isEmpty {
- try visitor.visitRepeatedSFixed32Field(value: self.repeatedSfixed32, fieldNumber: 9)
- }
- if !self.repeatedSfixed64.isEmpty {
- try visitor.visitRepeatedSFixed64Field(value: self.repeatedSfixed64, fieldNumber: 10)
- }
- if !self.repeatedFloat.isEmpty {
- try visitor.visitRepeatedFloatField(value: self.repeatedFloat, fieldNumber: 11)
- }
- if !self.repeatedDouble.isEmpty {
- try visitor.visitRepeatedDoubleField(value: self.repeatedDouble, fieldNumber: 12)
- }
- if !self.repeatedBool.isEmpty {
- try visitor.visitRepeatedBoolField(value: self.repeatedBool, fieldNumber: 13)
- }
- if !self.repeatedNestedEnum.isEmpty {
- try visitor.visitRepeatedEnumField(value: self.repeatedNestedEnum, fieldNumber: 14)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_TestUnpackedTypes, rhs: Proto3ArenaUnittest_TestUnpackedTypes) -> Bool {
- if lhs.repeatedInt32 != rhs.repeatedInt32 {return false}
- if lhs.repeatedInt64 != rhs.repeatedInt64 {return false}
- if lhs.repeatedUint32 != rhs.repeatedUint32 {return false}
- if lhs.repeatedUint64 != rhs.repeatedUint64 {return false}
- if lhs.repeatedSint32 != rhs.repeatedSint32 {return false}
- if lhs.repeatedSint64 != rhs.repeatedSint64 {return false}
- if lhs.repeatedFixed32 != rhs.repeatedFixed32 {return false}
- if lhs.repeatedFixed64 != rhs.repeatedFixed64 {return false}
- if lhs.repeatedSfixed32 != rhs.repeatedSfixed32 {return false}
- if lhs.repeatedSfixed64 != rhs.repeatedSfixed64 {return false}
- if lhs.repeatedFloat != rhs.repeatedFloat {return false}
- if lhs.repeatedDouble != rhs.repeatedDouble {return false}
- if lhs.repeatedBool != rhs.repeatedBool {return false}
- if lhs.repeatedNestedEnum != rhs.repeatedNestedEnum {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto3ArenaUnittest_NestedTestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".NestedTestAllTypes"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "child"),
- 2: .same(proto: "payload"),
- 3: .standard(proto: "repeated_child"),
- 4: .standard(proto: "lazy_payload"),
- ]
- fileprivate class _StorageClass {
- var _child: Proto3ArenaUnittest_NestedTestAllTypes? = nil
- var _payload: Proto3ArenaUnittest_TestAllTypes? = nil
- var _repeatedChild: [Proto3ArenaUnittest_NestedTestAllTypes] = []
- var _lazyPayload: Proto3ArenaUnittest_TestAllTypes? = nil
- // This property is used as the initial default value for new instances of the type.
- // The type itself is protecting the reference to its storage via CoW semantics.
- // This will force a copy to be made of this reference when the first mutation occurs;
- // hence, it is safe to mark this as `nonisolated(unsafe)`.
- static nonisolated(unsafe) let defaultInstance = _StorageClass()
- private init() {}
- init(copying source: _StorageClass) {
- _child = source._child
- _payload = source._payload
- _repeatedChild = source._repeatedChild
- _lazyPayload = source._lazyPayload
- }
- }
- fileprivate mutating func _uniqueStorage() -> _StorageClass {
- if !isKnownUniquelyReferenced(&_storage) {
- _storage = _StorageClass(copying: _storage)
- }
- return _storage
- }
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- _ = _uniqueStorage()
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- 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.decodeSingularMessageField(value: &_storage._child) }()
- case 2: try { try decoder.decodeSingularMessageField(value: &_storage._payload) }()
- case 3: try { try decoder.decodeRepeatedMessageField(value: &_storage._repeatedChild) }()
- case 4: try { try decoder.decodeSingularMessageField(value: &_storage._lazyPayload) }()
- default: break
- }
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
- // 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
- try { if let v = _storage._child {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
- } }()
- try { if let v = _storage._payload {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
- } }()
- if !_storage._repeatedChild.isEmpty {
- try visitor.visitRepeatedMessageField(value: _storage._repeatedChild, fieldNumber: 3)
- }
- try { if let v = _storage._lazyPayload {
- try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
- } }()
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_NestedTestAllTypes, rhs: Proto3ArenaUnittest_NestedTestAllTypes) -> Bool {
- if lhs._storage !== rhs._storage {
- let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
- let _storage = _args.0
- let rhs_storage = _args.1
- if _storage._child != rhs_storage._child {return false}
- if _storage._payload != rhs_storage._payload {return false}
- if _storage._repeatedChild != rhs_storage._repeatedChild {return false}
- if _storage._lazyPayload != rhs_storage._lazyPayload {return false}
- return true
- }
- if !storagesAreEqual {return false}
- }
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto3ArenaUnittest_ForeignMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".ForeignMessage"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "c"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.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.decodeSingularInt32Field(value: &self.c) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if self.c != 0 {
- try visitor.visitSingularInt32Field(value: self.c, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_ForeignMessage, rhs: Proto3ArenaUnittest_ForeignMessage) -> Bool {
- if lhs.c != rhs.c {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto3ArenaUnittest_TestEmptyMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestEmptyMessage"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_TestEmptyMessage, rhs: Proto3ArenaUnittest_TestEmptyMessage) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto3ArenaUnittest_TestPickleNestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".TestPickleNestedMessage"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap()
- mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
- // Load everything into unknown fields
- while try decoder.nextFieldNumber() != nil {}
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_TestPickleNestedMessage, rhs: Proto3ArenaUnittest_TestPickleNestedMessage) -> Bool {
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto3ArenaUnittest_TestPickleNestedMessage.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = Proto3ArenaUnittest_TestPickleNestedMessage.protoMessageName + ".NestedMessage"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "bb"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.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.decodeSingularInt32Field(value: &self.bb) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if self.bb != 0 {
- try visitor.visitSingularInt32Field(value: self.bb, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_TestPickleNestedMessage.NestedMessage, rhs: Proto3ArenaUnittest_TestPickleNestedMessage.NestedMessage) -> Bool {
- if lhs.bb != rhs.bb {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension Proto3ArenaUnittest_TestPickleNestedMessage.NestedMessage.NestedNestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = Proto3ArenaUnittest_TestPickleNestedMessage.NestedMessage.protoMessageName + ".NestedNestedMessage"
- static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
- 1: .same(proto: "cc"),
- ]
- mutating func decodeMessage<D: SwiftProtobuf.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.decodeSingularInt32Field(value: &self.cc) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- if self.cc != 0 {
- try visitor.visitSingularInt32Field(value: self.cc, fieldNumber: 1)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: Proto3ArenaUnittest_TestPickleNestedMessage.NestedMessage.NestedNestedMessage, rhs: Proto3ArenaUnittest_TestPickleNestedMessage.NestedMessage.NestedNestedMessage) -> Bool {
- if lhs.cc != rhs.cc {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
|