// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: google/protobuf/test_messages_proto2.proto
//
// For information on using the generated types, please see the documentation:
//   https://github.com/apple/swift-protobuf/

// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc.  All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//     * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Test schema for proto2 messages.  This test schema is used by:
//
// - conformance tests

// LINT: ALLOW_GROUPS

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 ProtobufTestMessages_Proto2_ForeignEnumProto2: SwiftProtobuf.Enum {
  typealias RawValue = Int
  case foreignFoo // = 0
  case foreignBar // = 1
  case foreignBaz // = 2

  init() {
    self = .foreignFoo
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .foreignFoo
    case 1: self = .foreignBar
    case 2: self = .foreignBaz
    default: return nil
    }
  }

  var rawValue: Int {
    switch self {
    case .foreignFoo: return 0
    case .foreignBar: return 1
    case .foreignBaz: return 2
    }
  }

}

#if swift(>=4.2)

extension ProtobufTestMessages_Proto2_ForeignEnumProto2: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

/// This proto includes every type of field in both singular and repeated
/// forms.
///
/// Also, crucially, all messages and enums in this file are eventually
/// submessages of this message.  So for example, a fuzz test of TestAllTypes
/// could trigger bugs that occur in any message type in this file.  We verify
/// this stays true in a unit test.
struct ProtobufTestMessages_Proto2_TestAllTypesProto2: SwiftProtobuf.ExtensibleMessage {
  // 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 ?? 0}
    set {_uniqueStorage()._optionalInt32 = newValue}
  }
  /// Returns true if `optionalInt32` has been explicitly set.
  var hasOptionalInt32: Bool {return _storage._optionalInt32 != nil}
  /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  mutating func clearOptionalInt32() {_uniqueStorage()._optionalInt32 = nil}

  var optionalInt64: Int64 {
    get {return _storage._optionalInt64 ?? 0}
    set {_uniqueStorage()._optionalInt64 = newValue}
  }
  /// Returns true if `optionalInt64` has been explicitly set.
  var hasOptionalInt64: Bool {return _storage._optionalInt64 != nil}
  /// Clears the value of `optionalInt64`. Subsequent reads from it will return its default value.
  mutating func clearOptionalInt64() {_uniqueStorage()._optionalInt64 = nil}

  var optionalUint32: UInt32 {
    get {return _storage._optionalUint32 ?? 0}
    set {_uniqueStorage()._optionalUint32 = newValue}
  }
  /// Returns true if `optionalUint32` has been explicitly set.
  var hasOptionalUint32: Bool {return _storage._optionalUint32 != nil}
  /// Clears the value of `optionalUint32`. Subsequent reads from it will return its default value.
  mutating func clearOptionalUint32() {_uniqueStorage()._optionalUint32 = nil}

  var optionalUint64: UInt64 {
    get {return _storage._optionalUint64 ?? 0}
    set {_uniqueStorage()._optionalUint64 = newValue}
  }
  /// Returns true if `optionalUint64` has been explicitly set.
  var hasOptionalUint64: Bool {return _storage._optionalUint64 != nil}
  /// Clears the value of `optionalUint64`. Subsequent reads from it will return its default value.
  mutating func clearOptionalUint64() {_uniqueStorage()._optionalUint64 = nil}

  var optionalSint32: Int32 {
    get {return _storage._optionalSint32 ?? 0}
    set {_uniqueStorage()._optionalSint32 = newValue}
  }
  /// Returns true if `optionalSint32` has been explicitly set.
  var hasOptionalSint32: Bool {return _storage._optionalSint32 != nil}
  /// Clears the value of `optionalSint32`. Subsequent reads from it will return its default value.
  mutating func clearOptionalSint32() {_uniqueStorage()._optionalSint32 = nil}

  var optionalSint64: Int64 {
    get {return _storage._optionalSint64 ?? 0}
    set {_uniqueStorage()._optionalSint64 = newValue}
  }
  /// Returns true if `optionalSint64` has been explicitly set.
  var hasOptionalSint64: Bool {return _storage._optionalSint64 != nil}
  /// Clears the value of `optionalSint64`. Subsequent reads from it will return its default value.
  mutating func clearOptionalSint64() {_uniqueStorage()._optionalSint64 = nil}

  var optionalFixed32: UInt32 {
    get {return _storage._optionalFixed32 ?? 0}
    set {_uniqueStorage()._optionalFixed32 = newValue}
  }
  /// Returns true if `optionalFixed32` has been explicitly set.
  var hasOptionalFixed32: Bool {return _storage._optionalFixed32 != nil}
  /// Clears the value of `optionalFixed32`. Subsequent reads from it will return its default value.
  mutating func clearOptionalFixed32() {_uniqueStorage()._optionalFixed32 = nil}

  var optionalFixed64: UInt64 {
    get {return _storage._optionalFixed64 ?? 0}
    set {_uniqueStorage()._optionalFixed64 = newValue}
  }
  /// Returns true if `optionalFixed64` has been explicitly set.
  var hasOptionalFixed64: Bool {return _storage._optionalFixed64 != nil}
  /// Clears the value of `optionalFixed64`. Subsequent reads from it will return its default value.
  mutating func clearOptionalFixed64() {_uniqueStorage()._optionalFixed64 = nil}

  var optionalSfixed32: Int32 {
    get {return _storage._optionalSfixed32 ?? 0}
    set {_uniqueStorage()._optionalSfixed32 = newValue}
  }
  /// Returns true if `optionalSfixed32` has been explicitly set.
  var hasOptionalSfixed32: Bool {return _storage._optionalSfixed32 != nil}
  /// Clears the value of `optionalSfixed32`. Subsequent reads from it will return its default value.
  mutating func clearOptionalSfixed32() {_uniqueStorage()._optionalSfixed32 = nil}

  var optionalSfixed64: Int64 {
    get {return _storage._optionalSfixed64 ?? 0}
    set {_uniqueStorage()._optionalSfixed64 = newValue}
  }
  /// Returns true if `optionalSfixed64` has been explicitly set.
  var hasOptionalSfixed64: Bool {return _storage._optionalSfixed64 != nil}
  /// Clears the value of `optionalSfixed64`. Subsequent reads from it will return its default value.
  mutating func clearOptionalSfixed64() {_uniqueStorage()._optionalSfixed64 = nil}

  var optionalFloat: Float {
    get {return _storage._optionalFloat ?? 0}
    set {_uniqueStorage()._optionalFloat = newValue}
  }
  /// Returns true if `optionalFloat` has been explicitly set.
  var hasOptionalFloat: Bool {return _storage._optionalFloat != nil}
  /// Clears the value of `optionalFloat`. Subsequent reads from it will return its default value.
  mutating func clearOptionalFloat() {_uniqueStorage()._optionalFloat = nil}

  var optionalDouble: Double {
    get {return _storage._optionalDouble ?? 0}
    set {_uniqueStorage()._optionalDouble = newValue}
  }
  /// Returns true if `optionalDouble` has been explicitly set.
  var hasOptionalDouble: Bool {return _storage._optionalDouble != nil}
  /// Clears the value of `optionalDouble`. Subsequent reads from it will return its default value.
  mutating func clearOptionalDouble() {_uniqueStorage()._optionalDouble = nil}

  var optionalBool: Bool {
    get {return _storage._optionalBool ?? false}
    set {_uniqueStorage()._optionalBool = newValue}
  }
  /// Returns true if `optionalBool` has been explicitly set.
  var hasOptionalBool: Bool {return _storage._optionalBool != nil}
  /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value.
  mutating func clearOptionalBool() {_uniqueStorage()._optionalBool = nil}

  var optionalString: String {
    get {return _storage._optionalString ?? String()}
    set {_uniqueStorage()._optionalString = newValue}
  }
  /// Returns true if `optionalString` has been explicitly set.
  var hasOptionalString: Bool {return _storage._optionalString != nil}
  /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
  mutating func clearOptionalString() {_uniqueStorage()._optionalString = nil}

  var optionalBytes: Data {
    get {return _storage._optionalBytes ?? Data()}
    set {_uniqueStorage()._optionalBytes = newValue}
  }
  /// Returns true if `optionalBytes` has been explicitly set.
  var hasOptionalBytes: Bool {return _storage._optionalBytes != nil}
  /// Clears the value of `optionalBytes`. Subsequent reads from it will return its default value.
  mutating func clearOptionalBytes() {_uniqueStorage()._optionalBytes = nil}

  var optionalNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage {
    get {return _storage._optionalNestedMessage ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.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: ProtobufTestMessages_Proto2_ForeignMessageProto2 {
    get {return _storage._optionalForeignMessage ?? ProtobufTestMessages_Proto2_ForeignMessageProto2()}
    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 optionalNestedEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum {
    get {return _storage._optionalNestedEnum ?? .foo}
    set {_uniqueStorage()._optionalNestedEnum = newValue}
  }
  /// Returns true if `optionalNestedEnum` has been explicitly set.
  var hasOptionalNestedEnum: Bool {return _storage._optionalNestedEnum != nil}
  /// Clears the value of `optionalNestedEnum`. Subsequent reads from it will return its default value.
  mutating func clearOptionalNestedEnum() {_uniqueStorage()._optionalNestedEnum = nil}

  var optionalForeignEnum: ProtobufTestMessages_Proto2_ForeignEnumProto2 {
    get {return _storage._optionalForeignEnum ?? .foreignFoo}
    set {_uniqueStorage()._optionalForeignEnum = newValue}
  }
  /// Returns true if `optionalForeignEnum` has been explicitly set.
  var hasOptionalForeignEnum: Bool {return _storage._optionalForeignEnum != nil}
  /// Clears the value of `optionalForeignEnum`. Subsequent reads from it will return its default value.
  mutating func clearOptionalForeignEnum() {_uniqueStorage()._optionalForeignEnum = nil}

  var optionalStringPiece: String {
    get {return _storage._optionalStringPiece ?? String()}
    set {_uniqueStorage()._optionalStringPiece = newValue}
  }
  /// Returns true if `optionalStringPiece` has been explicitly set.
  var hasOptionalStringPiece: Bool {return _storage._optionalStringPiece != nil}
  /// Clears the value of `optionalStringPiece`. Subsequent reads from it will return its default value.
  mutating func clearOptionalStringPiece() {_uniqueStorage()._optionalStringPiece = nil}

  var optionalCord: String {
    get {return _storage._optionalCord ?? String()}
    set {_uniqueStorage()._optionalCord = newValue}
  }
  /// Returns true if `optionalCord` has been explicitly set.
  var hasOptionalCord: Bool {return _storage._optionalCord != nil}
  /// Clears the value of `optionalCord`. Subsequent reads from it will return its default value.
  mutating func clearOptionalCord() {_uniqueStorage()._optionalCord = nil}

  var recursiveMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2 {
    get {return _storage._recursiveMessage ?? ProtobufTestMessages_Proto2_TestAllTypesProto2()}
    set {_uniqueStorage()._recursiveMessage = newValue}
  }
  /// Returns true if `recursiveMessage` has been explicitly set.
  var hasRecursiveMessage: Bool {return _storage._recursiveMessage != nil}
  /// Clears the value of `recursiveMessage`. Subsequent reads from it will return its default value.
  mutating func clearRecursiveMessage() {_uniqueStorage()._recursiveMessage = 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}
  }

  var repeatedNestedMessage: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage] {
    get {return _storage._repeatedNestedMessage}
    set {_uniqueStorage()._repeatedNestedMessage = newValue}
  }

  var repeatedForeignMessage: [ProtobufTestMessages_Proto2_ForeignMessageProto2] {
    get {return _storage._repeatedForeignMessage}
    set {_uniqueStorage()._repeatedForeignMessage = newValue}
  }

  var repeatedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] {
    get {return _storage._repeatedNestedEnum}
    set {_uniqueStorage()._repeatedNestedEnum = newValue}
  }

  var repeatedForeignEnum: [ProtobufTestMessages_Proto2_ForeignEnumProto2] {
    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}
  }

  /// Packed
  var packedInt32: [Int32] {
    get {return _storage._packedInt32}
    set {_uniqueStorage()._packedInt32 = newValue}
  }

  var packedInt64: [Int64] {
    get {return _storage._packedInt64}
    set {_uniqueStorage()._packedInt64 = newValue}
  }

  var packedUint32: [UInt32] {
    get {return _storage._packedUint32}
    set {_uniqueStorage()._packedUint32 = newValue}
  }

  var packedUint64: [UInt64] {
    get {return _storage._packedUint64}
    set {_uniqueStorage()._packedUint64 = newValue}
  }

  var packedSint32: [Int32] {
    get {return _storage._packedSint32}
    set {_uniqueStorage()._packedSint32 = newValue}
  }

  var packedSint64: [Int64] {
    get {return _storage._packedSint64}
    set {_uniqueStorage()._packedSint64 = newValue}
  }

  var packedFixed32: [UInt32] {
    get {return _storage._packedFixed32}
    set {_uniqueStorage()._packedFixed32 = newValue}
  }

  var packedFixed64: [UInt64] {
    get {return _storage._packedFixed64}
    set {_uniqueStorage()._packedFixed64 = newValue}
  }

  var packedSfixed32: [Int32] {
    get {return _storage._packedSfixed32}
    set {_uniqueStorage()._packedSfixed32 = newValue}
  }

  var packedSfixed64: [Int64] {
    get {return _storage._packedSfixed64}
    set {_uniqueStorage()._packedSfixed64 = newValue}
  }

  var packedFloat: [Float] {
    get {return _storage._packedFloat}
    set {_uniqueStorage()._packedFloat = newValue}
  }

  var packedDouble: [Double] {
    get {return _storage._packedDouble}
    set {_uniqueStorage()._packedDouble = newValue}
  }

  var packedBool: [Bool] {
    get {return _storage._packedBool}
    set {_uniqueStorage()._packedBool = newValue}
  }

  var packedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] {
    get {return _storage._packedNestedEnum}
    set {_uniqueStorage()._packedNestedEnum = newValue}
  }

  /// Unpacked
  var unpackedInt32: [Int32] {
    get {return _storage._unpackedInt32}
    set {_uniqueStorage()._unpackedInt32 = newValue}
  }

  var unpackedInt64: [Int64] {
    get {return _storage._unpackedInt64}
    set {_uniqueStorage()._unpackedInt64 = newValue}
  }

  var unpackedUint32: [UInt32] {
    get {return _storage._unpackedUint32}
    set {_uniqueStorage()._unpackedUint32 = newValue}
  }

  var unpackedUint64: [UInt64] {
    get {return _storage._unpackedUint64}
    set {_uniqueStorage()._unpackedUint64 = newValue}
  }

  var unpackedSint32: [Int32] {
    get {return _storage._unpackedSint32}
    set {_uniqueStorage()._unpackedSint32 = newValue}
  }

  var unpackedSint64: [Int64] {
    get {return _storage._unpackedSint64}
    set {_uniqueStorage()._unpackedSint64 = newValue}
  }

  var unpackedFixed32: [UInt32] {
    get {return _storage._unpackedFixed32}
    set {_uniqueStorage()._unpackedFixed32 = newValue}
  }

  var unpackedFixed64: [UInt64] {
    get {return _storage._unpackedFixed64}
    set {_uniqueStorage()._unpackedFixed64 = newValue}
  }

  var unpackedSfixed32: [Int32] {
    get {return _storage._unpackedSfixed32}
    set {_uniqueStorage()._unpackedSfixed32 = newValue}
  }

  var unpackedSfixed64: [Int64] {
    get {return _storage._unpackedSfixed64}
    set {_uniqueStorage()._unpackedSfixed64 = newValue}
  }

  var unpackedFloat: [Float] {
    get {return _storage._unpackedFloat}
    set {_uniqueStorage()._unpackedFloat = newValue}
  }

  var unpackedDouble: [Double] {
    get {return _storage._unpackedDouble}
    set {_uniqueStorage()._unpackedDouble = newValue}
  }

  var unpackedBool: [Bool] {
    get {return _storage._unpackedBool}
    set {_uniqueStorage()._unpackedBool = newValue}
  }

  var unpackedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] {
    get {return _storage._unpackedNestedEnum}
    set {_uniqueStorage()._unpackedNestedEnum = newValue}
  }

  /// Map
  var mapInt32Int32: Dictionary<Int32,Int32> {
    get {return _storage._mapInt32Int32}
    set {_uniqueStorage()._mapInt32Int32 = newValue}
  }

  var mapInt64Int64: Dictionary<Int64,Int64> {
    get {return _storage._mapInt64Int64}
    set {_uniqueStorage()._mapInt64Int64 = newValue}
  }

  var mapUint32Uint32: Dictionary<UInt32,UInt32> {
    get {return _storage._mapUint32Uint32}
    set {_uniqueStorage()._mapUint32Uint32 = newValue}
  }

  var mapUint64Uint64: Dictionary<UInt64,UInt64> {
    get {return _storage._mapUint64Uint64}
    set {_uniqueStorage()._mapUint64Uint64 = newValue}
  }

  var mapSint32Sint32: Dictionary<Int32,Int32> {
    get {return _storage._mapSint32Sint32}
    set {_uniqueStorage()._mapSint32Sint32 = newValue}
  }

  var mapSint64Sint64: Dictionary<Int64,Int64> {
    get {return _storage._mapSint64Sint64}
    set {_uniqueStorage()._mapSint64Sint64 = newValue}
  }

  var mapFixed32Fixed32: Dictionary<UInt32,UInt32> {
    get {return _storage._mapFixed32Fixed32}
    set {_uniqueStorage()._mapFixed32Fixed32 = newValue}
  }

  var mapFixed64Fixed64: Dictionary<UInt64,UInt64> {
    get {return _storage._mapFixed64Fixed64}
    set {_uniqueStorage()._mapFixed64Fixed64 = newValue}
  }

  var mapSfixed32Sfixed32: Dictionary<Int32,Int32> {
    get {return _storage._mapSfixed32Sfixed32}
    set {_uniqueStorage()._mapSfixed32Sfixed32 = newValue}
  }

  var mapSfixed64Sfixed64: Dictionary<Int64,Int64> {
    get {return _storage._mapSfixed64Sfixed64}
    set {_uniqueStorage()._mapSfixed64Sfixed64 = newValue}
  }

  var mapInt32Float: Dictionary<Int32,Float> {
    get {return _storage._mapInt32Float}
    set {_uniqueStorage()._mapInt32Float = newValue}
  }

  var mapInt32Double: Dictionary<Int32,Double> {
    get {return _storage._mapInt32Double}
    set {_uniqueStorage()._mapInt32Double = newValue}
  }

  var mapBoolBool: Dictionary<Bool,Bool> {
    get {return _storage._mapBoolBool}
    set {_uniqueStorage()._mapBoolBool = newValue}
  }

  var mapStringString: Dictionary<String,String> {
    get {return _storage._mapStringString}
    set {_uniqueStorage()._mapStringString = newValue}
  }

  var mapStringBytes: Dictionary<String,Data> {
    get {return _storage._mapStringBytes}
    set {_uniqueStorage()._mapStringBytes = newValue}
  }

  var mapStringNestedMessage: Dictionary<String,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage> {
    get {return _storage._mapStringNestedMessage}
    set {_uniqueStorage()._mapStringNestedMessage = newValue}
  }

  var mapStringForeignMessage: Dictionary<String,ProtobufTestMessages_Proto2_ForeignMessageProto2> {
    get {return _storage._mapStringForeignMessage}
    set {_uniqueStorage()._mapStringForeignMessage = newValue}
  }

  var mapStringNestedEnum: Dictionary<String,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum> {
    get {return _storage._mapStringNestedEnum}
    set {_uniqueStorage()._mapStringNestedEnum = newValue}
  }

  var mapStringForeignEnum: Dictionary<String,ProtobufTestMessages_Proto2_ForeignEnumProto2> {
    get {return _storage._mapStringForeignEnum}
    set {_uniqueStorage()._mapStringForeignEnum = 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: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage {
    get {
      if case .oneofNestedMessage(let v)? = _storage._oneofField {return v}
      return ProtobufTestMessages_Proto2_TestAllTypesProto2.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 oneofBool: Bool {
    get {
      if case .oneofBool(let v)? = _storage._oneofField {return v}
      return false
    }
    set {_uniqueStorage()._oneofField = .oneofBool(newValue)}
  }

  var oneofUint64: UInt64 {
    get {
      if case .oneofUint64(let v)? = _storage._oneofField {return v}
      return 0
    }
    set {_uniqueStorage()._oneofField = .oneofUint64(newValue)}
  }

  var oneofFloat: Float {
    get {
      if case .oneofFloat(let v)? = _storage._oneofField {return v}
      return 0
    }
    set {_uniqueStorage()._oneofField = .oneofFloat(newValue)}
  }

  var oneofDouble: Double {
    get {
      if case .oneofDouble(let v)? = _storage._oneofField {return v}
      return 0
    }
    set {_uniqueStorage()._oneofField = .oneofDouble(newValue)}
  }

  var oneofEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum {
    get {
      if case .oneofEnum(let v)? = _storage._oneofField {return v}
      return .foo
    }
    set {_uniqueStorage()._oneofField = .oneofEnum(newValue)}
  }

  var data: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage {
    get {return _storage._data ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage()}
    set {_uniqueStorage()._data = newValue}
  }
  /// Returns true if `data` has been explicitly set.
  var hasData: Bool {return _storage._data != nil}
  /// Clears the value of `data`. Subsequent reads from it will return its default value.
  mutating func clearData() {_uniqueStorage()._data = nil}

  /// Test field-name-to-JSON-name convention.
  /// (protobuf says names can be any valid C/C++ identifier.)
  var fieldname1: Int32 {
    get {return _storage._fieldname1 ?? 0}
    set {_uniqueStorage()._fieldname1 = newValue}
  }
  /// Returns true if `fieldname1` has been explicitly set.
  var hasFieldname1: Bool {return _storage._fieldname1 != nil}
  /// Clears the value of `fieldname1`. Subsequent reads from it will return its default value.
  mutating func clearFieldname1() {_uniqueStorage()._fieldname1 = nil}

  var fieldName2: Int32 {
    get {return _storage._fieldName2 ?? 0}
    set {_uniqueStorage()._fieldName2 = newValue}
  }
  /// Returns true if `fieldName2` has been explicitly set.
  var hasFieldName2: Bool {return _storage._fieldName2 != nil}
  /// Clears the value of `fieldName2`. Subsequent reads from it will return its default value.
  mutating func clearFieldName2() {_uniqueStorage()._fieldName2 = nil}

  var fieldName3: Int32 {
    get {return _storage._fieldName3 ?? 0}
    set {_uniqueStorage()._fieldName3 = newValue}
  }
  /// Returns true if `fieldName3` has been explicitly set.
  var hasFieldName3: Bool {return _storage._fieldName3 != nil}
  /// Clears the value of `fieldName3`. Subsequent reads from it will return its default value.
  mutating func clearFieldName3() {_uniqueStorage()._fieldName3 = nil}

  var field_Name4_: Int32 {
    get {return _storage._field_Name4_ ?? 0}
    set {_uniqueStorage()._field_Name4_ = newValue}
  }
  /// Returns true if `field_Name4_` has been explicitly set.
  var hasField_Name4_: Bool {return _storage._field_Name4_ != nil}
  /// Clears the value of `field_Name4_`. Subsequent reads from it will return its default value.
  mutating func clearField_Name4_() {_uniqueStorage()._field_Name4_ = nil}

  var field0Name5: Int32 {
    get {return _storage._field0Name5 ?? 0}
    set {_uniqueStorage()._field0Name5 = newValue}
  }
  /// Returns true if `field0Name5` has been explicitly set.
  var hasField0Name5: Bool {return _storage._field0Name5 != nil}
  /// Clears the value of `field0Name5`. Subsequent reads from it will return its default value.
  mutating func clearField0Name5() {_uniqueStorage()._field0Name5 = nil}

  var field0Name6: Int32 {
    get {return _storage._field0Name6 ?? 0}
    set {_uniqueStorage()._field0Name6 = newValue}
  }
  /// Returns true if `field0Name6` has been explicitly set.
  var hasField0Name6: Bool {return _storage._field0Name6 != nil}
  /// Clears the value of `field0Name6`. Subsequent reads from it will return its default value.
  mutating func clearField0Name6() {_uniqueStorage()._field0Name6 = nil}

  var fieldName7: Int32 {
    get {return _storage._fieldName7 ?? 0}
    set {_uniqueStorage()._fieldName7 = newValue}
  }
  /// Returns true if `fieldName7` has been explicitly set.
  var hasFieldName7: Bool {return _storage._fieldName7 != nil}
  /// Clears the value of `fieldName7`. Subsequent reads from it will return its default value.
  mutating func clearFieldName7() {_uniqueStorage()._fieldName7 = nil}

  var fieldName8: Int32 {
    get {return _storage._fieldName8 ?? 0}
    set {_uniqueStorage()._fieldName8 = newValue}
  }
  /// Returns true if `fieldName8` has been explicitly set.
  var hasFieldName8: Bool {return _storage._fieldName8 != nil}
  /// Clears the value of `fieldName8`. Subsequent reads from it will return its default value.
  mutating func clearFieldName8() {_uniqueStorage()._fieldName8 = nil}

  var fieldName9: Int32 {
    get {return _storage._fieldName9 ?? 0}
    set {_uniqueStorage()._fieldName9 = newValue}
  }
  /// Returns true if `fieldName9` has been explicitly set.
  var hasFieldName9: Bool {return _storage._fieldName9 != nil}
  /// Clears the value of `fieldName9`. Subsequent reads from it will return its default value.
  mutating func clearFieldName9() {_uniqueStorage()._fieldName9 = nil}

  var fieldName10: Int32 {
    get {return _storage._fieldName10 ?? 0}
    set {_uniqueStorage()._fieldName10 = newValue}
  }
  /// Returns true if `fieldName10` has been explicitly set.
  var hasFieldName10: Bool {return _storage._fieldName10 != nil}
  /// Clears the value of `fieldName10`. Subsequent reads from it will return its default value.
  mutating func clearFieldName10() {_uniqueStorage()._fieldName10 = nil}

  var fieldName11: Int32 {
    get {return _storage._fieldName11 ?? 0}
    set {_uniqueStorage()._fieldName11 = newValue}
  }
  /// Returns true if `fieldName11` has been explicitly set.
  var hasFieldName11: Bool {return _storage._fieldName11 != nil}
  /// Clears the value of `fieldName11`. Subsequent reads from it will return its default value.
  mutating func clearFieldName11() {_uniqueStorage()._fieldName11 = nil}

  var fieldName12: Int32 {
    get {return _storage._fieldName12 ?? 0}
    set {_uniqueStorage()._fieldName12 = newValue}
  }
  /// Returns true if `fieldName12` has been explicitly set.
  var hasFieldName12: Bool {return _storage._fieldName12 != nil}
  /// Clears the value of `fieldName12`. Subsequent reads from it will return its default value.
  mutating func clearFieldName12() {_uniqueStorage()._fieldName12 = nil}

  var _FieldName13: Int32 {
    get {return _storage.__FieldName13 ?? 0}
    set {_uniqueStorage().__FieldName13 = newValue}
  }
  /// Returns true if `_FieldName13` has been explicitly set.
  var has_FieldName13: Bool {return _storage.__FieldName13 != nil}
  /// Clears the value of `_FieldName13`. Subsequent reads from it will return its default value.
  mutating func clear_FieldName13() {_uniqueStorage().__FieldName13 = nil}

  var _FieldName14: Int32 {
    get {return _storage.__FieldName14 ?? 0}
    set {_uniqueStorage().__FieldName14 = newValue}
  }
  /// Returns true if `_FieldName14` has been explicitly set.
  var has_FieldName14: Bool {return _storage.__FieldName14 != nil}
  /// Clears the value of `_FieldName14`. Subsequent reads from it will return its default value.
  mutating func clear_FieldName14() {_uniqueStorage().__FieldName14 = nil}

  var field_Name15: Int32 {
    get {return _storage._field_Name15 ?? 0}
    set {_uniqueStorage()._field_Name15 = newValue}
  }
  /// Returns true if `field_Name15` has been explicitly set.
  var hasField_Name15: Bool {return _storage._field_Name15 != nil}
  /// Clears the value of `field_Name15`. Subsequent reads from it will return its default value.
  mutating func clearField_Name15() {_uniqueStorage()._field_Name15 = nil}

  var field_Name16: Int32 {
    get {return _storage._field_Name16 ?? 0}
    set {_uniqueStorage()._field_Name16 = newValue}
  }
  /// Returns true if `field_Name16` has been explicitly set.
  var hasField_Name16: Bool {return _storage._field_Name16 != nil}
  /// Clears the value of `field_Name16`. Subsequent reads from it will return its default value.
  mutating func clearField_Name16() {_uniqueStorage()._field_Name16 = nil}

  var fieldName17__: Int32 {
    get {return _storage._fieldName17__ ?? 0}
    set {_uniqueStorage()._fieldName17__ = newValue}
  }
  /// Returns true if `fieldName17__` has been explicitly set.
  var hasFieldName17__: Bool {return _storage._fieldName17__ != nil}
  /// Clears the value of `fieldName17__`. Subsequent reads from it will return its default value.
  mutating func clearFieldName17__() {_uniqueStorage()._fieldName17__ = nil}

  var fieldName18__: Int32 {
    get {return _storage._fieldName18__ ?? 0}
    set {_uniqueStorage()._fieldName18__ = newValue}
  }
  /// Returns true if `fieldName18__` has been explicitly set.
  var hasFieldName18__: Bool {return _storage._fieldName18__ != nil}
  /// Clears the value of `fieldName18__`. Subsequent reads from it will return its default value.
  mutating func clearFieldName18__() {_uniqueStorage()._fieldName18__ = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum OneOf_OneofField: Equatable {
    case oneofUint32(UInt32)
    case oneofNestedMessage(ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage)
    case oneofString(String)
    case oneofBytes(Data)
    case oneofBool(Bool)
    case oneofUint64(UInt64)
    case oneofFloat(Float)
    case oneofDouble(Double)
    case oneofEnum(ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum)

  #if !swift(>=4.1)
    static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField) -> Bool {
      switch (lhs, rhs) {
      case (.oneofUint32(let l), .oneofUint32(let r)): return l == r
      case (.oneofNestedMessage(let l), .oneofNestedMessage(let r)): return l == r
      case (.oneofString(let l), .oneofString(let r)): return l == r
      case (.oneofBytes(let l), .oneofBytes(let r)): return l == r
      case (.oneofBool(let l), .oneofBool(let r)): return l == r
      case (.oneofUint64(let l), .oneofUint64(let r)): return l == r
      case (.oneofFloat(let l), .oneofFloat(let r)): return l == r
      case (.oneofDouble(let l), .oneofDouble(let r)): return l == r
      case (.oneofEnum(let l), .oneofEnum(let r)): return l == r
      default: return false
      }
    }
  #endif
  }

  enum NestedEnum: SwiftProtobuf.Enum {
    typealias RawValue = Int
    case foo // = 0
    case bar // = 1
    case baz // = 2

    /// Intentionally negative.
    case neg // = -1

    init() {
      self = .foo
    }

    init?(rawValue: Int) {
      switch rawValue {
      case -1: self = .neg
      case 0: self = .foo
      case 1: self = .bar
      case 2: self = .baz
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .neg: return -1
      case .foo: return 0
      case .bar: return 1
      case .baz: return 2
      }
    }

  }

  struct NestedMessage {
    // 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 {return _storage._a ?? 0}
      set {_uniqueStorage()._a = newValue}
    }
    /// Returns true if `a` has been explicitly set.
    var hasA: Bool {return _storage._a != nil}
    /// Clears the value of `a`. Subsequent reads from it will return its default value.
    mutating func clearA() {_uniqueStorage()._a = nil}

    var corecursive: ProtobufTestMessages_Proto2_TestAllTypesProto2 {
      get {return _storage._corecursive ?? ProtobufTestMessages_Proto2_TestAllTypesProto2()}
      set {_uniqueStorage()._corecursive = newValue}
    }
    /// Returns true if `corecursive` has been explicitly set.
    var hasCorecursive: Bool {return _storage._corecursive != nil}
    /// Clears the value of `corecursive`. Subsequent reads from it will return its default value.
    mutating func clearCorecursive() {_uniqueStorage()._corecursive = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _storage = _StorageClass.defaultInstance
  }

  /// groups
  struct DataMessage {
    // 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 groupInt32: Int32 {
      get {return _groupInt32 ?? 0}
      set {_groupInt32 = newValue}
    }
    /// Returns true if `groupInt32` has been explicitly set.
    var hasGroupInt32: Bool {return self._groupInt32 != nil}
    /// Clears the value of `groupInt32`. Subsequent reads from it will return its default value.
    mutating func clearGroupInt32() {self._groupInt32 = nil}

    var groupUint32: UInt32 {
      get {return _groupUint32 ?? 0}
      set {_groupUint32 = newValue}
    }
    /// Returns true if `groupUint32` has been explicitly set.
    var hasGroupUint32: Bool {return self._groupUint32 != nil}
    /// Clears the value of `groupUint32`. Subsequent reads from it will return its default value.
    mutating func clearGroupUint32() {self._groupUint32 = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _groupInt32: Int32? = nil
    fileprivate var _groupUint32: UInt32? = nil
  }

  /// message_set test case.
  struct MessageSetCorrect: SwiftProtobuf.ExtensibleMessage {
    // 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() {}

    var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  }

  struct MessageSetCorrectExtension1 {
    // 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 str: String {
      get {return _str ?? String()}
      set {_str = newValue}
    }
    /// Returns true if `str` has been explicitly set.
    var hasStr: Bool {return self._str != nil}
    /// Clears the value of `str`. Subsequent reads from it will return its default value.
    mutating func clearStr() {self._str = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _str: String? = nil
  }

  struct MessageSetCorrectExtension2 {
    // 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 i: Int32 {
      get {return _i ?? 0}
      set {_i = newValue}
    }
    /// Returns true if `i` has been explicitly set.
    var hasI: Bool {return self._i != nil}
    /// Clears the value of `i`. Subsequent reads from it will return its default value.
    mutating func clearI() {self._i = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _i: Int32? = nil
  }

  init() {}

  var _protobuf_extensionFieldValues = SwiftProtobuf.ExtensionFieldValueSet()
  fileprivate var _storage = _StorageClass.defaultInstance
}

#if swift(>=4.2)

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum: CaseIterable {
  // Support synthesized by the compiler.
}

#endif  // swift(>=4.2)

struct ProtobufTestMessages_Proto2_ForeignMessageProto2 {
  // 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 {
    get {return _c ?? 0}
    set {_c = newValue}
  }
  /// Returns true if `c` has been explicitly set.
  var hasC: Bool {return self._c != nil}
  /// Clears the value of `c`. Subsequent reads from it will return its default value.
  mutating func clearC() {self._c = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _c: Int32? = nil
}

struct ProtobufTestMessages_Proto2_UnknownToTestAllTypes {
  // 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 optionalInt32: Int32 {
    get {return _optionalInt32 ?? 0}
    set {_optionalInt32 = newValue}
  }
  /// Returns true if `optionalInt32` has been explicitly set.
  var hasOptionalInt32: Bool {return self._optionalInt32 != nil}
  /// Clears the value of `optionalInt32`. Subsequent reads from it will return its default value.
  mutating func clearOptionalInt32() {self._optionalInt32 = nil}

  var optionalString: String {
    get {return _optionalString ?? String()}
    set {_optionalString = newValue}
  }
  /// Returns true if `optionalString` has been explicitly set.
  var hasOptionalString: Bool {return self._optionalString != nil}
  /// Clears the value of `optionalString`. Subsequent reads from it will return its default value.
  mutating func clearOptionalString() {self._optionalString = nil}

  var nestedMessage: ProtobufTestMessages_Proto2_ForeignMessageProto2 {
    get {return _nestedMessage ?? ProtobufTestMessages_Proto2_ForeignMessageProto2()}
    set {_nestedMessage = newValue}
  }
  /// Returns true if `nestedMessage` has been explicitly set.
  var hasNestedMessage: Bool {return self._nestedMessage != nil}
  /// Clears the value of `nestedMessage`. Subsequent reads from it will return its default value.
  mutating func clearNestedMessage() {self._nestedMessage = nil}

  var optionalGroup: ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup {
    get {return _optionalGroup ?? ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup()}
    set {_optionalGroup = newValue}
  }
  /// Returns true if `optionalGroup` has been explicitly set.
  var hasOptionalGroup: Bool {return self._optionalGroup != nil}
  /// Clears the value of `optionalGroup`. Subsequent reads from it will return its default value.
  mutating func clearOptionalGroup() {self._optionalGroup = nil}

  var optionalBool: Bool {
    get {return _optionalBool ?? false}
    set {_optionalBool = newValue}
  }
  /// Returns true if `optionalBool` has been explicitly set.
  var hasOptionalBool: Bool {return self._optionalBool != nil}
  /// Clears the value of `optionalBool`. Subsequent reads from it will return its default value.
  mutating func clearOptionalBool() {self._optionalBool = nil}

  var repeatedInt32: [Int32] = []

  var unknownFields = SwiftProtobuf.UnknownStorage()

  struct OptionalGroup {
    // 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 {return _a ?? 0}
      set {_a = newValue}
    }
    /// Returns true if `a` has been explicitly set.
    var hasA: Bool {return 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
  }

  init() {}

  fileprivate var _optionalInt32: Int32? = nil
  fileprivate var _optionalString: String? = nil
  fileprivate var _nestedMessage: ProtobufTestMessages_Proto2_ForeignMessageProto2? = nil
  fileprivate var _optionalGroup: ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup? = nil
  fileprivate var _optionalBool: Bool? = nil
}

// MARK: - Extension support defined in test_messages_proto2.proto.

// MARK: - Extension Properties

// Swift Extensions on the exteneded 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 ProtobufTestMessages_Proto2_TestAllTypesProto2 {

  var ProtobufTestMessages_Proto2_extensionInt32: Int32 {
    get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32) ?? 0}
    set {setExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32, value: newValue)}
  }
  /// Returns true if extension `ProtobufTestMessages_Proto2_Extensions_extension_int32`
  /// has been explicitly set.
  var hasProtobufTestMessages_Proto2_extensionInt32: Bool {
    return hasExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32)
  }
  /// Clears the value of extension `ProtobufTestMessages_Proto2_Extensions_extension_int32`.
  /// Subsequent reads from it will return its default value.
  mutating func clearProtobufTestMessages_Proto2_extensionInt32() {
    clearExtensionValue(ext: ProtobufTestMessages_Proto2_Extensions_extension_int32)
  }
}

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect {

  var ProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1 {
    get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1()}
    set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension, value: newValue)}
  }
  /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension`
  /// has been explicitly set.
  var hasProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension: Bool {
    return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension)
  }
  /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension`.
  /// Subsequent reads from it will return its default value.
  mutating func clearProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension1_messageSetExtension() {
    clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension)
  }

  var ProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2 {
    get {return getExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension) ?? ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2()}
    set {setExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension, value: newValue)}
  }
  /// Returns true if extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension`
  /// has been explicitly set.
  var hasProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension: Bool {
    return hasExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension)
  }
  /// Clears the value of extension `ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension`.
  /// Subsequent reads from it will return its default value.
  mutating func clearProtobufTestMessages_Proto2_TestAllTypesProto2_MessageSetCorrectExtension2_messageSetExtension() {
    clearExtensionValue(ext: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension)
  }

}

// MARK: - File's ExtensionMap: ProtobufTestMessages_Proto2_TestMessagesProto2_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 ProtobufTestMessages_Proto2_TestMessagesProto2_Extensions: SwiftProtobuf.SimpleExtensionMap = [
  ProtobufTestMessages_Proto2_Extensions_extension_int32,
  ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1.Extensions.message_set_extension,
  ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2.Extensions.message_set_extension
]

// 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 ProtobufTestMessages_Proto2_Extensions_extension_int32 = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalExtensionField<SwiftProtobuf.ProtobufInt32>, ProtobufTestMessages_Proto2_TestAllTypesProto2>(
  _protobuf_fieldNumber: 120,
  fieldName: "protobuf_test_messages.proto2.extension_int32"
)

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1 {
  enum Extensions {
    static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1>, ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect>(
      _protobuf_fieldNumber: 1547769,
      fieldName: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1"
    )
  }
}

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2 {
  enum Extensions {
    static let message_set_extension = SwiftProtobuf.MessageExtension<SwiftProtobuf.OptionalMessageExtensionField<ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2>, ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect>(
      _protobuf_fieldNumber: 4135312,
      fieldName: "protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2"
    )
  }
}

// MARK: - Code below here is support for the SwiftProtobuf runtime.

fileprivate let _protobuf_package = "protobuf_test_messages.proto2"

extension ProtobufTestMessages_Proto2_ForeignEnumProto2: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "FOREIGN_FOO"),
    1: .same(proto: "FOREIGN_BAR"),
    2: .same(proto: "FOREIGN_BAZ"),
  ]
}

extension ProtobufTestMessages_Proto2_TestAllTypesProto2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".TestAllTypesProto2"
  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"),
    21: .standard(proto: "optional_nested_enum"),
    22: .standard(proto: "optional_foreign_enum"),
    24: .standard(proto: "optional_string_piece"),
    25: .standard(proto: "optional_cord"),
    27: .standard(proto: "recursive_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"),
    48: .standard(proto: "repeated_nested_message"),
    49: .standard(proto: "repeated_foreign_message"),
    51: .standard(proto: "repeated_nested_enum"),
    52: .standard(proto: "repeated_foreign_enum"),
    54: .standard(proto: "repeated_string_piece"),
    55: .standard(proto: "repeated_cord"),
    75: .standard(proto: "packed_int32"),
    76: .standard(proto: "packed_int64"),
    77: .standard(proto: "packed_uint32"),
    78: .standard(proto: "packed_uint64"),
    79: .standard(proto: "packed_sint32"),
    80: .standard(proto: "packed_sint64"),
    81: .standard(proto: "packed_fixed32"),
    82: .standard(proto: "packed_fixed64"),
    83: .standard(proto: "packed_sfixed32"),
    84: .standard(proto: "packed_sfixed64"),
    85: .standard(proto: "packed_float"),
    86: .standard(proto: "packed_double"),
    87: .standard(proto: "packed_bool"),
    88: .standard(proto: "packed_nested_enum"),
    89: .standard(proto: "unpacked_int32"),
    90: .standard(proto: "unpacked_int64"),
    91: .standard(proto: "unpacked_uint32"),
    92: .standard(proto: "unpacked_uint64"),
    93: .standard(proto: "unpacked_sint32"),
    94: .standard(proto: "unpacked_sint64"),
    95: .standard(proto: "unpacked_fixed32"),
    96: .standard(proto: "unpacked_fixed64"),
    97: .standard(proto: "unpacked_sfixed32"),
    98: .standard(proto: "unpacked_sfixed64"),
    99: .standard(proto: "unpacked_float"),
    100: .standard(proto: "unpacked_double"),
    101: .standard(proto: "unpacked_bool"),
    102: .standard(proto: "unpacked_nested_enum"),
    56: .standard(proto: "map_int32_int32"),
    57: .standard(proto: "map_int64_int64"),
    58: .standard(proto: "map_uint32_uint32"),
    59: .standard(proto: "map_uint64_uint64"),
    60: .standard(proto: "map_sint32_sint32"),
    61: .standard(proto: "map_sint64_sint64"),
    62: .standard(proto: "map_fixed32_fixed32"),
    63: .standard(proto: "map_fixed64_fixed64"),
    64: .standard(proto: "map_sfixed32_sfixed32"),
    65: .standard(proto: "map_sfixed64_sfixed64"),
    66: .standard(proto: "map_int32_float"),
    67: .standard(proto: "map_int32_double"),
    68: .standard(proto: "map_bool_bool"),
    69: .standard(proto: "map_string_string"),
    70: .standard(proto: "map_string_bytes"),
    71: .standard(proto: "map_string_nested_message"),
    72: .standard(proto: "map_string_foreign_message"),
    73: .standard(proto: "map_string_nested_enum"),
    74: .standard(proto: "map_string_foreign_enum"),
    111: .standard(proto: "oneof_uint32"),
    112: .standard(proto: "oneof_nested_message"),
    113: .standard(proto: "oneof_string"),
    114: .standard(proto: "oneof_bytes"),
    115: .standard(proto: "oneof_bool"),
    116: .standard(proto: "oneof_uint64"),
    117: .standard(proto: "oneof_float"),
    118: .standard(proto: "oneof_double"),
    119: .standard(proto: "oneof_enum"),
    201: .unique(proto: "Data", json: "data"),
    401: .same(proto: "fieldname1"),
    402: .standard(proto: "field_name2"),
    403: .standard(proto: "_field_name3"),
    404: .standard(proto: "field__name4_"),
    405: .same(proto: "field0name5"),
    406: .standard(proto: "field_0_name6"),
    407: .same(proto: "fieldName7"),
    408: .same(proto: "FieldName8"),
    409: .standard(proto: "field_Name9"),
    410: .standard(proto: "Field_Name10"),
    411: .standard(proto: "FIELD_NAME11"),
    412: .standard(proto: "FIELD_name12"),
    413: .standard(proto: "__field_name13"),
    414: .standard(proto: "__Field_name14"),
    415: .standard(proto: "field__name15"),
    416: .standard(proto: "field__Name16"),
    417: .standard(proto: "field_name17__"),
    418: .standard(proto: "Field_name18__"),
  ]

  fileprivate class _StorageClass {
    var _optionalInt32: Int32? = nil
    var _optionalInt64: Int64? = nil
    var _optionalUint32: UInt32? = nil
    var _optionalUint64: UInt64? = nil
    var _optionalSint32: Int32? = nil
    var _optionalSint64: Int64? = nil
    var _optionalFixed32: UInt32? = nil
    var _optionalFixed64: UInt64? = nil
    var _optionalSfixed32: Int32? = nil
    var _optionalSfixed64: Int64? = nil
    var _optionalFloat: Float? = nil
    var _optionalDouble: Double? = nil
    var _optionalBool: Bool? = nil
    var _optionalString: String? = nil
    var _optionalBytes: Data? = nil
    var _optionalNestedMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage? = nil
    var _optionalForeignMessage: ProtobufTestMessages_Proto2_ForeignMessageProto2? = nil
    var _optionalNestedEnum: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum? = nil
    var _optionalForeignEnum: ProtobufTestMessages_Proto2_ForeignEnumProto2? = nil
    var _optionalStringPiece: String? = nil
    var _optionalCord: String? = nil
    var _recursiveMessage: ProtobufTestMessages_Proto2_TestAllTypesProto2? = 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 _repeatedNestedMessage: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage] = []
    var _repeatedForeignMessage: [ProtobufTestMessages_Proto2_ForeignMessageProto2] = []
    var _repeatedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] = []
    var _repeatedForeignEnum: [ProtobufTestMessages_Proto2_ForeignEnumProto2] = []
    var _repeatedStringPiece: [String] = []
    var _repeatedCord: [String] = []
    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 _packedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] = []
    var _unpackedInt32: [Int32] = []
    var _unpackedInt64: [Int64] = []
    var _unpackedUint32: [UInt32] = []
    var _unpackedUint64: [UInt64] = []
    var _unpackedSint32: [Int32] = []
    var _unpackedSint64: [Int64] = []
    var _unpackedFixed32: [UInt32] = []
    var _unpackedFixed64: [UInt64] = []
    var _unpackedSfixed32: [Int32] = []
    var _unpackedSfixed64: [Int64] = []
    var _unpackedFloat: [Float] = []
    var _unpackedDouble: [Double] = []
    var _unpackedBool: [Bool] = []
    var _unpackedNestedEnum: [ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum] = []
    var _mapInt32Int32: Dictionary<Int32,Int32> = [:]
    var _mapInt64Int64: Dictionary<Int64,Int64> = [:]
    var _mapUint32Uint32: Dictionary<UInt32,UInt32> = [:]
    var _mapUint64Uint64: Dictionary<UInt64,UInt64> = [:]
    var _mapSint32Sint32: Dictionary<Int32,Int32> = [:]
    var _mapSint64Sint64: Dictionary<Int64,Int64> = [:]
    var _mapFixed32Fixed32: Dictionary<UInt32,UInt32> = [:]
    var _mapFixed64Fixed64: Dictionary<UInt64,UInt64> = [:]
    var _mapSfixed32Sfixed32: Dictionary<Int32,Int32> = [:]
    var _mapSfixed64Sfixed64: Dictionary<Int64,Int64> = [:]
    var _mapInt32Float: Dictionary<Int32,Float> = [:]
    var _mapInt32Double: Dictionary<Int32,Double> = [:]
    var _mapBoolBool: Dictionary<Bool,Bool> = [:]
    var _mapStringString: Dictionary<String,String> = [:]
    var _mapStringBytes: Dictionary<String,Data> = [:]
    var _mapStringNestedMessage: Dictionary<String,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage> = [:]
    var _mapStringForeignMessage: Dictionary<String,ProtobufTestMessages_Proto2_ForeignMessageProto2> = [:]
    var _mapStringNestedEnum: Dictionary<String,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum> = [:]
    var _mapStringForeignEnum: Dictionary<String,ProtobufTestMessages_Proto2_ForeignEnumProto2> = [:]
    var _oneofField: ProtobufTestMessages_Proto2_TestAllTypesProto2.OneOf_OneofField?
    var _data: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage? = nil
    var _fieldname1: Int32? = nil
    var _fieldName2: Int32? = nil
    var _fieldName3: Int32? = nil
    var _field_Name4_: Int32? = nil
    var _field0Name5: Int32? = nil
    var _field0Name6: Int32? = nil
    var _fieldName7: Int32? = nil
    var _fieldName8: Int32? = nil
    var _fieldName9: Int32? = nil
    var _fieldName10: Int32? = nil
    var _fieldName11: Int32? = nil
    var _fieldName12: Int32? = nil
    var __FieldName13: Int32? = nil
    var __FieldName14: Int32? = nil
    var _field_Name15: Int32? = nil
    var _field_Name16: Int32? = nil
    var _fieldName17__: Int32? = nil
    var _fieldName18__: Int32? = nil

    static 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
      _optionalNestedEnum = source._optionalNestedEnum
      _optionalForeignEnum = source._optionalForeignEnum
      _optionalStringPiece = source._optionalStringPiece
      _optionalCord = source._optionalCord
      _recursiveMessage = source._recursiveMessage
      _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
      _repeatedNestedMessage = source._repeatedNestedMessage
      _repeatedForeignMessage = source._repeatedForeignMessage
      _repeatedNestedEnum = source._repeatedNestedEnum
      _repeatedForeignEnum = source._repeatedForeignEnum
      _repeatedStringPiece = source._repeatedStringPiece
      _repeatedCord = source._repeatedCord
      _packedInt32 = source._packedInt32
      _packedInt64 = source._packedInt64
      _packedUint32 = source._packedUint32
      _packedUint64 = source._packedUint64
      _packedSint32 = source._packedSint32
      _packedSint64 = source._packedSint64
      _packedFixed32 = source._packedFixed32
      _packedFixed64 = source._packedFixed64
      _packedSfixed32 = source._packedSfixed32
      _packedSfixed64 = source._packedSfixed64
      _packedFloat = source._packedFloat
      _packedDouble = source._packedDouble
      _packedBool = source._packedBool
      _packedNestedEnum = source._packedNestedEnum
      _unpackedInt32 = source._unpackedInt32
      _unpackedInt64 = source._unpackedInt64
      _unpackedUint32 = source._unpackedUint32
      _unpackedUint64 = source._unpackedUint64
      _unpackedSint32 = source._unpackedSint32
      _unpackedSint64 = source._unpackedSint64
      _unpackedFixed32 = source._unpackedFixed32
      _unpackedFixed64 = source._unpackedFixed64
      _unpackedSfixed32 = source._unpackedSfixed32
      _unpackedSfixed64 = source._unpackedSfixed64
      _unpackedFloat = source._unpackedFloat
      _unpackedDouble = source._unpackedDouble
      _unpackedBool = source._unpackedBool
      _unpackedNestedEnum = source._unpackedNestedEnum
      _mapInt32Int32 = source._mapInt32Int32
      _mapInt64Int64 = source._mapInt64Int64
      _mapUint32Uint32 = source._mapUint32Uint32
      _mapUint64Uint64 = source._mapUint64Uint64
      _mapSint32Sint32 = source._mapSint32Sint32
      _mapSint64Sint64 = source._mapSint64Sint64
      _mapFixed32Fixed32 = source._mapFixed32Fixed32
      _mapFixed64Fixed64 = source._mapFixed64Fixed64
      _mapSfixed32Sfixed32 = source._mapSfixed32Sfixed32
      _mapSfixed64Sfixed64 = source._mapSfixed64Sfixed64
      _mapInt32Float = source._mapInt32Float
      _mapInt32Double = source._mapInt32Double
      _mapBoolBool = source._mapBoolBool
      _mapStringString = source._mapStringString
      _mapStringBytes = source._mapStringBytes
      _mapStringNestedMessage = source._mapStringNestedMessage
      _mapStringForeignMessage = source._mapStringForeignMessage
      _mapStringNestedEnum = source._mapStringNestedEnum
      _mapStringForeignEnum = source._mapStringForeignEnum
      _oneofField = source._oneofField
      _data = source._data
      _fieldname1 = source._fieldname1
      _fieldName2 = source._fieldName2
      _fieldName3 = source._fieldName3
      _field_Name4_ = source._field_Name4_
      _field0Name5 = source._field0Name5
      _field0Name6 = source._field0Name6
      _fieldName7 = source._fieldName7
      _fieldName8 = source._fieldName8
      _fieldName9 = source._fieldName9
      _fieldName10 = source._fieldName10
      _fieldName11 = source._fieldName11
      _fieldName12 = source._fieldName12
      __FieldName13 = source.__FieldName13
      __FieldName14 = source.__FieldName14
      _field_Name15 = source._field_Name15
      _field_Name16 = source._field_Name16
      _fieldName17__ = source._fieldName17__
      _fieldName18__ = source._fieldName18__
    }
  }

  fileprivate mutating func _uniqueStorage() -> _StorageClass {
    if !isKnownUniquelyReferenced(&_storage) {
      _storage = _StorageClass(copying: _storage)
    }
    return _storage
  }

  public var isInitialized: Bool {
    if !_protobuf_extensionFieldValues.isInitialized {return false}
    return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._optionalNestedMessage, !v.isInitialized {return false}
      if let v = _storage._recursiveMessage, !v.isInitialized {return false}
      if !SwiftProtobuf.Internal.areAllInitialized(_storage._repeatedNestedMessage) {return false}
      if !SwiftProtobuf.Internal.areAllInitialized(_storage._mapStringNestedMessage) {return false}
      if case .oneofNestedMessage(let v)? = _storage._oneofField, !v.isInitialized {return false}
      return true
    }
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularInt32Field(value: &_storage._optionalInt32)
        case 2: try decoder.decodeSingularInt64Field(value: &_storage._optionalInt64)
        case 3: try decoder.decodeSingularUInt32Field(value: &_storage._optionalUint32)
        case 4: try decoder.decodeSingularUInt64Field(value: &_storage._optionalUint64)
        case 5: try decoder.decodeSingularSInt32Field(value: &_storage._optionalSint32)
        case 6: try decoder.decodeSingularSInt64Field(value: &_storage._optionalSint64)
        case 7: try decoder.decodeSingularFixed32Field(value: &_storage._optionalFixed32)
        case 8: try decoder.decodeSingularFixed64Field(value: &_storage._optionalFixed64)
        case 9: try decoder.decodeSingularSFixed32Field(value: &_storage._optionalSfixed32)
        case 10: try decoder.decodeSingularSFixed64Field(value: &_storage._optionalSfixed64)
        case 11: try decoder.decodeSingularFloatField(value: &_storage._optionalFloat)
        case 12: try decoder.decodeSingularDoubleField(value: &_storage._optionalDouble)
        case 13: try decoder.decodeSingularBoolField(value: &_storage._optionalBool)
        case 14: try decoder.decodeSingularStringField(value: &_storage._optionalString)
        case 15: try decoder.decodeSingularBytesField(value: &_storage._optionalBytes)
        case 18: try decoder.decodeSingularMessageField(value: &_storage._optionalNestedMessage)
        case 19: try decoder.decodeSingularMessageField(value: &_storage._optionalForeignMessage)
        case 21: try decoder.decodeSingularEnumField(value: &_storage._optionalNestedEnum)
        case 22: try decoder.decodeSingularEnumField(value: &_storage._optionalForeignEnum)
        case 24: try decoder.decodeSingularStringField(value: &_storage._optionalStringPiece)
        case 25: try decoder.decodeSingularStringField(value: &_storage._optionalCord)
        case 27: try decoder.decodeSingularMessageField(value: &_storage._recursiveMessage)
        case 31: try decoder.decodeRepeatedInt32Field(value: &_storage._repeatedInt32)
        case 32: try decoder.decodeRepeatedInt64Field(value: &_storage._repeatedInt64)
        case 33: try decoder.decodeRepeatedUInt32Field(value: &_storage._repeatedUint32)
        case 34: try decoder.decodeRepeatedUInt64Field(value: &_storage._repeatedUint64)
        case 35: try decoder.decodeRepeatedSInt32Field(value: &_storage._repeatedSint32)
        case 36: try decoder.decodeRepeatedSInt64Field(value: &_storage._repeatedSint64)
        case 37: try decoder.decodeRepeatedFixed32Field(value: &_storage._repeatedFixed32)
        case 38: try decoder.decodeRepeatedFixed64Field(value: &_storage._repeatedFixed64)
        case 39: try decoder.decodeRepeatedSFixed32Field(value: &_storage._repeatedSfixed32)
        case 40: try decoder.decodeRepeatedSFixed64Field(value: &_storage._repeatedSfixed64)
        case 41: try decoder.decodeRepeatedFloatField(value: &_storage._repeatedFloat)
        case 42: try decoder.decodeRepeatedDoubleField(value: &_storage._repeatedDouble)
        case 43: try decoder.decodeRepeatedBoolField(value: &_storage._repeatedBool)
        case 44: try decoder.decodeRepeatedStringField(value: &_storage._repeatedString)
        case 45: try decoder.decodeRepeatedBytesField(value: &_storage._repeatedBytes)
        case 48: try decoder.decodeRepeatedMessageField(value: &_storage._repeatedNestedMessage)
        case 49: try decoder.decodeRepeatedMessageField(value: &_storage._repeatedForeignMessage)
        case 51: try decoder.decodeRepeatedEnumField(value: &_storage._repeatedNestedEnum)
        case 52: try decoder.decodeRepeatedEnumField(value: &_storage._repeatedForeignEnum)
        case 54: try decoder.decodeRepeatedStringField(value: &_storage._repeatedStringPiece)
        case 55: try decoder.decodeRepeatedStringField(value: &_storage._repeatedCord)
        case 56: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &_storage._mapInt32Int32)
        case 57: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: &_storage._mapInt64Int64)
        case 58: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: &_storage._mapUint32Uint32)
        case 59: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: &_storage._mapUint64Uint64)
        case 60: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: &_storage._mapSint32Sint32)
        case 61: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: &_storage._mapSint64Sint64)
        case 62: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: &_storage._mapFixed32Fixed32)
        case 63: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: &_storage._mapFixed64Fixed64)
        case 64: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: &_storage._mapSfixed32Sfixed32)
        case 65: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: &_storage._mapSfixed64Sfixed64)
        case 66: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: &_storage._mapInt32Float)
        case 67: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: &_storage._mapInt32Double)
        case 68: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: &_storage._mapBoolBool)
        case 69: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &_storage._mapStringString)
        case 70: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: &_storage._mapStringBytes)
        case 71: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage>.self, value: &_storage._mapStringNestedMessage)
        case 72: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_ForeignMessageProto2>.self, value: &_storage._mapStringForeignMessage)
        case 73: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum>.self, value: &_storage._mapStringNestedEnum)
        case 74: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_ForeignEnumProto2>.self, value: &_storage._mapStringForeignEnum)
        case 75: try decoder.decodeRepeatedInt32Field(value: &_storage._packedInt32)
        case 76: try decoder.decodeRepeatedInt64Field(value: &_storage._packedInt64)
        case 77: try decoder.decodeRepeatedUInt32Field(value: &_storage._packedUint32)
        case 78: try decoder.decodeRepeatedUInt64Field(value: &_storage._packedUint64)
        case 79: try decoder.decodeRepeatedSInt32Field(value: &_storage._packedSint32)
        case 80: try decoder.decodeRepeatedSInt64Field(value: &_storage._packedSint64)
        case 81: try decoder.decodeRepeatedFixed32Field(value: &_storage._packedFixed32)
        case 82: try decoder.decodeRepeatedFixed64Field(value: &_storage._packedFixed64)
        case 83: try decoder.decodeRepeatedSFixed32Field(value: &_storage._packedSfixed32)
        case 84: try decoder.decodeRepeatedSFixed64Field(value: &_storage._packedSfixed64)
        case 85: try decoder.decodeRepeatedFloatField(value: &_storage._packedFloat)
        case 86: try decoder.decodeRepeatedDoubleField(value: &_storage._packedDouble)
        case 87: try decoder.decodeRepeatedBoolField(value: &_storage._packedBool)
        case 88: try decoder.decodeRepeatedEnumField(value: &_storage._packedNestedEnum)
        case 89: try decoder.decodeRepeatedInt32Field(value: &_storage._unpackedInt32)
        case 90: try decoder.decodeRepeatedInt64Field(value: &_storage._unpackedInt64)
        case 91: try decoder.decodeRepeatedUInt32Field(value: &_storage._unpackedUint32)
        case 92: try decoder.decodeRepeatedUInt64Field(value: &_storage._unpackedUint64)
        case 93: try decoder.decodeRepeatedSInt32Field(value: &_storage._unpackedSint32)
        case 94: try decoder.decodeRepeatedSInt64Field(value: &_storage._unpackedSint64)
        case 95: try decoder.decodeRepeatedFixed32Field(value: &_storage._unpackedFixed32)
        case 96: try decoder.decodeRepeatedFixed64Field(value: &_storage._unpackedFixed64)
        case 97: try decoder.decodeRepeatedSFixed32Field(value: &_storage._unpackedSfixed32)
        case 98: try decoder.decodeRepeatedSFixed64Field(value: &_storage._unpackedSfixed64)
        case 99: try decoder.decodeRepeatedFloatField(value: &_storage._unpackedFloat)
        case 100: try decoder.decodeRepeatedDoubleField(value: &_storage._unpackedDouble)
        case 101: try decoder.decodeRepeatedBoolField(value: &_storage._unpackedBool)
        case 102: try decoder.decodeRepeatedEnumField(value: &_storage._unpackedNestedEnum)
        case 111:
          if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
          var v: UInt32?
          try decoder.decodeSingularUInt32Field(value: &v)
          if let v = v {_storage._oneofField = .oneofUint32(v)}
        case 112:
          var v: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage?
          if let current = _storage._oneofField {
            try decoder.handleConflictingOneOf()
            if case .oneofNestedMessage(let m) = current {v = m}
          }
          try decoder.decodeSingularMessageField(value: &v)
          if let v = v {_storage._oneofField = .oneofNestedMessage(v)}
        case 113:
          if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
          var v: String?
          try decoder.decodeSingularStringField(value: &v)
          if let v = v {_storage._oneofField = .oneofString(v)}
        case 114:
          if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
          var v: Data?
          try decoder.decodeSingularBytesField(value: &v)
          if let v = v {_storage._oneofField = .oneofBytes(v)}
        case 115:
          if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
          var v: Bool?
          try decoder.decodeSingularBoolField(value: &v)
          if let v = v {_storage._oneofField = .oneofBool(v)}
        case 116:
          if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
          var v: UInt64?
          try decoder.decodeSingularUInt64Field(value: &v)
          if let v = v {_storage._oneofField = .oneofUint64(v)}
        case 117:
          if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
          var v: Float?
          try decoder.decodeSingularFloatField(value: &v)
          if let v = v {_storage._oneofField = .oneofFloat(v)}
        case 118:
          if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
          var v: Double?
          try decoder.decodeSingularDoubleField(value: &v)
          if let v = v {_storage._oneofField = .oneofDouble(v)}
        case 119:
          if _storage._oneofField != nil {try decoder.handleConflictingOneOf()}
          var v: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum?
          try decoder.decodeSingularEnumField(value: &v)
          if let v = v {_storage._oneofField = .oneofEnum(v)}
        case 201: try decoder.decodeSingularGroupField(value: &_storage._data)
        case 401: try decoder.decodeSingularInt32Field(value: &_storage._fieldname1)
        case 402: try decoder.decodeSingularInt32Field(value: &_storage._fieldName2)
        case 403: try decoder.decodeSingularInt32Field(value: &_storage._fieldName3)
        case 404: try decoder.decodeSingularInt32Field(value: &_storage._field_Name4_)
        case 405: try decoder.decodeSingularInt32Field(value: &_storage._field0Name5)
        case 406: try decoder.decodeSingularInt32Field(value: &_storage._field0Name6)
        case 407: try decoder.decodeSingularInt32Field(value: &_storage._fieldName7)
        case 408: try decoder.decodeSingularInt32Field(value: &_storage._fieldName8)
        case 409: try decoder.decodeSingularInt32Field(value: &_storage._fieldName9)
        case 410: try decoder.decodeSingularInt32Field(value: &_storage._fieldName10)
        case 411: try decoder.decodeSingularInt32Field(value: &_storage._fieldName11)
        case 412: try decoder.decodeSingularInt32Field(value: &_storage._fieldName12)
        case 413: try decoder.decodeSingularInt32Field(value: &_storage.__FieldName13)
        case 414: try decoder.decodeSingularInt32Field(value: &_storage.__FieldName14)
        case 415: try decoder.decodeSingularInt32Field(value: &_storage._field_Name15)
        case 416: try decoder.decodeSingularInt32Field(value: &_storage._field_Name16)
        case 417: try decoder.decodeSingularInt32Field(value: &_storage._fieldName17__)
        case 418: try decoder.decodeSingularInt32Field(value: &_storage._fieldName18__)
        case 120..<201:
          try decoder.decodeExtensionField(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Proto2_TestAllTypesProto2.self, fieldNumber: fieldNumber)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._optionalInt32 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
      }
      if let v = _storage._optionalInt64 {
        try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
      }
      if let v = _storage._optionalUint32 {
        try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
      }
      if let v = _storage._optionalUint64 {
        try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
      }
      if let v = _storage._optionalSint32 {
        try visitor.visitSingularSInt32Field(value: v, fieldNumber: 5)
      }
      if let v = _storage._optionalSint64 {
        try visitor.visitSingularSInt64Field(value: v, fieldNumber: 6)
      }
      if let v = _storage._optionalFixed32 {
        try visitor.visitSingularFixed32Field(value: v, fieldNumber: 7)
      }
      if let v = _storage._optionalFixed64 {
        try visitor.visitSingularFixed64Field(value: v, fieldNumber: 8)
      }
      if let v = _storage._optionalSfixed32 {
        try visitor.visitSingularSFixed32Field(value: v, fieldNumber: 9)
      }
      if let v = _storage._optionalSfixed64 {
        try visitor.visitSingularSFixed64Field(value: v, fieldNumber: 10)
      }
      if let v = _storage._optionalFloat {
        try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
      }
      if let v = _storage._optionalDouble {
        try visitor.visitSingularDoubleField(value: v, fieldNumber: 12)
      }
      if let v = _storage._optionalBool {
        try visitor.visitSingularBoolField(value: v, fieldNumber: 13)
      }
      if let v = _storage._optionalString {
        try visitor.visitSingularStringField(value: v, fieldNumber: 14)
      }
      if let v = _storage._optionalBytes {
        try visitor.visitSingularBytesField(value: v, fieldNumber: 15)
      }
      if let v = _storage._optionalNestedMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 18)
      }
      if let v = _storage._optionalForeignMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 19)
      }
      if let v = _storage._optionalNestedEnum {
        try visitor.visitSingularEnumField(value: v, fieldNumber: 21)
      }
      if let v = _storage._optionalForeignEnum {
        try visitor.visitSingularEnumField(value: v, fieldNumber: 22)
      }
      if let v = _storage._optionalStringPiece {
        try visitor.visitSingularStringField(value: v, fieldNumber: 24)
      }
      if let v = _storage._optionalCord {
        try visitor.visitSingularStringField(value: v, fieldNumber: 25)
      }
      if let v = _storage._recursiveMessage {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 27)
      }
      if !_storage._repeatedInt32.isEmpty {
        try visitor.visitRepeatedInt32Field(value: _storage._repeatedInt32, fieldNumber: 31)
      }
      if !_storage._repeatedInt64.isEmpty {
        try visitor.visitRepeatedInt64Field(value: _storage._repeatedInt64, fieldNumber: 32)
      }
      if !_storage._repeatedUint32.isEmpty {
        try visitor.visitRepeatedUInt32Field(value: _storage._repeatedUint32, fieldNumber: 33)
      }
      if !_storage._repeatedUint64.isEmpty {
        try visitor.visitRepeatedUInt64Field(value: _storage._repeatedUint64, fieldNumber: 34)
      }
      if !_storage._repeatedSint32.isEmpty {
        try visitor.visitRepeatedSInt32Field(value: _storage._repeatedSint32, fieldNumber: 35)
      }
      if !_storage._repeatedSint64.isEmpty {
        try visitor.visitRepeatedSInt64Field(value: _storage._repeatedSint64, fieldNumber: 36)
      }
      if !_storage._repeatedFixed32.isEmpty {
        try visitor.visitRepeatedFixed32Field(value: _storage._repeatedFixed32, fieldNumber: 37)
      }
      if !_storage._repeatedFixed64.isEmpty {
        try visitor.visitRepeatedFixed64Field(value: _storage._repeatedFixed64, fieldNumber: 38)
      }
      if !_storage._repeatedSfixed32.isEmpty {
        try visitor.visitRepeatedSFixed32Field(value: _storage._repeatedSfixed32, fieldNumber: 39)
      }
      if !_storage._repeatedSfixed64.isEmpty {
        try visitor.visitRepeatedSFixed64Field(value: _storage._repeatedSfixed64, fieldNumber: 40)
      }
      if !_storage._repeatedFloat.isEmpty {
        try visitor.visitRepeatedFloatField(value: _storage._repeatedFloat, fieldNumber: 41)
      }
      if !_storage._repeatedDouble.isEmpty {
        try visitor.visitRepeatedDoubleField(value: _storage._repeatedDouble, fieldNumber: 42)
      }
      if !_storage._repeatedBool.isEmpty {
        try visitor.visitRepeatedBoolField(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._repeatedNestedEnum.isEmpty {
        try visitor.visitRepeatedEnumField(value: _storage._repeatedNestedEnum, fieldNumber: 51)
      }
      if !_storage._repeatedForeignEnum.isEmpty {
        try visitor.visitRepeatedEnumField(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._mapInt32Int32.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: _storage._mapInt32Int32, fieldNumber: 56)
      }
      if !_storage._mapInt64Int64.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt64,SwiftProtobuf.ProtobufInt64>.self, value: _storage._mapInt64Int64, fieldNumber: 57)
      }
      if !_storage._mapUint32Uint32.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt32,SwiftProtobuf.ProtobufUInt32>.self, value: _storage._mapUint32Uint32, fieldNumber: 58)
      }
      if !_storage._mapUint64Uint64.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufUInt64,SwiftProtobuf.ProtobufUInt64>.self, value: _storage._mapUint64Uint64, fieldNumber: 59)
      }
      if !_storage._mapSint32Sint32.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt32,SwiftProtobuf.ProtobufSInt32>.self, value: _storage._mapSint32Sint32, fieldNumber: 60)
      }
      if !_storage._mapSint64Sint64.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSInt64,SwiftProtobuf.ProtobufSInt64>.self, value: _storage._mapSint64Sint64, fieldNumber: 61)
      }
      if !_storage._mapFixed32Fixed32.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed32,SwiftProtobuf.ProtobufFixed32>.self, value: _storage._mapFixed32Fixed32, fieldNumber: 62)
      }
      if !_storage._mapFixed64Fixed64.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufFixed64,SwiftProtobuf.ProtobufFixed64>.self, value: _storage._mapFixed64Fixed64, fieldNumber: 63)
      }
      if !_storage._mapSfixed32Sfixed32.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed32,SwiftProtobuf.ProtobufSFixed32>.self, value: _storage._mapSfixed32Sfixed32, fieldNumber: 64)
      }
      if !_storage._mapSfixed64Sfixed64.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufSFixed64,SwiftProtobuf.ProtobufSFixed64>.self, value: _storage._mapSfixed64Sfixed64, fieldNumber: 65)
      }
      if !_storage._mapInt32Float.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufFloat>.self, value: _storage._mapInt32Float, fieldNumber: 66)
      }
      if !_storage._mapInt32Double.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufDouble>.self, value: _storage._mapInt32Double, fieldNumber: 67)
      }
      if !_storage._mapBoolBool.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufBool,SwiftProtobuf.ProtobufBool>.self, value: _storage._mapBoolBool, fieldNumber: 68)
      }
      if !_storage._mapStringString.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: _storage._mapStringString, fieldNumber: 69)
      }
      if !_storage._mapStringBytes.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: _storage._mapStringBytes, fieldNumber: 70)
      }
      if !_storage._mapStringNestedMessage.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage>.self, value: _storage._mapStringNestedMessage, fieldNumber: 71)
      }
      if !_storage._mapStringForeignMessage.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_ForeignMessageProto2>.self, value: _storage._mapStringForeignMessage, fieldNumber: 72)
      }
      if !_storage._mapStringNestedEnum.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum>.self, value: _storage._mapStringNestedEnum, fieldNumber: 73)
      }
      if !_storage._mapStringForeignEnum.isEmpty {
        try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufEnumMap<SwiftProtobuf.ProtobufString,ProtobufTestMessages_Proto2_ForeignEnumProto2>.self, value: _storage._mapStringForeignEnum, fieldNumber: 74)
      }
      if !_storage._packedInt32.isEmpty {
        try visitor.visitPackedInt32Field(value: _storage._packedInt32, fieldNumber: 75)
      }
      if !_storage._packedInt64.isEmpty {
        try visitor.visitPackedInt64Field(value: _storage._packedInt64, fieldNumber: 76)
      }
      if !_storage._packedUint32.isEmpty {
        try visitor.visitPackedUInt32Field(value: _storage._packedUint32, fieldNumber: 77)
      }
      if !_storage._packedUint64.isEmpty {
        try visitor.visitPackedUInt64Field(value: _storage._packedUint64, fieldNumber: 78)
      }
      if !_storage._packedSint32.isEmpty {
        try visitor.visitPackedSInt32Field(value: _storage._packedSint32, fieldNumber: 79)
      }
      if !_storage._packedSint64.isEmpty {
        try visitor.visitPackedSInt64Field(value: _storage._packedSint64, fieldNumber: 80)
      }
      if !_storage._packedFixed32.isEmpty {
        try visitor.visitPackedFixed32Field(value: _storage._packedFixed32, fieldNumber: 81)
      }
      if !_storage._packedFixed64.isEmpty {
        try visitor.visitPackedFixed64Field(value: _storage._packedFixed64, fieldNumber: 82)
      }
      if !_storage._packedSfixed32.isEmpty {
        try visitor.visitPackedSFixed32Field(value: _storage._packedSfixed32, fieldNumber: 83)
      }
      if !_storage._packedSfixed64.isEmpty {
        try visitor.visitPackedSFixed64Field(value: _storage._packedSfixed64, fieldNumber: 84)
      }
      if !_storage._packedFloat.isEmpty {
        try visitor.visitPackedFloatField(value: _storage._packedFloat, fieldNumber: 85)
      }
      if !_storage._packedDouble.isEmpty {
        try visitor.visitPackedDoubleField(value: _storage._packedDouble, fieldNumber: 86)
      }
      if !_storage._packedBool.isEmpty {
        try visitor.visitPackedBoolField(value: _storage._packedBool, fieldNumber: 87)
      }
      if !_storage._packedNestedEnum.isEmpty {
        try visitor.visitPackedEnumField(value: _storage._packedNestedEnum, fieldNumber: 88)
      }
      if !_storage._unpackedInt32.isEmpty {
        try visitor.visitRepeatedInt32Field(value: _storage._unpackedInt32, fieldNumber: 89)
      }
      if !_storage._unpackedInt64.isEmpty {
        try visitor.visitRepeatedInt64Field(value: _storage._unpackedInt64, fieldNumber: 90)
      }
      if !_storage._unpackedUint32.isEmpty {
        try visitor.visitRepeatedUInt32Field(value: _storage._unpackedUint32, fieldNumber: 91)
      }
      if !_storage._unpackedUint64.isEmpty {
        try visitor.visitRepeatedUInt64Field(value: _storage._unpackedUint64, fieldNumber: 92)
      }
      if !_storage._unpackedSint32.isEmpty {
        try visitor.visitRepeatedSInt32Field(value: _storage._unpackedSint32, fieldNumber: 93)
      }
      if !_storage._unpackedSint64.isEmpty {
        try visitor.visitRepeatedSInt64Field(value: _storage._unpackedSint64, fieldNumber: 94)
      }
      if !_storage._unpackedFixed32.isEmpty {
        try visitor.visitRepeatedFixed32Field(value: _storage._unpackedFixed32, fieldNumber: 95)
      }
      if !_storage._unpackedFixed64.isEmpty {
        try visitor.visitRepeatedFixed64Field(value: _storage._unpackedFixed64, fieldNumber: 96)
      }
      if !_storage._unpackedSfixed32.isEmpty {
        try visitor.visitRepeatedSFixed32Field(value: _storage._unpackedSfixed32, fieldNumber: 97)
      }
      if !_storage._unpackedSfixed64.isEmpty {
        try visitor.visitRepeatedSFixed64Field(value: _storage._unpackedSfixed64, fieldNumber: 98)
      }
      if !_storage._unpackedFloat.isEmpty {
        try visitor.visitRepeatedFloatField(value: _storage._unpackedFloat, fieldNumber: 99)
      }
      if !_storage._unpackedDouble.isEmpty {
        try visitor.visitRepeatedDoubleField(value: _storage._unpackedDouble, fieldNumber: 100)
      }
      if !_storage._unpackedBool.isEmpty {
        try visitor.visitRepeatedBoolField(value: _storage._unpackedBool, fieldNumber: 101)
      }
      if !_storage._unpackedNestedEnum.isEmpty {
        try visitor.visitRepeatedEnumField(value: _storage._unpackedNestedEnum, fieldNumber: 102)
      }
      switch _storage._oneofField {
      case .oneofUint32(let v)?:
        try visitor.visitSingularUInt32Field(value: v, fieldNumber: 111)
      case .oneofNestedMessage(let v)?:
        try visitor.visitSingularMessageField(value: v, fieldNumber: 112)
      case .oneofString(let v)?:
        try visitor.visitSingularStringField(value: v, fieldNumber: 113)
      case .oneofBytes(let v)?:
        try visitor.visitSingularBytesField(value: v, fieldNumber: 114)
      case .oneofBool(let v)?:
        try visitor.visitSingularBoolField(value: v, fieldNumber: 115)
      case .oneofUint64(let v)?:
        try visitor.visitSingularUInt64Field(value: v, fieldNumber: 116)
      case .oneofFloat(let v)?:
        try visitor.visitSingularFloatField(value: v, fieldNumber: 117)
      case .oneofDouble(let v)?:
        try visitor.visitSingularDoubleField(value: v, fieldNumber: 118)
      case .oneofEnum(let v)?:
        try visitor.visitSingularEnumField(value: v, fieldNumber: 119)
      case nil: break
      }
      try visitor.visitExtensionFields(fields: _protobuf_extensionFieldValues, start: 120, end: 201)
      if let v = _storage._data {
        try visitor.visitSingularGroupField(value: v, fieldNumber: 201)
      }
      if let v = _storage._fieldname1 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 401)
      }
      if let v = _storage._fieldName2 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 402)
      }
      if let v = _storage._fieldName3 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 403)
      }
      if let v = _storage._field_Name4_ {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 404)
      }
      if let v = _storage._field0Name5 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 405)
      }
      if let v = _storage._field0Name6 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 406)
      }
      if let v = _storage._fieldName7 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 407)
      }
      if let v = _storage._fieldName8 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 408)
      }
      if let v = _storage._fieldName9 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 409)
      }
      if let v = _storage._fieldName10 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 410)
      }
      if let v = _storage._fieldName11 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 411)
      }
      if let v = _storage._fieldName12 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 412)
      }
      if let v = _storage.__FieldName13 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 413)
      }
      if let v = _storage.__FieldName14 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 414)
      }
      if let v = _storage._field_Name15 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 415)
      }
      if let v = _storage._field_Name16 {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 416)
      }
      if let v = _storage._fieldName17__ {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 417)
      }
      if let v = _storage._fieldName18__ {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 418)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2) -> 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._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._recursiveMessage != rhs_storage._recursiveMessage {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._repeatedNestedMessage != rhs_storage._repeatedNestedMessage {return false}
        if _storage._repeatedForeignMessage != rhs_storage._repeatedForeignMessage {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._packedInt32 != rhs_storage._packedInt32 {return false}
        if _storage._packedInt64 != rhs_storage._packedInt64 {return false}
        if _storage._packedUint32 != rhs_storage._packedUint32 {return false}
        if _storage._packedUint64 != rhs_storage._packedUint64 {return false}
        if _storage._packedSint32 != rhs_storage._packedSint32 {return false}
        if _storage._packedSint64 != rhs_storage._packedSint64 {return false}
        if _storage._packedFixed32 != rhs_storage._packedFixed32 {return false}
        if _storage._packedFixed64 != rhs_storage._packedFixed64 {return false}
        if _storage._packedSfixed32 != rhs_storage._packedSfixed32 {return false}
        if _storage._packedSfixed64 != rhs_storage._packedSfixed64 {return false}
        if _storage._packedFloat != rhs_storage._packedFloat {return false}
        if _storage._packedDouble != rhs_storage._packedDouble {return false}
        if _storage._packedBool != rhs_storage._packedBool {return false}
        if _storage._packedNestedEnum != rhs_storage._packedNestedEnum {return false}
        if _storage._unpackedInt32 != rhs_storage._unpackedInt32 {return false}
        if _storage._unpackedInt64 != rhs_storage._unpackedInt64 {return false}
        if _storage._unpackedUint32 != rhs_storage._unpackedUint32 {return false}
        if _storage._unpackedUint64 != rhs_storage._unpackedUint64 {return false}
        if _storage._unpackedSint32 != rhs_storage._unpackedSint32 {return false}
        if _storage._unpackedSint64 != rhs_storage._unpackedSint64 {return false}
        if _storage._unpackedFixed32 != rhs_storage._unpackedFixed32 {return false}
        if _storage._unpackedFixed64 != rhs_storage._unpackedFixed64 {return false}
        if _storage._unpackedSfixed32 != rhs_storage._unpackedSfixed32 {return false}
        if _storage._unpackedSfixed64 != rhs_storage._unpackedSfixed64 {return false}
        if _storage._unpackedFloat != rhs_storage._unpackedFloat {return false}
        if _storage._unpackedDouble != rhs_storage._unpackedDouble {return false}
        if _storage._unpackedBool != rhs_storage._unpackedBool {return false}
        if _storage._unpackedNestedEnum != rhs_storage._unpackedNestedEnum {return false}
        if _storage._mapInt32Int32 != rhs_storage._mapInt32Int32 {return false}
        if _storage._mapInt64Int64 != rhs_storage._mapInt64Int64 {return false}
        if _storage._mapUint32Uint32 != rhs_storage._mapUint32Uint32 {return false}
        if _storage._mapUint64Uint64 != rhs_storage._mapUint64Uint64 {return false}
        if _storage._mapSint32Sint32 != rhs_storage._mapSint32Sint32 {return false}
        if _storage._mapSint64Sint64 != rhs_storage._mapSint64Sint64 {return false}
        if _storage._mapFixed32Fixed32 != rhs_storage._mapFixed32Fixed32 {return false}
        if _storage._mapFixed64Fixed64 != rhs_storage._mapFixed64Fixed64 {return false}
        if _storage._mapSfixed32Sfixed32 != rhs_storage._mapSfixed32Sfixed32 {return false}
        if _storage._mapSfixed64Sfixed64 != rhs_storage._mapSfixed64Sfixed64 {return false}
        if _storage._mapInt32Float != rhs_storage._mapInt32Float {return false}
        if _storage._mapInt32Double != rhs_storage._mapInt32Double {return false}
        if _storage._mapBoolBool != rhs_storage._mapBoolBool {return false}
        if _storage._mapStringString != rhs_storage._mapStringString {return false}
        if _storage._mapStringBytes != rhs_storage._mapStringBytes {return false}
        if _storage._mapStringNestedMessage != rhs_storage._mapStringNestedMessage {return false}
        if _storage._mapStringForeignMessage != rhs_storage._mapStringForeignMessage {return false}
        if _storage._mapStringNestedEnum != rhs_storage._mapStringNestedEnum {return false}
        if _storage._mapStringForeignEnum != rhs_storage._mapStringForeignEnum {return false}
        if _storage._oneofField != rhs_storage._oneofField {return false}
        if _storage._data != rhs_storage._data {return false}
        if _storage._fieldname1 != rhs_storage._fieldname1 {return false}
        if _storage._fieldName2 != rhs_storage._fieldName2 {return false}
        if _storage._fieldName3 != rhs_storage._fieldName3 {return false}
        if _storage._field_Name4_ != rhs_storage._field_Name4_ {return false}
        if _storage._field0Name5 != rhs_storage._field0Name5 {return false}
        if _storage._field0Name6 != rhs_storage._field0Name6 {return false}
        if _storage._fieldName7 != rhs_storage._fieldName7 {return false}
        if _storage._fieldName8 != rhs_storage._fieldName8 {return false}
        if _storage._fieldName9 != rhs_storage._fieldName9 {return false}
        if _storage._fieldName10 != rhs_storage._fieldName10 {return false}
        if _storage._fieldName11 != rhs_storage._fieldName11 {return false}
        if _storage._fieldName12 != rhs_storage._fieldName12 {return false}
        if _storage.__FieldName13 != rhs_storage.__FieldName13 {return false}
        if _storage.__FieldName14 != rhs_storage.__FieldName14 {return false}
        if _storage._field_Name15 != rhs_storage._field_Name15 {return false}
        if _storage._field_Name16 != rhs_storage._field_Name16 {return false}
        if _storage._fieldName17__ != rhs_storage._fieldName17__ {return false}
        if _storage._fieldName18__ != rhs_storage._fieldName18__ {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if lhs.unknownFields != rhs.unknownFields {return false}
    if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
    return true
  }
}

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    -1: .same(proto: "NEG"),
    0: .same(proto: "FOO"),
    1: .same(proto: "BAR"),
    2: .same(proto: "BAZ"),
  ]
}

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".NestedMessage"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "a"),
    2: .same(proto: "corecursive"),
  ]

  fileprivate class _StorageClass {
    var _a: Int32? = nil
    var _corecursive: ProtobufTestMessages_Proto2_TestAllTypesProto2? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _a = source._a
      _corecursive = source._corecursive
    }
  }

  fileprivate mutating func _uniqueStorage() -> _StorageClass {
    if !isKnownUniquelyReferenced(&_storage) {
      _storage = _StorageClass(copying: _storage)
    }
    return _storage
  }

  public var isInitialized: Bool {
    return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._corecursive, !v.isInitialized {return false}
      return true
    }
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularInt32Field(value: &_storage._a)
        case 2: try decoder.decodeSingularMessageField(value: &_storage._corecursive)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._a {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
      }
      if let v = _storage._corecursive {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.NestedMessage) -> 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._a != rhs_storage._a {return false}
        if _storage._corecursive != rhs_storage._corecursive {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".Data"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    202: .standard(proto: "group_int32"),
    203: .standard(proto: "group_uint32"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 202: try decoder.decodeSingularInt32Field(value: &self._groupInt32)
      case 203: try decoder.decodeSingularUInt32Field(value: &self._groupUint32)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._groupInt32 {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 202)
    }
    if let v = self._groupUint32 {
      try visitor.visitSingularUInt32Field(value: v, fieldNumber: 203)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.DataMessage) -> Bool {
    if lhs._groupInt32 != rhs._groupInt32 {return false}
    if lhs._groupUint32 != rhs._groupUint32 {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrect"
  static let _protobuf_nameMap = SwiftProtobuf._NameMap()

  public var isInitialized: Bool {
    if !_protobuf_extensionFieldValues.isInitialized {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    try decoder.decodeExtensionFieldsAsMessageSet(values: &_protobuf_extensionFieldValues, messageType: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect.self)
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try visitor.visitExtensionFieldsAsMessageSet(fields: _protobuf_extensionFieldValues, start: 4, end: 2147483647)
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrect) -> Bool {
    if lhs.unknownFields != rhs.unknownFields {return false}
    if lhs._protobuf_extensionFieldValues != rhs._protobuf_extensionFieldValues {return false}
    return true
  }
}

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrectExtension1"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    25: .same(proto: "str"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 25: try decoder.decodeSingularStringField(value: &self._str)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._str {
      try visitor.visitSingularStringField(value: v, fieldNumber: 25)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension1) -> Bool {
    if lhs._str != rhs._str {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = ProtobufTestMessages_Proto2_TestAllTypesProto2.protoMessageName + ".MessageSetCorrectExtension2"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    9: .same(proto: "i"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 9: try decoder.decodeSingularInt32Field(value: &self._i)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._i {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 9)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2, rhs: ProtobufTestMessages_Proto2_TestAllTypesProto2.MessageSetCorrectExtension2) -> Bool {
    if lhs._i != rhs._i {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension ProtobufTestMessages_Proto2_ForeignMessageProto2: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".ForeignMessageProto2"
  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() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularInt32Field(value: &self._c)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._c {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: ProtobufTestMessages_Proto2_ForeignMessageProto2, rhs: ProtobufTestMessages_Proto2_ForeignMessageProto2) -> Bool {
    if lhs._c != rhs._c {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension ProtobufTestMessages_Proto2_UnknownToTestAllTypes: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".UnknownToTestAllTypes"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1001: .standard(proto: "optional_int32"),
    1002: .standard(proto: "optional_string"),
    1003: .standard(proto: "nested_message"),
    1004: .unique(proto: "OptionalGroup", json: "optionalgroup"),
    1006: .standard(proto: "optional_bool"),
    1011: .standard(proto: "repeated_int32"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1001: try decoder.decodeSingularInt32Field(value: &self._optionalInt32)
      case 1002: try decoder.decodeSingularStringField(value: &self._optionalString)
      case 1003: try decoder.decodeSingularMessageField(value: &self._nestedMessage)
      case 1004: try decoder.decodeSingularGroupField(value: &self._optionalGroup)
      case 1006: try decoder.decodeSingularBoolField(value: &self._optionalBool)
      case 1011: try decoder.decodeRepeatedInt32Field(value: &self.repeatedInt32)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._optionalInt32 {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 1001)
    }
    if let v = self._optionalString {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1002)
    }
    if let v = self._nestedMessage {
      try visitor.visitSingularMessageField(value: v, fieldNumber: 1003)
    }
    if let v = self._optionalGroup {
      try visitor.visitSingularGroupField(value: v, fieldNumber: 1004)
    }
    if let v = self._optionalBool {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 1006)
    }
    if !self.repeatedInt32.isEmpty {
      try visitor.visitRepeatedInt32Field(value: self.repeatedInt32, fieldNumber: 1011)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: ProtobufTestMessages_Proto2_UnknownToTestAllTypes, rhs: ProtobufTestMessages_Proto2_UnknownToTestAllTypes) -> Bool {
    if lhs._optionalInt32 != rhs._optionalInt32 {return false}
    if lhs._optionalString != rhs._optionalString {return false}
    if lhs._nestedMessage != rhs._nestedMessage {return false}
    if lhs._optionalGroup != rhs._optionalGroup {return false}
    if lhs._optionalBool != rhs._optionalBool {return false}
    if lhs.repeatedInt32 != rhs.repeatedInt32 {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}

extension ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = ProtobufTestMessages_Proto2_UnknownToTestAllTypes.protoMessageName + ".OptionalGroup"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "a"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularInt32Field(value: &self._a)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._a {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  static func ==(lhs: ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup, rhs: ProtobufTestMessages_Proto2_UnknownToTestAllTypes.OptionalGroup) -> Bool {
    if lhs._a != rhs._a {return false}
    if lhs.unknownFields != rhs.unknownFields {return false}
    return true
  }
}
