| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663 |
- // DO NOT EDIT.
- // swift-format-ignore-file
- // swiftlint:disable all
- //
- // Generated by the Swift generator plugin for the protocol buffer compiler.
- // Source: unittest_swift_groups.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 2015 Google Inc. All rights reserved.
- // https://developers.google.com/protocol-buffers/
- //
- // Redistribution and use in source and binary forms, with or without
- // modification, are permitted provided that the following conditions are
- // met:
- //
- // * Redistributions of source code must retain the above copyright
- // notice, this list of conditions and the following disclaimer.
- // * Redistributions in binary form must reproduce the above
- // copyright notice, this list of conditions and the following disclaimer
- // in the documentation and/or other materials provided with the
- // distribution.
- // * Neither the name of Google Inc. nor the names of its
- // contributors may be used to endorse or promote products derived from
- // this software without specific prior written permission.
- //
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- import SwiftProtobuf
- // 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
- }
- /// Same field number appears inside and outside of the group.
- struct SwiftProtoTesting_GroupExtensions: SwiftProtobuf.ExtensibleMessage, 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 a: Int32 {
- get {_a ?? 0}
- set {_a = newValue}
- }
- /// Returns true if `a` has been explicitly set.
- var hasA: Bool {self._a != nil}
- /// Clears the value of `a`. Subsequent reads from it will return its default value.
- mutating func clearA() {self._a = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
- fileprivate var _a: Int32? = nil
- }
- struct SwiftProtoTesting_ExtensionGroup: 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 a: Int32 {
- get {_a ?? 0}
- set {_a = newValue}
- }
- /// Returns true if `a` has been explicitly set.
- var hasA: Bool {self._a != nil}
- /// Clears the value of `a`. Subsequent reads from it will return its default value.
- mutating func clearA() {self._a = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _a: Int32? = nil
- }
- struct SwiftProtoTesting_RepeatedExtensionGroup: 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 a: Int32 {
- get {_a ?? 0}
- set {_a = newValue}
- }
- /// Returns true if `a` has been explicitly set.
- var hasA: Bool {self._a != nil}
- /// Clears the value of `a`. Subsequent reads from it will return its default value.
- mutating func clearA() {self._a = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _a: Int32? = nil
- }
- struct SwiftProtoTesting_GroupUnextended: 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 a: Int32 {
- get {_a ?? 0}
- set {_a = newValue}
- }
- /// Returns true if `a` has been explicitly set.
- var hasA: Bool {self._a != nil}
- /// Clears the value of `a`. Subsequent reads from it will return its default value.
- mutating func clearA() {self._a = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _a: Int32? = nil
- }
- struct SwiftProtoTesting_NestingGroupsMessage: 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 outerA: Int32 {
- get {_outerA ?? 0}
- set {_outerA = newValue}
- }
- /// Returns true if `outerA` has been explicitly set.
- var hasOuterA: Bool {self._outerA != nil}
- /// Clears the value of `outerA`. Subsequent reads from it will return its default value.
- mutating func clearOuterA() {self._outerA = nil}
- var subGroup1: SwiftProtoTesting_NestingGroupsMessage.SubGroup1 {
- get {_subGroup1 ?? SwiftProtoTesting_NestingGroupsMessage.SubGroup1()}
- set {_subGroup1 = newValue}
- }
- /// Returns true if `subGroup1` has been explicitly set.
- var hasSubGroup1: Bool {self._subGroup1 != nil}
- /// Clears the value of `subGroup1`. Subsequent reads from it will return its default value.
- mutating func clearSubGroup1() {self._subGroup1 = nil}
- var subGroup3: [SwiftProtoTesting_NestingGroupsMessage.SubGroup3] = []
- var unknownFields = SwiftProtobuf.UnknownStorage()
- struct SubGroup1: 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 sub1A: Int32 {
- get {_sub1A ?? 0}
- set {_sub1A = newValue}
- }
- /// Returns true if `sub1A` has been explicitly set.
- var hasSub1A: Bool {self._sub1A != nil}
- /// Clears the value of `sub1A`. Subsequent reads from it will return its default value.
- mutating func clearSub1A() {self._sub1A = nil}
- var subGroup2: SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2 {
- get {_subGroup2 ?? SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2()}
- set {_subGroup2 = newValue}
- }
- /// Returns true if `subGroup2` has been explicitly set.
- var hasSubGroup2: Bool {self._subGroup2 != nil}
- /// Clears the value of `subGroup2`. Subsequent reads from it will return its default value.
- mutating func clearSubGroup2() {self._subGroup2 = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- struct SubGroup2: 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 sub2A: Int32 {
- get {_sub2A ?? 0}
- set {_sub2A = newValue}
- }
- /// Returns true if `sub2A` has been explicitly set.
- var hasSub2A: Bool {self._sub2A != nil}
- /// Clears the value of `sub2A`. Subsequent reads from it will return its default value.
- mutating func clearSub2A() {self._sub2A = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _sub2A: Int32? = nil
- }
- init() {}
- fileprivate var _sub1A: Int32? = nil
- fileprivate var _subGroup2: SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2? = nil
- }
- struct SubGroup3: 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 sub3A: Int32 {
- get {_sub3A ?? 0}
- set {_sub3A = newValue}
- }
- /// Returns true if `sub3A` has been explicitly set.
- var hasSub3A: Bool {self._sub3A != nil}
- /// Clears the value of `sub3A`. Subsequent reads from it will return its default value.
- mutating func clearSub3A() {self._sub3A = nil}
- var subGroup4: [SwiftProtoTesting_NestingGroupsMessage.SubGroup3.SubGroup4] = []
- var unknownFields = SwiftProtobuf.UnknownStorage()
- struct SubGroup4: 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 sub4A: Int32 {
- get {_sub4A ?? 0}
- set {_sub4A = newValue}
- }
- /// Returns true if `sub4A` has been explicitly set.
- var hasSub4A: Bool {self._sub4A != nil}
- /// Clears the value of `sub4A`. Subsequent reads from it will return its default value.
- mutating func clearSub4A() {self._sub4A = nil}
- var unknownFields = SwiftProtobuf.UnknownStorage()
- init() {}
- fileprivate var _sub4A: Int32? = nil
- }
- init() {}
- fileprivate var _sub3A: Int32? = nil
- }
- init() {}
- fileprivate var _outerA: Int32? = nil
- fileprivate var _subGroup1: SwiftProtoTesting_NestingGroupsMessage.SubGroup1? = nil
- }
- // MARK: - Extension support defined in unittest_swift_groups.proto.
- // MARK: - Extension Properties
- // Swift Extensions on the extended Messages to add easy access to the declared
- // extension fields. The names are based on the extension field name from the proto
- // declaration. To avoid naming collisions, the names are prefixed with the name of
- // the scope where the extend directive occurs.
- extension SwiftProtoTesting_GroupExtensions {
- var SwiftProtoTesting_extensionGroup: SwiftProtoTesting_ExtensionGroup {
- get {return getExtensionValue(ext: SwiftProtoTesting_Extensions_ExtensionGroup) ?? SwiftProtoTesting_ExtensionGroup()}
- set {setExtensionValue(ext: SwiftProtoTesting_Extensions_ExtensionGroup, value: newValue)}
- }
- /// Returns true if extension `SwiftProtoTesting_Extensions_ExtensionGroup`
- /// has been explicitly set.
- var hasSwiftProtoTesting_extensionGroup: Bool {
- return hasExtensionValue(ext: SwiftProtoTesting_Extensions_ExtensionGroup)
- }
- /// Clears the value of extension `SwiftProtoTesting_Extensions_ExtensionGroup`.
- /// Subsequent reads from it will return its default value.
- mutating func clearSwiftProtoTesting_extensionGroup() {
- clearExtensionValue(ext: SwiftProtoTesting_Extensions_ExtensionGroup)
- }
- var SwiftProtoTesting_repeatedExtensionGroup: [SwiftProtoTesting_RepeatedExtensionGroup] {
- get {return getExtensionValue(ext: SwiftProtoTesting_Extensions_RepeatedExtensionGroup) ?? []}
- set {setExtensionValue(ext: SwiftProtoTesting_Extensions_RepeatedExtensionGroup, value: newValue)}
- }
- }
- // MARK: - File's ExtensionMap: SwiftProtoTesting_UnittestSwiftGroups_Extensions
- /// A `SwiftProtobuf.SimpleExtensionMap` that includes all of the extensions defined by
- /// this .proto file. It can be used any place an `SwiftProtobuf.ExtensionMap` is needed
- /// in parsing, or it can be combined with other `SwiftProtobuf.SimpleExtensionMap`s to create
- /// a larger `SwiftProtobuf.SimpleExtensionMap`.
- let SwiftProtoTesting_UnittestSwiftGroups_Extensions: SwiftProtobuf.SimpleExtensionMap = [
- SwiftProtoTesting_Extensions_ExtensionGroup,
- SwiftProtoTesting_Extensions_RepeatedExtensionGroup
- ]
- // Extension Objects - The only reason these might be needed is when manually
- // constructing a `SimpleExtensionMap`, otherwise, use the above _Extension Properties_
- // accessors for the extension fields on the messages directly.
- let SwiftProtoTesting_Extensions_ExtensionGroup = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalGroupExtensionField<SwiftProtoTesting_ExtensionGroup>, SwiftProtoTesting_GroupExtensions>(
- _protobuf_fieldNumber: 2,
- fieldName: "swift_proto_testing.extensiongroup"
- )
- let SwiftProtoTesting_Extensions_RepeatedExtensionGroup = SwiftProtobuf.MessageExtension<SwiftProtobuf.RepeatedGroupExtensionField<SwiftProtoTesting_RepeatedExtensionGroup>, SwiftProtoTesting_GroupExtensions>(
- _protobuf_fieldNumber: 3,
- fieldName: "swift_proto_testing.repeatedextensiongroup"
- )
- // MARK: - Code below here is support for the SwiftProtobuf runtime.
- fileprivate let _protobuf_package = "swift_proto_testing"
- extension SwiftProtoTesting_GroupExtensions: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".GroupExtensions"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}a\0")
- public var isInitialized: Bool {
- if !_protobuf_extensionFieldValues.isInitialized {return false}
- return true
- }
- 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._a) }()
- case 2..<11:
- try { try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: SwiftProtoTesting_GroupExtensions.self, fieldNumber: fieldNumber) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._a {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 2, end: 11)
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: SwiftProtoTesting_GroupExtensions, rhs: SwiftProtoTesting_GroupExtensions) -> Bool {
- if lhs._a != rhs._a {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
- return true
- }
- }
- extension SwiftProtoTesting_ExtensionGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".ExtensionGroup"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}a\0")
- 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._a) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._a {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: SwiftProtoTesting_ExtensionGroup, rhs: SwiftProtoTesting_ExtensionGroup) -> Bool {
- if lhs._a != rhs._a {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension SwiftProtoTesting_RepeatedExtensionGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".RepeatedExtensionGroup"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}a\0")
- 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._a) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._a {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: SwiftProtoTesting_RepeatedExtensionGroup, rhs: SwiftProtoTesting_RepeatedExtensionGroup) -> Bool {
- if lhs._a != rhs._a {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension SwiftProtoTesting_GroupUnextended: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".GroupUnextended"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}a\0")
- 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._a) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._a {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: SwiftProtoTesting_GroupUnextended, rhs: SwiftProtoTesting_GroupUnextended) -> Bool {
- if lhs._a != rhs._a {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension SwiftProtoTesting_NestingGroupsMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = _protobuf_package + ".NestingGroupsMessage"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}outer_a\0\u{7}SubGroup1\0\u{7}SubGroup3\0")
- 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._outerA) }()
- case 2: try { try decoder.decodeSingularGroupField(value: &self._subGroup1) }()
- case 3: try { try decoder.decodeRepeatedGroupField(value: &self.subGroup3) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._outerA {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._subGroup1 {
- try visitor.visitSingularGroupField(value: v, fieldNumber: 2)
- } }()
- if !self.subGroup3.isEmpty {
- try visitor.visitRepeatedGroupField(value: self.subGroup3, fieldNumber: 3)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage, rhs: SwiftProtoTesting_NestingGroupsMessage) -> Bool {
- if lhs._outerA != rhs._outerA {return false}
- if lhs._subGroup1 != rhs._subGroup1 {return false}
- if lhs.subGroup3 != rhs.subGroup3 {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension SwiftProtoTesting_NestingGroupsMessage.SubGroup1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = SwiftProtoTesting_NestingGroupsMessage.protoMessageName + ".SubGroup1"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sub1_a\0\u{7}SubGroup2\0")
- 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._sub1A) }()
- case 2: try { try decoder.decodeSingularGroupField(value: &self._subGroup2) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._sub1A {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try { if let v = self._subGroup2 {
- try visitor.visitSingularGroupField(value: v, fieldNumber: 2)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup1, rhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup1) -> Bool {
- if lhs._sub1A != rhs._sub1A {return false}
- if lhs._subGroup2 != rhs._subGroup2 {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = SwiftProtoTesting_NestingGroupsMessage.SubGroup1.protoMessageName + ".SubGroup2"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sub2_a\0")
- 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._sub2A) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._sub2A {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2, rhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup1.SubGroup2) -> Bool {
- if lhs._sub2A != rhs._sub2A {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension SwiftProtoTesting_NestingGroupsMessage.SubGroup3: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = SwiftProtoTesting_NestingGroupsMessage.protoMessageName + ".SubGroup3"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sub3_a\0\u{7}SubGroup4\0")
- 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._sub3A) }()
- case 2: try { try decoder.decodeRepeatedGroupField(value: &self.subGroup4) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._sub3A {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- if !self.subGroup4.isEmpty {
- try visitor.visitRepeatedGroupField(value: self.subGroup4, fieldNumber: 2)
- }
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup3, rhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup3) -> Bool {
- if lhs._sub3A != rhs._sub3A {return false}
- if lhs.subGroup4 != rhs.subGroup4 {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
- extension SwiftProtoTesting_NestingGroupsMessage.SubGroup3.SubGroup4: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
- static let protoMessageName: String = SwiftProtoTesting_NestingGroupsMessage.SubGroup3.protoMessageName + ".SubGroup4"
- static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}sub4_a\0")
- 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._sub4A) }()
- default: break
- }
- }
- }
- func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
- // The use of inline closures is to circumvent an issue where the compiler
- // allocates stack space for every if/case branch local when no optimizations
- // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
- // https://github.com/apple/swift-protobuf/issues/1182
- try { if let v = self._sub4A {
- try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
- } }()
- try unknownFields.traverse(visitor: &visitor)
- }
- static func ==(lhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup3.SubGroup4, rhs: SwiftProtoTesting_NestingGroupsMessage.SubGroup3.SubGroup4) -> Bool {
- if lhs._sub4A != rhs._sub4A {return false}
- if lhs.unknownFields != rhs.unknownFields {return false}
- return true
- }
- }
|