/// Generated by the Protocol Buffers 3.6.0 compiler.  DO NOT EDIT!
/// Protobuf-swift version: 4.0.0
/// Source file "unittest_proto3_arena.proto"
/// Syntax "Proto3"

import Foundation
import ProtocolBuffers


public struct Proto3ArenaUnittest { }

public extension Proto3ArenaUnittest {
    public struct UnittestProto3ArenaRoot {
        public static let `default` = UnittestProto3ArenaRoot()
        public var extensionRegistry:ExtensionRegistry

        init() {
            extensionRegistry = ExtensionRegistry()
            registerAllExtensions(registry: extensionRegistry)
            ProtobufUnittestImport.UnittestImportRoot.default.registerAllExtensions(registry: extensionRegistry)
        }
        public func registerAllExtensions(registry: ExtensionRegistry) {
        }
    }



    //Enum type declaration start 

    public enum ForeignEnum:Int32, GeneratedEnum {
        case foreignZero = 0
        case foreignFoo = 4
        case foreignBar = 5
        case foreignBaz = 6
        public func toString() -> String {
            switch self {
            case .foreignZero: return "FOREIGN_ZERO"
            case .foreignFoo: return "FOREIGN_FOO"
            case .foreignBar: return "FOREIGN_BAR"
            case .foreignBaz: return "FOREIGN_BAZ"
            }
        }
        public static func fromString(_ str:String) throws -> Proto3ArenaUnittest.ForeignEnum {
            switch str {
            case "FOREIGN_ZERO":    return .foreignZero
            case "FOREIGN_FOO":    return .foreignFoo
            case "FOREIGN_BAR":    return .foreignBar
            case "FOREIGN_BAZ":    return .foreignBaz
            default: throw ProtocolBuffersError.invalidProtocolBuffer("Conversion failed.")
            }
        }
        public var debugDescription:String { return getDescription() }
        public var description:String { return getDescription() }
        private func getDescription() -> String { 
            switch self {
            case .foreignZero: return ".foreignZero"
            case .foreignFoo: return ".foreignFoo"
            case .foreignBar: return ".foreignBar"
            case .foreignBaz: return ".foreignBaz"
            }
        }
        public var hashValue:Int {
            return self.rawValue.hashValue
        }
        public static func ==(lhs:ForeignEnum, rhs:ForeignEnum) -> Bool {
            return lhs.hashValue == rhs.hashValue
        }
    }

    //Enum type declaration end 

    /// This proto includes every type of field in both singular and repeated
    /// forms.
    final public class TestAllTypes : GeneratedMessage {
        public typealias BuilderType = Proto3ArenaUnittest.TestAllTypes.Builder

        public static func == (lhs: Proto3ArenaUnittest.TestAllTypes, rhs: Proto3ArenaUnittest.TestAllTypes) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasOptionalInt32 == rhs.hasOptionalInt32) && (!lhs.hasOptionalInt32 || lhs.optionalInt32 == rhs.optionalInt32)
            fieldCheck = fieldCheck && (lhs.hasOptionalInt64 == rhs.hasOptionalInt64) && (!lhs.hasOptionalInt64 || lhs.optionalInt64 == rhs.optionalInt64)
            fieldCheck = fieldCheck && (lhs.hasOptionalUint32 == rhs.hasOptionalUint32) && (!lhs.hasOptionalUint32 || lhs.optionalUint32 == rhs.optionalUint32)
            fieldCheck = fieldCheck && (lhs.hasOptionalUint64 == rhs.hasOptionalUint64) && (!lhs.hasOptionalUint64 || lhs.optionalUint64 == rhs.optionalUint64)
            fieldCheck = fieldCheck && (lhs.hasOptionalSint32 == rhs.hasOptionalSint32) && (!lhs.hasOptionalSint32 || lhs.optionalSint32 == rhs.optionalSint32)
            fieldCheck = fieldCheck && (lhs.hasOptionalSint64 == rhs.hasOptionalSint64) && (!lhs.hasOptionalSint64 || lhs.optionalSint64 == rhs.optionalSint64)
            fieldCheck = fieldCheck && (lhs.hasOptionalFixed32 == rhs.hasOptionalFixed32) && (!lhs.hasOptionalFixed32 || lhs.optionalFixed32 == rhs.optionalFixed32)
            fieldCheck = fieldCheck && (lhs.hasOptionalFixed64 == rhs.hasOptionalFixed64) && (!lhs.hasOptionalFixed64 || lhs.optionalFixed64 == rhs.optionalFixed64)
            fieldCheck = fieldCheck && (lhs.hasOptionalSfixed32 == rhs.hasOptionalSfixed32) && (!lhs.hasOptionalSfixed32 || lhs.optionalSfixed32 == rhs.optionalSfixed32)
            fieldCheck = fieldCheck && (lhs.hasOptionalSfixed64 == rhs.hasOptionalSfixed64) && (!lhs.hasOptionalSfixed64 || lhs.optionalSfixed64 == rhs.optionalSfixed64)
            fieldCheck = fieldCheck && (lhs.hasOptionalFloat == rhs.hasOptionalFloat) && (!lhs.hasOptionalFloat || lhs.optionalFloat == rhs.optionalFloat)
            fieldCheck = fieldCheck && (lhs.hasOptionalDouble == rhs.hasOptionalDouble) && (!lhs.hasOptionalDouble || lhs.optionalDouble == rhs.optionalDouble)
            fieldCheck = fieldCheck && (lhs.hasOptionalBool == rhs.hasOptionalBool) && (!lhs.hasOptionalBool || lhs.optionalBool == rhs.optionalBool)
            fieldCheck = fieldCheck && (lhs.hasOptionalString == rhs.hasOptionalString) && (!lhs.hasOptionalString || lhs.optionalString == rhs.optionalString)
            fieldCheck = fieldCheck && (lhs.hasOptionalBytes == rhs.hasOptionalBytes) && (!lhs.hasOptionalBytes || lhs.optionalBytes == rhs.optionalBytes)
            fieldCheck = fieldCheck && (lhs.hasOptionalNestedMessage == rhs.hasOptionalNestedMessage) && (!lhs.hasOptionalNestedMessage || lhs.optionalNestedMessage == rhs.optionalNestedMessage)
            fieldCheck = fieldCheck && (lhs.hasOptionalForeignMessage == rhs.hasOptionalForeignMessage) && (!lhs.hasOptionalForeignMessage || lhs.optionalForeignMessage == rhs.optionalForeignMessage)
            fieldCheck = fieldCheck && (lhs.hasOptionalImportMessage == rhs.hasOptionalImportMessage) && (!lhs.hasOptionalImportMessage || lhs.optionalImportMessage == rhs.optionalImportMessage)
            fieldCheck = fieldCheck && (lhs.hasOptionalNestedEnum == rhs.hasOptionalNestedEnum) && (!lhs.hasOptionalNestedEnum || lhs.optionalNestedEnum == rhs.optionalNestedEnum)
            fieldCheck = fieldCheck && (lhs.hasOptionalForeignEnum == rhs.hasOptionalForeignEnum) && (!lhs.hasOptionalForeignEnum || lhs.optionalForeignEnum == rhs.optionalForeignEnum)
            fieldCheck = fieldCheck && (lhs.hasOptionalStringPiece == rhs.hasOptionalStringPiece) && (!lhs.hasOptionalStringPiece || lhs.optionalStringPiece == rhs.optionalStringPiece)
            fieldCheck = fieldCheck && (lhs.hasOptionalCord == rhs.hasOptionalCord) && (!lhs.hasOptionalCord || lhs.optionalCord == rhs.optionalCord)
            fieldCheck = fieldCheck && (lhs.hasOptionalPublicImportMessage == rhs.hasOptionalPublicImportMessage) && (!lhs.hasOptionalPublicImportMessage || lhs.optionalPublicImportMessage == rhs.optionalPublicImportMessage)
            fieldCheck = fieldCheck && (lhs.hasOptionalLazyMessage == rhs.hasOptionalLazyMessage) && (!lhs.hasOptionalLazyMessage || lhs.optionalLazyMessage == rhs.optionalLazyMessage)
            fieldCheck = fieldCheck && (lhs.repeatedInt32 == rhs.repeatedInt32)
            fieldCheck = fieldCheck && (lhs.repeatedInt64 == rhs.repeatedInt64)
            fieldCheck = fieldCheck && (lhs.repeatedUint32 == rhs.repeatedUint32)
            fieldCheck = fieldCheck && (lhs.repeatedUint64 == rhs.repeatedUint64)
            fieldCheck = fieldCheck && (lhs.repeatedSint32 == rhs.repeatedSint32)
            fieldCheck = fieldCheck && (lhs.repeatedSint64 == rhs.repeatedSint64)
            fieldCheck = fieldCheck && (lhs.repeatedFixed32 == rhs.repeatedFixed32)
            fieldCheck = fieldCheck && (lhs.repeatedFixed64 == rhs.repeatedFixed64)
            fieldCheck = fieldCheck && (lhs.repeatedSfixed32 == rhs.repeatedSfixed32)
            fieldCheck = fieldCheck && (lhs.repeatedSfixed64 == rhs.repeatedSfixed64)
            fieldCheck = fieldCheck && (lhs.repeatedFloat == rhs.repeatedFloat)
            fieldCheck = fieldCheck && (lhs.repeatedDouble == rhs.repeatedDouble)
            fieldCheck = fieldCheck && (lhs.repeatedBool == rhs.repeatedBool)
            fieldCheck = fieldCheck && (lhs.repeatedString == rhs.repeatedString)
            fieldCheck = fieldCheck && (lhs.repeatedBytes == rhs.repeatedBytes)
            fieldCheck = fieldCheck && (lhs.repeatedNestedMessage == rhs.repeatedNestedMessage)
            fieldCheck = fieldCheck && (lhs.repeatedForeignMessage == rhs.repeatedForeignMessage)
            fieldCheck = fieldCheck && (lhs.repeatedImportMessage == rhs.repeatedImportMessage)
            fieldCheck = fieldCheck && (lhs.repeatedNestedEnum == rhs.repeatedNestedEnum)
            fieldCheck = fieldCheck && (lhs.repeatedForeignEnum == rhs.repeatedForeignEnum)
            fieldCheck = fieldCheck && (lhs.repeatedStringPiece == rhs.repeatedStringPiece)
            fieldCheck = fieldCheck && (lhs.repeatedCord == rhs.repeatedCord)
            fieldCheck = fieldCheck && (lhs.repeatedLazyMessage == rhs.repeatedLazyMessage)
            fieldCheck = fieldCheck && (lhs.hasOneofUint32 == rhs.hasOneofUint32) && (!lhs.hasOneofUint32 || lhs.oneofUint32 == rhs.oneofUint32)
            fieldCheck = fieldCheck && (lhs.hasOneofNestedMessage == rhs.hasOneofNestedMessage) && (!lhs.hasOneofNestedMessage || lhs.oneofNestedMessage == rhs.oneofNestedMessage)
            fieldCheck = fieldCheck && (lhs.hasOneofString == rhs.hasOneofString) && (!lhs.hasOneofString || lhs.oneofString == rhs.oneofString)
            fieldCheck = fieldCheck && (lhs.hasOneofBytes == rhs.hasOneofBytes) && (!lhs.hasOneofBytes || lhs.oneofBytes == rhs.oneofBytes)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class NestedMessage : GeneratedMessage {
            public typealias BuilderType = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder

            public static func == (lhs: Proto3ArenaUnittest.TestAllTypes.NestedMessage, rhs: Proto3ArenaUnittest.TestAllTypes.NestedMessage) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasBb == rhs.hasBb) && (!lhs.hasBb || lhs.bb == rhs.bb)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            /// The field name "b" fails to compile in proto1 because it conflicts with
            /// a local variable named "b" in one of the generated methods.  Doh.
            /// This file needs to compile in proto1 to test backwards-compatibility.
            public fileprivate(set) var bb:Int32! = nil
            public fileprivate(set) var hasBb:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasBb {
                    try codedOutputStream.writeInt32(fieldNumber: 1, value:bb)
                }
                try unknownFields.writeTo(codedOutputStream: codedOutputStream)
            }
            override public func serializedSize() -> Int32 {
                var serialize_size:Int32 = memoizedSerializedSize
                if serialize_size != -1 {
                 return serialize_size
                }

                serialize_size = 0
                if hasBb {
                    serialize_size += bb.computeInt32Size(fieldNumber: 1)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                return Proto3ArenaUnittest.TestAllTypes.NestedMessage.classBuilder() as! Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder
            }
            public func getBuilder() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                return classBuilder() as! Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
            }
            public func toBuilder() throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:Proto3ArenaUnittest.TestAllTypes.NestedMessage) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasBb {
                    jsonMap["bb"] = Int(bb)
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
                return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
                return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasBb {
                    output += "\(indent) bb: \(String(describing: bb)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasBb {
                        hashCode = (hashCode &* 31) &+ bb.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

            override public class func className() -> String {
                return "Proto3ArenaUnittest.TestAllTypes.NestedMessage"
            }
            override public func className() -> String {
                return "Proto3ArenaUnittest.TestAllTypes.NestedMessage"
            }
            //Meta information declaration end

            final public class Builder : GeneratedMessageBuilder {
                fileprivate var builderResult:Proto3ArenaUnittest.TestAllTypes.NestedMessage = Proto3ArenaUnittest.TestAllTypes.NestedMessage()
                public func getMessage() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
                    return builderResult
                }

                required override public init () {
                    super.init()
                }
                /// The field name "b" fails to compile in proto1 because it conflicts with
                /// a local variable named "b" in one of the generated methods.  Doh.
                /// This file needs to compile in proto1 to test backwards-compatibility.
                public var bb:Int32 {
                    get {
                        return builderResult.bb
                    }
                    set (value) {
                        builderResult.hasBb = true
                        builderResult.bb = value
                    }
                }
                public var hasBb:Bool {
                    get {
                        return builderResult.hasBb
                    }
                }
                @discardableResult
                public func setBb(_ value:Int32) -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                    self.bb = value
                    return self
                }
                @discardableResult
                public func clearBb() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder{
                    builderResult.hasBb = false
                    builderResult.bb = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                    builderResult = Proto3ArenaUnittest.TestAllTypes.NestedMessage()
                    return self
                }
                override public func clone() throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                    return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
                    let returnMe:Proto3ArenaUnittest.TestAllTypes.NestedMessage = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:Proto3ArenaUnittest.TestAllTypes.NestedMessage) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                    if other == Proto3ArenaUnittest.TestAllTypes.NestedMessage() {
                        return self
                    }
                    if other.hasBb {
                        bb = other.bb
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                    let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                    while (true) {
                        let protobufTag = try codedInputStream.readTag()
                        switch protobufTag {
                        case 0: 
                            self.unknownFields = try unknownFieldsBuilder.build()
                            return self

                        case 8:
                            bb = try codedInputStream.readInt32()

                        default:
                            if (!(try parse(codedInputStream:codedInputStream, unknownFields:unknownFieldsBuilder, extensionRegistry:extensionRegistry, tag:protobufTag))) {
                                unknownFields = try unknownFieldsBuilder.build()
                                return self
                            }
                        }
                    }
                }
                class override public func decodeToBuilder(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                    let resultDecodedBuilder = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
                    if let jsonValueBb = jsonMap["bb"] as? Int {
                        resultDecodedBuilder.bb = Int32(jsonValueBb)
                    } else if let jsonValueBb = jsonMap["bb"] as? String {
                        resultDecodedBuilder.bb = Int32(jsonValueBb)!
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                    let jsonData = try JSONSerialization.jsonObject(with:data, options: options)
                    guard let jsDataCast = jsonData as? Dictionary<String,Any> else {
                      throw ProtocolBuffersError.invalidProtocolBuffer("Invalid JSON data")
                    }
                    return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //OneOf declaration start

        public enum OneofField {
            case oneOfOneofFieldNotSet

            public func checkOneOfIsSet() -> Bool {
                switch self {
                case .oneOfOneofFieldNotSet: return false
                default: return true
                }
            }
            case oneofUint32(UInt32)

            public static func getOneofUint32(_ value:OneofField) -> UInt32? {
                switch value {
                case .oneofUint32(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getOneofUint32() -> UInt32? {
                switch self {
                case .oneofUint32(let otherValue): return otherValue
                default: return nil
                }
            }
            case oneofNestedMessage(Proto3ArenaUnittest.TestAllTypes.NestedMessage)

            public static func getOneofNestedMessage(_ value:OneofField) -> Proto3ArenaUnittest.TestAllTypes.NestedMessage? {
                switch value {
                case .oneofNestedMessage(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getOneofNestedMessage() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage? {
                switch self {
                case .oneofNestedMessage(let messageValue): return messageValue
                default: return nil
                }
            }
            case oneofString(String)

            public static func getOneofString(_ value:OneofField) -> String? {
                switch value {
                case .oneofString(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getOneofString() -> String? {
                switch self {
                case .oneofString(let otherValue): return otherValue
                default: return nil
                }
            }
            case oneofBytes(Data)

            public static func getOneofBytes(_ value:OneofField) -> Data? {
                switch value {
                case .oneofBytes(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getOneofBytes() -> Data? {
                switch self {
                case .oneofBytes(let otherValue): return otherValue
                default: return nil
                }
            }
        }
        //OneOf declaration end

        fileprivate var storageOneofField:TestAllTypes.OneofField =  TestAllTypes.OneofField.oneOfOneofFieldNotSet
        public func getOneOfOneofField() ->  TestAllTypes.OneofField {
            let copyObjectOneofField = storageOneofField
            return copyObjectOneofField
        }


            //Enum type declaration start 

            public enum NestedEnum:Int32, GeneratedEnum {
                case zero = 0
                case foo = 1
                case bar = 2
                case baz = 3

                /// Intentionally negative.
                case neg = -1
                public func toString() -> String {
                    switch self {
                    case .zero: return "ZERO"
                    case .foo: return "FOO"
                    case .bar: return "BAR"
                    case .baz: return "BAZ"
                    case .neg: return "NEG"
                    }
                }
                public static func fromString(_ str:String) throws -> Proto3ArenaUnittest.TestAllTypes.NestedEnum {
                    switch str {
                    case "ZERO":    return .zero
                    case "FOO":    return .foo
                    case "BAR":    return .bar
                    case "BAZ":    return .baz
                    case "NEG":    return .neg
                    default: throw ProtocolBuffersError.invalidProtocolBuffer("Conversion failed.")
                    }
                }
                public var debugDescription:String { return getDescription() }
                public var description:String { return getDescription() }
                private func getDescription() -> String { 
                    switch self {
                    case .zero: return ".zero"
                    case .foo: return ".foo"
                    case .bar: return ".bar"
                    case .baz: return ".baz"
                    case .neg: return ".neg"
                    }
                }
                public var hashValue:Int {
                    return self.rawValue.hashValue
                }
                public static func ==(lhs:NestedEnum, rhs:NestedEnum) -> Bool {
                    return lhs.hashValue == rhs.hashValue
                }
            }

            //Enum type declaration end 

        /// Singular
        public fileprivate(set) var optionalInt32:Int32! = nil
        public fileprivate(set) var hasOptionalInt32:Bool = false

        public fileprivate(set) var optionalInt64:Int64! = nil
        public fileprivate(set) var hasOptionalInt64:Bool = false

        public fileprivate(set) var optionalUint32:UInt32! = nil
        public fileprivate(set) var hasOptionalUint32:Bool = false

        public fileprivate(set) var optionalUint64:UInt64! = nil
        public fileprivate(set) var hasOptionalUint64:Bool = false

        public fileprivate(set) var optionalSint32:Int32! = nil
        public fileprivate(set) var hasOptionalSint32:Bool = false

        public fileprivate(set) var optionalSint64:Int64! = nil
        public fileprivate(set) var hasOptionalSint64:Bool = false

        public fileprivate(set) var optionalFixed32:UInt32! = nil
        public fileprivate(set) var hasOptionalFixed32:Bool = false

        public fileprivate(set) var optionalFixed64:UInt64! = nil
        public fileprivate(set) var hasOptionalFixed64:Bool = false

        public fileprivate(set) var optionalSfixed32:Int32! = nil
        public fileprivate(set) var hasOptionalSfixed32:Bool = false

        public fileprivate(set) var optionalSfixed64:Int64! = nil
        public fileprivate(set) var hasOptionalSfixed64:Bool = false

        public fileprivate(set) var optionalFloat:Float! = nil
        public fileprivate(set) var hasOptionalFloat:Bool = false

        public fileprivate(set) var optionalDouble:Double! = nil
        public fileprivate(set) var hasOptionalDouble:Bool = false

        public fileprivate(set) var optionalBool:Bool! = nil
        public fileprivate(set) var hasOptionalBool:Bool = false

        public fileprivate(set) var optionalString:String! = nil
        public fileprivate(set) var hasOptionalString:Bool = false

        public fileprivate(set) var optionalBytes:Data! = nil
        public fileprivate(set) var hasOptionalBytes:Bool = false

        public fileprivate(set) var optionalNestedMessage:Proto3ArenaUnittest.TestAllTypes.NestedMessage!
        public fileprivate(set) var hasOptionalNestedMessage:Bool = false
        public fileprivate(set) var optionalForeignMessage:Proto3ArenaUnittest.ForeignMessage!
        public fileprivate(set) var hasOptionalForeignMessage:Bool = false
        public fileprivate(set) var optionalImportMessage:ProtobufUnittestImport.ImportMessage!
        public fileprivate(set) var hasOptionalImportMessage:Bool = false
        public fileprivate(set) var optionalNestedEnum:Proto3ArenaUnittest.TestAllTypes.NestedEnum = Proto3ArenaUnittest.TestAllTypes.NestedEnum.zero
        public fileprivate(set) var hasOptionalNestedEnum:Bool = false
        public fileprivate(set) var optionalForeignEnum:Proto3ArenaUnittest.ForeignEnum = Proto3ArenaUnittest.ForeignEnum.foreignZero
        public fileprivate(set) var hasOptionalForeignEnum:Bool = false
        public fileprivate(set) var optionalStringPiece:String! = nil
        public fileprivate(set) var hasOptionalStringPiece:Bool = false

        public fileprivate(set) var optionalCord:String! = nil
        public fileprivate(set) var hasOptionalCord:Bool = false

        public fileprivate(set) var optionalPublicImportMessage:ProtobufUnittestImport.PublicImportMessage!
        public fileprivate(set) var hasOptionalPublicImportMessage:Bool = false
        public fileprivate(set) var optionalLazyMessage:Proto3ArenaUnittest.TestAllTypes.NestedMessage!
        public fileprivate(set) var hasOptionalLazyMessage:Bool = false
        /// Repeated
        public fileprivate(set) var repeatedInt32:Array<Int32> = Array<Int32>()
        private var repeatedInt32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedInt64:Array<Int64> = Array<Int64>()
        private var repeatedInt64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedUint32:Array<UInt32> = Array<UInt32>()
        private var repeatedUint32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedUint64:Array<UInt64> = Array<UInt64>()
        private var repeatedUint64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedSint32:Array<Int32> = Array<Int32>()
        private var repeatedSint32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedSint64:Array<Int64> = Array<Int64>()
        private var repeatedSint64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedFixed32:Array<UInt32> = Array<UInt32>()
        private var repeatedFixed32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedFixed64:Array<UInt64> = Array<UInt64>()
        private var repeatedFixed64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedSfixed32:Array<Int32> = Array<Int32>()
        private var repeatedSfixed32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedSfixed64:Array<Int64> = Array<Int64>()
        private var repeatedSfixed64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedFloat:Array<Float> = Array<Float>()
        private var repeatedFloatMemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedDouble:Array<Double> = Array<Double>()
        private var repeatedDoubleMemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedBool:Array<Bool> = Array<Bool>()
        private var repeatedBoolMemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedString:Array<String> = Array<String>()
        public fileprivate(set) var repeatedBytes:Array<Data> = Array<Data>()
        public fileprivate(set) var repeatedNestedMessage:Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage>  = Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage>()
        public fileprivate(set) var repeatedForeignMessage:Array<Proto3ArenaUnittest.ForeignMessage>  = Array<Proto3ArenaUnittest.ForeignMessage>()
        public fileprivate(set) var repeatedImportMessage:Array<ProtobufUnittestImport.ImportMessage>  = Array<ProtobufUnittestImport.ImportMessage>()
        private var repeatedNestedEnumMemoizedSerializedSize:Int32 = 0
        public fileprivate(set) var repeatedNestedEnum:Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum> = Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum>()
        private var repeatedForeignEnumMemoizedSerializedSize:Int32 = 0
        public fileprivate(set) var repeatedForeignEnum:Array<Proto3ArenaUnittest.ForeignEnum> = Array<Proto3ArenaUnittest.ForeignEnum>()
        public fileprivate(set) var repeatedStringPiece:Array<String> = Array<String>()
        public fileprivate(set) var repeatedCord:Array<String> = Array<String>()
        public fileprivate(set) var repeatedLazyMessage:Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage>  = Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage>()
        public fileprivate(set) var oneofUint32:UInt32!{
            get {
                return TestAllTypes.OneofField.getOneofUint32(storageOneofField)
            }
            set (newvalue) {
                storageOneofField = TestAllTypes.OneofField.oneofUint32(newvalue)
            }
        }
        public fileprivate(set) var hasOneofUint32:Bool {
            get {
                return TestAllTypes.OneofField.getOneofUint32(storageOneofField) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var oneofNestedMessage:Proto3ArenaUnittest.TestAllTypes.NestedMessage!{
            get {
                return TestAllTypes.OneofField.getOneofNestedMessage(storageOneofField)
            }
            set (newvalue) {
                storageOneofField = TestAllTypes.OneofField.oneofNestedMessage(newvalue)
            }
        }
        public fileprivate(set) var hasOneofNestedMessage:Bool {
            get {
                return TestAllTypes.OneofField.getOneofNestedMessage(storageOneofField) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var oneofString:String!{
            get {
                return TestAllTypes.OneofField.getOneofString(storageOneofField)
            }
            set (newvalue) {
                storageOneofField = TestAllTypes.OneofField.oneofString(newvalue)
            }
        }
        public fileprivate(set) var hasOneofString:Bool {
            get {
                return TestAllTypes.OneofField.getOneofString(storageOneofField) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var oneofBytes:Data!{
            get {
                return TestAllTypes.OneofField.getOneofBytes(storageOneofField)
            }
            set (newvalue) {
                storageOneofField = TestAllTypes.OneofField.oneofBytes(newvalue)
            }
        }
        public fileprivate(set) var hasOneofBytes:Bool {
            get {
                return TestAllTypes.OneofField.getOneofBytes(storageOneofField) != nil
            }
            set(newValue) {
            }
        }
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasOptionalInt32 {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:optionalInt32)
            }
            if hasOptionalInt64 {
                try codedOutputStream.writeInt64(fieldNumber: 2, value:optionalInt64)
            }
            if hasOptionalUint32 {
                try codedOutputStream.writeUInt32(fieldNumber: 3, value:optionalUint32)
            }
            if hasOptionalUint64 {
                try codedOutputStream.writeUInt64(fieldNumber: 4, value:optionalUint64)
            }
            if hasOptionalSint32 {
                try codedOutputStream.writeSInt32(fieldNumber: 5, value:optionalSint32)
            }
            if hasOptionalSint64 {
                try codedOutputStream.writeSInt64(fieldNumber: 6, value:optionalSint64)
            }
            if hasOptionalFixed32 {
                try codedOutputStream.writeFixed32(fieldNumber: 7, value:optionalFixed32)
            }
            if hasOptionalFixed64 {
                try codedOutputStream.writeFixed64(fieldNumber: 8, value:optionalFixed64)
            }
            if hasOptionalSfixed32 {
                try codedOutputStream.writeSFixed32(fieldNumber: 9, value:optionalSfixed32)
            }
            if hasOptionalSfixed64 {
                try codedOutputStream.writeSFixed64(fieldNumber: 10, value:optionalSfixed64)
            }
            if hasOptionalFloat {
                try codedOutputStream.writeFloat(fieldNumber: 11, value:optionalFloat)
            }
            if hasOptionalDouble {
                try codedOutputStream.writeDouble(fieldNumber: 12, value:optionalDouble)
            }
            if hasOptionalBool {
                try codedOutputStream.writeBool(fieldNumber: 13, value:optionalBool)
            }
            if hasOptionalString {
                try codedOutputStream.writeString(fieldNumber: 14, value:optionalString)
            }
            if hasOptionalBytes {
                try codedOutputStream.writeData(fieldNumber: 15, value:optionalBytes)
            }
            if hasOptionalNestedMessage {
                try codedOutputStream.writeMessage(fieldNumber: 18, value:optionalNestedMessage)
            }
            if hasOptionalForeignMessage {
                try codedOutputStream.writeMessage(fieldNumber: 19, value:optionalForeignMessage)
            }
            if hasOptionalImportMessage {
                try codedOutputStream.writeMessage(fieldNumber: 20, value:optionalImportMessage)
            }
            if hasOptionalNestedEnum {
                try codedOutputStream.writeEnum(fieldNumber: 21, value:optionalNestedEnum.rawValue)
            }
            if hasOptionalForeignEnum {
                try codedOutputStream.writeEnum(fieldNumber: 22, value:optionalForeignEnum.rawValue)
            }
            if hasOptionalStringPiece {
                try codedOutputStream.writeString(fieldNumber: 24, value:optionalStringPiece)
            }
            if hasOptionalCord {
                try codedOutputStream.writeString(fieldNumber: 25, value:optionalCord)
            }
            if hasOptionalPublicImportMessage {
                try codedOutputStream.writeMessage(fieldNumber: 26, value:optionalPublicImportMessage)
            }
            if hasOptionalLazyMessage {
                try codedOutputStream.writeMessage(fieldNumber: 27, value:optionalLazyMessage)
            }
            if !repeatedInt32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 250)
                try codedOutputStream.writeRawVarint32(value: repeatedInt32MemoizedSerializedSize)
                for oneValuerepeatedInt32 in repeatedInt32 {
                    try codedOutputStream.writeInt32NoTag(value: oneValuerepeatedInt32)
                }
            }
            if !repeatedInt64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 258)
                try codedOutputStream.writeRawVarint32(value: repeatedInt64MemoizedSerializedSize)
                for oneValuerepeatedInt64 in repeatedInt64 {
                    try codedOutputStream.writeInt64NoTag(value: oneValuerepeatedInt64)
                }
            }
            if !repeatedUint32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 266)
                try codedOutputStream.writeRawVarint32(value: repeatedUint32MemoizedSerializedSize)
                for oneValuerepeatedUint32 in repeatedUint32 {
                    try codedOutputStream.writeUInt32NoTag(value: oneValuerepeatedUint32)
                }
            }
            if !repeatedUint64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 274)
                try codedOutputStream.writeRawVarint32(value: repeatedUint64MemoizedSerializedSize)
                for oneValuerepeatedUint64 in repeatedUint64 {
                    try codedOutputStream.writeUInt64NoTag(value: oneValuerepeatedUint64)
                }
            }
            if !repeatedSint32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 282)
                try codedOutputStream.writeRawVarint32(value: repeatedSint32MemoizedSerializedSize)
                for oneValuerepeatedSint32 in repeatedSint32 {
                    try codedOutputStream.writeSInt32NoTag(value: oneValuerepeatedSint32)
                }
            }
            if !repeatedSint64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 290)
                try codedOutputStream.writeRawVarint32(value: repeatedSint64MemoizedSerializedSize)
                for oneValuerepeatedSint64 in repeatedSint64 {
                    try codedOutputStream.writeSInt64NoTag(value: oneValuerepeatedSint64)
                }
            }
            if !repeatedFixed32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 298)
                try codedOutputStream.writeRawVarint32(value: repeatedFixed32MemoizedSerializedSize)
                for oneValuerepeatedFixed32 in repeatedFixed32 {
                    try codedOutputStream.writeFixed32NoTag(value: oneValuerepeatedFixed32)
                }
            }
            if !repeatedFixed64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 306)
                try codedOutputStream.writeRawVarint32(value: repeatedFixed64MemoizedSerializedSize)
                for oneValuerepeatedFixed64 in repeatedFixed64 {
                    try codedOutputStream.writeFixed64NoTag(value: oneValuerepeatedFixed64)
                }
            }
            if !repeatedSfixed32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 314)
                try codedOutputStream.writeRawVarint32(value: repeatedSfixed32MemoizedSerializedSize)
                for oneValuerepeatedSfixed32 in repeatedSfixed32 {
                    try codedOutputStream.writeSFixed32NoTag(value: oneValuerepeatedSfixed32)
                }
            }
            if !repeatedSfixed64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 322)
                try codedOutputStream.writeRawVarint32(value: repeatedSfixed64MemoizedSerializedSize)
                for oneValuerepeatedSfixed64 in repeatedSfixed64 {
                    try codedOutputStream.writeSFixed64NoTag(value: oneValuerepeatedSfixed64)
                }
            }
            if !repeatedFloat.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 330)
                try codedOutputStream.writeRawVarint32(value: repeatedFloatMemoizedSerializedSize)
                for oneValuerepeatedFloat in repeatedFloat {
                    try codedOutputStream.writeFloatNoTag(value: oneValuerepeatedFloat)
                }
            }
            if !repeatedDouble.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 338)
                try codedOutputStream.writeRawVarint32(value: repeatedDoubleMemoizedSerializedSize)
                for oneValuerepeatedDouble in repeatedDouble {
                    try codedOutputStream.writeDoubleNoTag(value: oneValuerepeatedDouble)
                }
            }
            if !repeatedBool.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 346)
                try codedOutputStream.writeRawVarint32(value: repeatedBoolMemoizedSerializedSize)
                for oneValuerepeatedBool in repeatedBool {
                    try codedOutputStream.writeBoolNoTag(value: oneValuerepeatedBool)
                }
            }
            if !repeatedString.isEmpty {
                for oneValuerepeatedString in repeatedString {
                    try codedOutputStream.writeString(fieldNumber: 44, value:oneValuerepeatedString)
                }
            }
            if !repeatedBytes.isEmpty {
                for oneValuerepeatedBytes in repeatedBytes {
                    try codedOutputStream.writeData(fieldNumber: 45, value:oneValuerepeatedBytes)
                }
            }
            for oneElementRepeatedNestedMessage in repeatedNestedMessage {
                  try codedOutputStream.writeMessage(fieldNumber: 48, value:oneElementRepeatedNestedMessage)
            }
            for oneElementRepeatedForeignMessage in repeatedForeignMessage {
                  try codedOutputStream.writeMessage(fieldNumber: 49, value:oneElementRepeatedForeignMessage)
            }
            for oneElementRepeatedImportMessage in repeatedImportMessage {
                  try codedOutputStream.writeMessage(fieldNumber: 50, value:oneElementRepeatedImportMessage)
            }
            if !repeatedNestedEnum.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 410)
                try codedOutputStream.writeRawVarint32(value: repeatedNestedEnumMemoizedSerializedSize)
            }
            for oneValueOfrepeatedNestedEnum in repeatedNestedEnum {
                  try codedOutputStream.writeEnumNoTag(value: oneValueOfrepeatedNestedEnum.rawValue)
            }
            if !repeatedForeignEnum.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 418)
                try codedOutputStream.writeRawVarint32(value: repeatedForeignEnumMemoizedSerializedSize)
            }
            for oneValueOfrepeatedForeignEnum in repeatedForeignEnum {
                  try codedOutputStream.writeEnumNoTag(value: oneValueOfrepeatedForeignEnum.rawValue)
            }
            if !repeatedStringPiece.isEmpty {
                for oneValuerepeatedStringPiece in repeatedStringPiece {
                    try codedOutputStream.writeString(fieldNumber: 54, value:oneValuerepeatedStringPiece)
                }
            }
            if !repeatedCord.isEmpty {
                for oneValuerepeatedCord in repeatedCord {
                    try codedOutputStream.writeString(fieldNumber: 55, value:oneValuerepeatedCord)
                }
            }
            for oneElementRepeatedLazyMessage in repeatedLazyMessage {
                  try codedOutputStream.writeMessage(fieldNumber: 57, value:oneElementRepeatedLazyMessage)
            }
            if hasOneofUint32 {
                try codedOutputStream.writeUInt32(fieldNumber: 111, value:oneofUint32)
            }
            if hasOneofNestedMessage {
                try codedOutputStream.writeMessage(fieldNumber: 112, value:oneofNestedMessage)
            }
            if hasOneofString {
                try codedOutputStream.writeString(fieldNumber: 113, value:oneofString)
            }
            if hasOneofBytes {
                try codedOutputStream.writeData(fieldNumber: 114, value:oneofBytes)
            }
            try unknownFields.writeTo(codedOutputStream: codedOutputStream)
        }
        override public func serializedSize() -> Int32 {
            var serialize_size:Int32 = memoizedSerializedSize
            if serialize_size != -1 {
             return serialize_size
            }

            serialize_size = 0
            if hasOptionalInt32 {
                serialize_size += optionalInt32.computeInt32Size(fieldNumber: 1)
            }
            if hasOptionalInt64 {
                serialize_size += optionalInt64.computeInt64Size(fieldNumber: 2)
            }
            if hasOptionalUint32 {
                serialize_size += optionalUint32.computeUInt32Size(fieldNumber: 3)
            }
            if hasOptionalUint64 {
                serialize_size += optionalUint64.computeUInt64Size(fieldNumber: 4)
            }
            if hasOptionalSint32 {
                serialize_size += optionalSint32.computeSInt32Size(fieldNumber: 5)
            }
            if hasOptionalSint64 {
                serialize_size += optionalSint64.computeSInt64Size(fieldNumber: 6)
            }
            if hasOptionalFixed32 {
                serialize_size += optionalFixed32.computeFixed32Size(fieldNumber: 7)
            }
            if hasOptionalFixed64 {
                serialize_size += optionalFixed64.computeFixed64Size(fieldNumber: 8)
            }
            if hasOptionalSfixed32 {
                serialize_size += optionalSfixed32.computeSFixed32Size(fieldNumber: 9)
            }
            if hasOptionalSfixed64 {
                serialize_size += optionalSfixed64.computeSFixed64Size(fieldNumber: 10)
            }
            if hasOptionalFloat {
                serialize_size += optionalFloat.computeFloatSize(fieldNumber: 11)
            }
            if hasOptionalDouble {
                serialize_size += optionalDouble.computeDoubleSize(fieldNumber: 12)
            }
            if hasOptionalBool {
                serialize_size += optionalBool.computeBoolSize(fieldNumber: 13)
            }
            if hasOptionalString {
                serialize_size += optionalString.computeStringSize(fieldNumber: 14)
            }
            if hasOptionalBytes {
                serialize_size += optionalBytes.computeDataSize(fieldNumber: 15)
            }
            if hasOptionalNestedMessage {
                if let varSizeoptionalNestedMessage = optionalNestedMessage?.computeMessageSize(fieldNumber: 18) {
                    serialize_size += varSizeoptionalNestedMessage
                }
            }
            if hasOptionalForeignMessage {
                if let varSizeoptionalForeignMessage = optionalForeignMessage?.computeMessageSize(fieldNumber: 19) {
                    serialize_size += varSizeoptionalForeignMessage
                }
            }
            if hasOptionalImportMessage {
                if let varSizeoptionalImportMessage = optionalImportMessage?.computeMessageSize(fieldNumber: 20) {
                    serialize_size += varSizeoptionalImportMessage
                }
            }
            if (hasOptionalNestedEnum) {
                serialize_size += optionalNestedEnum.rawValue.computeEnumSize(fieldNumber: 21)
            }
            if (hasOptionalForeignEnum) {
                serialize_size += optionalForeignEnum.rawValue.computeEnumSize(fieldNumber: 22)
            }
            if hasOptionalStringPiece {
                serialize_size += optionalStringPiece.computeStringSize(fieldNumber: 24)
            }
            if hasOptionalCord {
                serialize_size += optionalCord.computeStringSize(fieldNumber: 25)
            }
            if hasOptionalPublicImportMessage {
                if let varSizeoptionalPublicImportMessage = optionalPublicImportMessage?.computeMessageSize(fieldNumber: 26) {
                    serialize_size += varSizeoptionalPublicImportMessage
                }
            }
            if hasOptionalLazyMessage {
                if let varSizeoptionalLazyMessage = optionalLazyMessage?.computeMessageSize(fieldNumber: 27) {
                    serialize_size += varSizeoptionalLazyMessage
                }
            }
            var dataSizeRepeatedInt32:Int32 = 0
            for oneValuerepeatedInt32 in repeatedInt32 {
                dataSizeRepeatedInt32 += oneValuerepeatedInt32.computeInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedInt32
            if !repeatedInt32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedInt32.computeInt32SizeNoTag()
            }
            repeatedInt32MemoizedSerializedSize = dataSizeRepeatedInt32
            var dataSizeRepeatedInt64:Int32 = 0
            for oneValuerepeatedInt64 in repeatedInt64 {
                dataSizeRepeatedInt64 += oneValuerepeatedInt64.computeInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedInt64
            if !repeatedInt64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedInt64.computeInt32SizeNoTag()
            }
            repeatedInt64MemoizedSerializedSize = dataSizeRepeatedInt64
            var dataSizeRepeatedUint32:Int32 = 0
            for oneValuerepeatedUint32 in repeatedUint32 {
                dataSizeRepeatedUint32 += oneValuerepeatedUint32.computeUInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedUint32
            if !repeatedUint32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedUint32.computeInt32SizeNoTag()
            }
            repeatedUint32MemoizedSerializedSize = dataSizeRepeatedUint32
            var dataSizeRepeatedUint64:Int32 = 0
            for oneValuerepeatedUint64 in repeatedUint64 {
                dataSizeRepeatedUint64 += oneValuerepeatedUint64.computeUInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedUint64
            if !repeatedUint64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedUint64.computeInt32SizeNoTag()
            }
            repeatedUint64MemoizedSerializedSize = dataSizeRepeatedUint64
            var dataSizeRepeatedSint32:Int32 = 0
            for oneValuerepeatedSint32 in repeatedSint32 {
                dataSizeRepeatedSint32 += oneValuerepeatedSint32.computeSInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedSint32
            if !repeatedSint32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedSint32.computeInt32SizeNoTag()
            }
            repeatedSint32MemoizedSerializedSize = dataSizeRepeatedSint32
            var dataSizeRepeatedSint64:Int32 = 0
            for oneValuerepeatedSint64 in repeatedSint64 {
                dataSizeRepeatedSint64 += oneValuerepeatedSint64.computeSInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedSint64
            if !repeatedSint64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedSint64.computeInt32SizeNoTag()
            }
            repeatedSint64MemoizedSerializedSize = dataSizeRepeatedSint64
            var dataSizeRepeatedFixed32:Int32 = 0
            dataSizeRepeatedFixed32 = 4 * Int32(repeatedFixed32.count)
            serialize_size += dataSizeRepeatedFixed32
            if !repeatedFixed32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedFixed32.computeInt32SizeNoTag()
            }
            repeatedFixed32MemoizedSerializedSize = dataSizeRepeatedFixed32
            var dataSizeRepeatedFixed64:Int32 = 0
            dataSizeRepeatedFixed64 = 8 * Int32(repeatedFixed64.count)
            serialize_size += dataSizeRepeatedFixed64
            if !repeatedFixed64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedFixed64.computeInt32SizeNoTag()
            }
            repeatedFixed64MemoizedSerializedSize = dataSizeRepeatedFixed64
            var dataSizeRepeatedSfixed32:Int32 = 0
            dataSizeRepeatedSfixed32 = 4 * Int32(repeatedSfixed32.count)
            serialize_size += dataSizeRepeatedSfixed32
            if !repeatedSfixed32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedSfixed32.computeInt32SizeNoTag()
            }
            repeatedSfixed32MemoizedSerializedSize = dataSizeRepeatedSfixed32
            var dataSizeRepeatedSfixed64:Int32 = 0
            dataSizeRepeatedSfixed64 = 8 * Int32(repeatedSfixed64.count)
            serialize_size += dataSizeRepeatedSfixed64
            if !repeatedSfixed64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedSfixed64.computeInt32SizeNoTag()
            }
            repeatedSfixed64MemoizedSerializedSize = dataSizeRepeatedSfixed64
            var dataSizeRepeatedFloat:Int32 = 0
            dataSizeRepeatedFloat = 4 * Int32(repeatedFloat.count)
            serialize_size += dataSizeRepeatedFloat
            if !repeatedFloat.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedFloat.computeInt32SizeNoTag()
            }
            repeatedFloatMemoizedSerializedSize = dataSizeRepeatedFloat
            var dataSizeRepeatedDouble:Int32 = 0
            dataSizeRepeatedDouble = 8 * Int32(repeatedDouble.count)
            serialize_size += dataSizeRepeatedDouble
            if !repeatedDouble.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedDouble.computeInt32SizeNoTag()
            }
            repeatedDoubleMemoizedSerializedSize = dataSizeRepeatedDouble
            var dataSizeRepeatedBool:Int32 = 0
            dataSizeRepeatedBool = 1 * Int32(repeatedBool.count)
            serialize_size += dataSizeRepeatedBool
            if !repeatedBool.isEmpty {
                serialize_size += 2
                serialize_size += dataSizeRepeatedBool.computeInt32SizeNoTag()
            }
            repeatedBoolMemoizedSerializedSize = dataSizeRepeatedBool
            var dataSizeRepeatedString:Int32 = 0
            for oneValuerepeatedString in repeatedString {
                dataSizeRepeatedString += oneValuerepeatedString.computeStringSizeNoTag()
            }
            serialize_size += dataSizeRepeatedString
            serialize_size += 2 * Int32(repeatedString.count)
            var dataSizeRepeatedBytes:Int32 = 0
            for oneValuerepeatedBytes in repeatedBytes {
                dataSizeRepeatedBytes += oneValuerepeatedBytes.computeDataSizeNoTag()
            }
            serialize_size += dataSizeRepeatedBytes
            serialize_size += 2 * Int32(repeatedBytes.count)
            for oneElementRepeatedNestedMessage in repeatedNestedMessage {
                serialize_size += oneElementRepeatedNestedMessage.computeMessageSize(fieldNumber: 48)
            }
            for oneElementRepeatedForeignMessage in repeatedForeignMessage {
                serialize_size += oneElementRepeatedForeignMessage.computeMessageSize(fieldNumber: 49)
            }
            for oneElementRepeatedImportMessage in repeatedImportMessage {
                serialize_size += oneElementRepeatedImportMessage.computeMessageSize(fieldNumber: 50)
            }
            var dataSizerepeatedNestedEnum:Int32 = 0
            for oneValueOfrepeatedNestedEnum in repeatedNestedEnum {
                dataSizerepeatedNestedEnum += oneValueOfrepeatedNestedEnum.rawValue.computeEnumSizeNoTag()
            }
            serialize_size += dataSizerepeatedNestedEnum
            if !repeatedNestedEnum.isEmpty {
                serialize_size += 2
                serialize_size += dataSizerepeatedNestedEnum.computeRawVarint32Size()
            }
            repeatedNestedEnumMemoizedSerializedSize = dataSizerepeatedNestedEnum
            var dataSizerepeatedForeignEnum:Int32 = 0
            for oneValueOfrepeatedForeignEnum in repeatedForeignEnum {
                dataSizerepeatedForeignEnum += oneValueOfrepeatedForeignEnum.rawValue.computeEnumSizeNoTag()
            }
            serialize_size += dataSizerepeatedForeignEnum
            if !repeatedForeignEnum.isEmpty {
                serialize_size += 2
                serialize_size += dataSizerepeatedForeignEnum.computeRawVarint32Size()
            }
            repeatedForeignEnumMemoizedSerializedSize = dataSizerepeatedForeignEnum
            var dataSizeRepeatedStringPiece:Int32 = 0
            for oneValuerepeatedStringPiece in repeatedStringPiece {
                dataSizeRepeatedStringPiece += oneValuerepeatedStringPiece.computeStringSizeNoTag()
            }
            serialize_size += dataSizeRepeatedStringPiece
            serialize_size += 2 * Int32(repeatedStringPiece.count)
            var dataSizeRepeatedCord:Int32 = 0
            for oneValuerepeatedCord in repeatedCord {
                dataSizeRepeatedCord += oneValuerepeatedCord.computeStringSizeNoTag()
            }
            serialize_size += dataSizeRepeatedCord
            serialize_size += 2 * Int32(repeatedCord.count)
            for oneElementRepeatedLazyMessage in repeatedLazyMessage {
                serialize_size += oneElementRepeatedLazyMessage.computeMessageSize(fieldNumber: 57)
            }
            if hasOneofUint32 {
                serialize_size += oneofUint32.computeUInt32Size(fieldNumber: 111)
            }
            if hasOneofNestedMessage {
                if let varSizeoneofNestedMessage = oneofNestedMessage?.computeMessageSize(fieldNumber: 112) {
                    serialize_size += varSizeoneofNestedMessage
                }
            }
            if hasOneofString {
                serialize_size += oneofString.computeStringSize(fieldNumber: 113)
            }
            if hasOneofBytes {
                serialize_size += oneofBytes.computeDataSize(fieldNumber: 114)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Proto3ArenaUnittest.TestAllTypes.Builder {
            return Proto3ArenaUnittest.TestAllTypes.classBuilder() as! Proto3ArenaUnittest.TestAllTypes.Builder
        }
        public func getBuilder() -> Proto3ArenaUnittest.TestAllTypes.Builder {
            return classBuilder() as! Proto3ArenaUnittest.TestAllTypes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.TestAllTypes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.TestAllTypes.Builder()
        }
        public func toBuilder() throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
            return try Proto3ArenaUnittest.TestAllTypes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Proto3ArenaUnittest.TestAllTypes) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
            return try Proto3ArenaUnittest.TestAllTypes.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasOptionalInt32 {
                jsonMap["optionalInt32"] = Int(optionalInt32)
            }
            if hasOptionalInt64 {
                jsonMap["optionalInt64"] = "\(optionalInt64!)"
            }
            if hasOptionalUint32 {
                jsonMap["optionalUint32"] = UInt(optionalUint32)
            }
            if hasOptionalUint64 {
                jsonMap["optionalUint64"] = "\(optionalUint64!)"
            }
            if hasOptionalSint32 {
                jsonMap["optionalSint32"] = Int(optionalSint32)
            }
            if hasOptionalSint64 {
                jsonMap["optionalSint64"] = "\(optionalSint64!)"
            }
            if hasOptionalFixed32 {
                jsonMap["optionalFixed32"] = UInt(optionalFixed32)
            }
            if hasOptionalFixed64 {
                jsonMap["optionalFixed64"] = "\(optionalFixed64!)"
            }
            if hasOptionalSfixed32 {
                jsonMap["optionalSfixed32"] = Int(optionalSfixed32)
            }
            if hasOptionalSfixed64 {
                jsonMap["optionalSfixed64"] = "\(optionalSfixed64!)"
            }
            if hasOptionalFloat {
                jsonMap["optionalFloat"] = Float(optionalFloat)
            }
            if hasOptionalDouble {
                jsonMap["optionalDouble"] = Double(optionalDouble)
            }
            if hasOptionalBool {
                jsonMap["optionalBool"] = optionalBool
            }
            if hasOptionalString {
                jsonMap["optionalString"] = optionalString
            }
            if hasOptionalBytes {
                jsonMap["optionalBytes"] = optionalBytes.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
            }
            if hasOptionalNestedMessage {
                jsonMap["optionalNestedMessage"] = try optionalNestedMessage.encode()
            }
            if hasOptionalForeignMessage {
                jsonMap["optionalForeignMessage"] = try optionalForeignMessage.encode()
            }
            if hasOptionalImportMessage {
                jsonMap["optionalImportMessage"] = try optionalImportMessage.encode()
            }
            if hasOptionalNestedEnum {
                jsonMap["optionalNestedEnum"] = optionalNestedEnum.toString()
            }
            if hasOptionalForeignEnum {
                jsonMap["optionalForeignEnum"] = optionalForeignEnum.toString()
            }
            if hasOptionalStringPiece {
                jsonMap["optionalStringPiece"] = optionalStringPiece
            }
            if hasOptionalCord {
                jsonMap["optionalCord"] = optionalCord
            }
            if hasOptionalPublicImportMessage {
                jsonMap["optionalPublicImportMessage"] = try optionalPublicImportMessage.encode()
            }
            if hasOptionalLazyMessage {
                jsonMap["optionalLazyMessage"] = try optionalLazyMessage.encode()
            }
            if !repeatedInt32.isEmpty {
                var jsonArrayRepeatedInt32:Array<Int> = []
                for oneValueRepeatedInt32 in repeatedInt32 {
                    jsonArrayRepeatedInt32.append(Int(oneValueRepeatedInt32))
                }
                jsonMap["repeatedInt32"] = jsonArrayRepeatedInt32
            }
            if !repeatedInt64.isEmpty {
                var jsonArrayRepeatedInt64:Array<String> = []
                for oneValueRepeatedInt64 in repeatedInt64 {
                    jsonArrayRepeatedInt64.append("\(oneValueRepeatedInt64)")
                }
                jsonMap["repeatedInt64"] = jsonArrayRepeatedInt64
            }
            if !repeatedUint32.isEmpty {
                var jsonArrayRepeatedUint32:Array<UInt> = []
                for oneValueRepeatedUint32 in repeatedUint32 {
                    jsonArrayRepeatedUint32.append(UInt(oneValueRepeatedUint32))
                }
                jsonMap["repeatedUint32"] = jsonArrayRepeatedUint32
            }
            if !repeatedUint64.isEmpty {
                var jsonArrayRepeatedUint64:Array<String> = []
                for oneValueRepeatedUint64 in repeatedUint64 {
                    jsonArrayRepeatedUint64.append("\(oneValueRepeatedUint64)")
                }
                jsonMap["repeatedUint64"] = jsonArrayRepeatedUint64
            }
            if !repeatedSint32.isEmpty {
                var jsonArrayRepeatedSint32:Array<Int> = []
                for oneValueRepeatedSint32 in repeatedSint32 {
                    jsonArrayRepeatedSint32.append(Int(oneValueRepeatedSint32))
                }
                jsonMap["repeatedSint32"] = jsonArrayRepeatedSint32
            }
            if !repeatedSint64.isEmpty {
                var jsonArrayRepeatedSint64:Array<String> = []
                for oneValueRepeatedSint64 in repeatedSint64 {
                    jsonArrayRepeatedSint64.append("\(oneValueRepeatedSint64)")
                }
                jsonMap["repeatedSint64"] = jsonArrayRepeatedSint64
            }
            if !repeatedFixed32.isEmpty {
                var jsonArrayRepeatedFixed32:Array<UInt> = []
                for oneValueRepeatedFixed32 in repeatedFixed32 {
                    jsonArrayRepeatedFixed32.append(UInt(oneValueRepeatedFixed32))
                }
                jsonMap["repeatedFixed32"] = jsonArrayRepeatedFixed32
            }
            if !repeatedFixed64.isEmpty {
                var jsonArrayRepeatedFixed64:Array<String> = []
                for oneValueRepeatedFixed64 in repeatedFixed64 {
                    jsonArrayRepeatedFixed64.append("\(oneValueRepeatedFixed64)")
                }
                jsonMap["repeatedFixed64"] = jsonArrayRepeatedFixed64
            }
            if !repeatedSfixed32.isEmpty {
                var jsonArrayRepeatedSfixed32:Array<Int> = []
                for oneValueRepeatedSfixed32 in repeatedSfixed32 {
                    jsonArrayRepeatedSfixed32.append(Int(oneValueRepeatedSfixed32))
                }
                jsonMap["repeatedSfixed32"] = jsonArrayRepeatedSfixed32
            }
            if !repeatedSfixed64.isEmpty {
                var jsonArrayRepeatedSfixed64:Array<String> = []
                for oneValueRepeatedSfixed64 in repeatedSfixed64 {
                    jsonArrayRepeatedSfixed64.append("\(oneValueRepeatedSfixed64)")
                }
                jsonMap["repeatedSfixed64"] = jsonArrayRepeatedSfixed64
            }
            if !repeatedFloat.isEmpty {
                var jsonArrayRepeatedFloat:Array<Float> = []
                for oneValueRepeatedFloat in repeatedFloat {
                    jsonArrayRepeatedFloat.append(Float(oneValueRepeatedFloat))
                }
                jsonMap["repeatedFloat"] = jsonArrayRepeatedFloat
            }
            if !repeatedDouble.isEmpty {
                var jsonArrayRepeatedDouble:Array<Double> = []
                for oneValueRepeatedDouble in repeatedDouble {
                    jsonArrayRepeatedDouble.append(Double(oneValueRepeatedDouble))
                }
                jsonMap["repeatedDouble"] = jsonArrayRepeatedDouble
            }
            if !repeatedBool.isEmpty {
                var jsonArrayRepeatedBool:Array<Bool> = []
                for oneValueRepeatedBool in repeatedBool {
                    jsonArrayRepeatedBool.append(oneValueRepeatedBool)
                }
                jsonMap["repeatedBool"] = jsonArrayRepeatedBool
            }
            if !repeatedString.isEmpty {
                var jsonArrayRepeatedString:Array<String> = []
                for oneValueRepeatedString in repeatedString {
                    jsonArrayRepeatedString.append(oneValueRepeatedString)
                }
                jsonMap["repeatedString"] = jsonArrayRepeatedString
            }
            if !repeatedBytes.isEmpty {
                var jsonArrayRepeatedBytes:Array<String> = []
                for oneValueRepeatedBytes in repeatedBytes {
                    jsonArrayRepeatedBytes.append(oneValueRepeatedBytes.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0)))
                }
                jsonMap["repeatedBytes"] = jsonArrayRepeatedBytes
            }
            if !repeatedNestedMessage.isEmpty {
                var jsonArrayRepeatedNestedMessage:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedNestedMessage in repeatedNestedMessage {
                    let ecodedMessageRepeatedNestedMessage = try oneValueRepeatedNestedMessage.encode()
                    jsonArrayRepeatedNestedMessage.append(ecodedMessageRepeatedNestedMessage)
                }
                jsonMap["repeatedNestedMessage"] = jsonArrayRepeatedNestedMessage
            }
            if !repeatedForeignMessage.isEmpty {
                var jsonArrayRepeatedForeignMessage:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedForeignMessage in repeatedForeignMessage {
                    let ecodedMessageRepeatedForeignMessage = try oneValueRepeatedForeignMessage.encode()
                    jsonArrayRepeatedForeignMessage.append(ecodedMessageRepeatedForeignMessage)
                }
                jsonMap["repeatedForeignMessage"] = jsonArrayRepeatedForeignMessage
            }
            if !repeatedImportMessage.isEmpty {
                var jsonArrayRepeatedImportMessage:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedImportMessage in repeatedImportMessage {
                    let ecodedMessageRepeatedImportMessage = try oneValueRepeatedImportMessage.encode()
                    jsonArrayRepeatedImportMessage.append(ecodedMessageRepeatedImportMessage)
                }
                jsonMap["repeatedImportMessage"] = jsonArrayRepeatedImportMessage
            }
            if !repeatedNestedEnum.isEmpty {
                var jsonArrayRepeatedNestedEnum:Array<String> = []
                for oneValueRepeatedNestedEnum in repeatedNestedEnum {
                    jsonArrayRepeatedNestedEnum.append(oneValueRepeatedNestedEnum.toString())
                }
                jsonMap["repeatedNestedEnum"] = jsonArrayRepeatedNestedEnum
            }
            if !repeatedForeignEnum.isEmpty {
                var jsonArrayRepeatedForeignEnum:Array<String> = []
                for oneValueRepeatedForeignEnum in repeatedForeignEnum {
                    jsonArrayRepeatedForeignEnum.append(oneValueRepeatedForeignEnum.toString())
                }
                jsonMap["repeatedForeignEnum"] = jsonArrayRepeatedForeignEnum
            }
            if !repeatedStringPiece.isEmpty {
                var jsonArrayRepeatedStringPiece:Array<String> = []
                for oneValueRepeatedStringPiece in repeatedStringPiece {
                    jsonArrayRepeatedStringPiece.append(oneValueRepeatedStringPiece)
                }
                jsonMap["repeatedStringPiece"] = jsonArrayRepeatedStringPiece
            }
            if !repeatedCord.isEmpty {
                var jsonArrayRepeatedCord:Array<String> = []
                for oneValueRepeatedCord in repeatedCord {
                    jsonArrayRepeatedCord.append(oneValueRepeatedCord)
                }
                jsonMap["repeatedCord"] = jsonArrayRepeatedCord
            }
            if !repeatedLazyMessage.isEmpty {
                var jsonArrayRepeatedLazyMessage:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedLazyMessage in repeatedLazyMessage {
                    let ecodedMessageRepeatedLazyMessage = try oneValueRepeatedLazyMessage.encode()
                    jsonArrayRepeatedLazyMessage.append(ecodedMessageRepeatedLazyMessage)
                }
                jsonMap["repeatedLazyMessage"] = jsonArrayRepeatedLazyMessage
            }
            if hasOneofUint32 {
                jsonMap["oneofUint32"] = UInt(oneofUint32)
            }
            if hasOneofNestedMessage {
                jsonMap["oneofNestedMessage"] = try oneofNestedMessage.encode()
            }
            if hasOneofString {
                jsonMap["oneofString"] = oneofString
            }
            if hasOneofBytes {
                jsonMap["oneofBytes"] = oneofBytes.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestAllTypes {
            return try Proto3ArenaUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestAllTypes {
            return try Proto3ArenaUnittest.TestAllTypes.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasOptionalInt32 {
                output += "\(indent) optionalInt32: \(String(describing: optionalInt32)) \n"
            }
            if hasOptionalInt64 {
                output += "\(indent) optionalInt64: \(String(describing: optionalInt64)) \n"
            }
            if hasOptionalUint32 {
                output += "\(indent) optionalUint32: \(String(describing: optionalUint32)) \n"
            }
            if hasOptionalUint64 {
                output += "\(indent) optionalUint64: \(String(describing: optionalUint64)) \n"
            }
            if hasOptionalSint32 {
                output += "\(indent) optionalSint32: \(String(describing: optionalSint32)) \n"
            }
            if hasOptionalSint64 {
                output += "\(indent) optionalSint64: \(String(describing: optionalSint64)) \n"
            }
            if hasOptionalFixed32 {
                output += "\(indent) optionalFixed32: \(String(describing: optionalFixed32)) \n"
            }
            if hasOptionalFixed64 {
                output += "\(indent) optionalFixed64: \(String(describing: optionalFixed64)) \n"
            }
            if hasOptionalSfixed32 {
                output += "\(indent) optionalSfixed32: \(String(describing: optionalSfixed32)) \n"
            }
            if hasOptionalSfixed64 {
                output += "\(indent) optionalSfixed64: \(String(describing: optionalSfixed64)) \n"
            }
            if hasOptionalFloat {
                output += "\(indent) optionalFloat: \(String(describing: optionalFloat)) \n"
            }
            if hasOptionalDouble {
                output += "\(indent) optionalDouble: \(String(describing: optionalDouble)) \n"
            }
            if hasOptionalBool {
                output += "\(indent) optionalBool: \(String(describing: optionalBool)) \n"
            }
            if hasOptionalString {
                output += "\(indent) optionalString: \(String(describing: optionalString)) \n"
            }
            if hasOptionalBytes {
                output += "\(indent) optionalBytes: \(String(describing: optionalBytes)) \n"
            }
            if hasOptionalNestedMessage {
                output += "\(indent) optionalNestedMessage {\n"
                if let outDescOptionalNestedMessage = optionalNestedMessage {
                    output += try outDescOptionalNestedMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasOptionalForeignMessage {
                output += "\(indent) optionalForeignMessage {\n"
                if let outDescOptionalForeignMessage = optionalForeignMessage {
                    output += try outDescOptionalForeignMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasOptionalImportMessage {
                output += "\(indent) optionalImportMessage {\n"
                if let outDescOptionalImportMessage = optionalImportMessage {
                    output += try outDescOptionalImportMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if (hasOptionalNestedEnum) {
                output += "\(indent) optionalNestedEnum: \(optionalNestedEnum.description)\n"
            }
            if (hasOptionalForeignEnum) {
                output += "\(indent) optionalForeignEnum: \(optionalForeignEnum.description)\n"
            }
            if hasOptionalStringPiece {
                output += "\(indent) optionalStringPiece: \(String(describing: optionalStringPiece)) \n"
            }
            if hasOptionalCord {
                output += "\(indent) optionalCord: \(String(describing: optionalCord)) \n"
            }
            if hasOptionalPublicImportMessage {
                output += "\(indent) optionalPublicImportMessage {\n"
                if let outDescOptionalPublicImportMessage = optionalPublicImportMessage {
                    output += try outDescOptionalPublicImportMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasOptionalLazyMessage {
                output += "\(indent) optionalLazyMessage {\n"
                if let outDescOptionalLazyMessage = optionalLazyMessage {
                    output += try outDescOptionalLazyMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            var repeatedInt32ElementIndex:Int = 0
            for oneValueRepeatedInt32 in repeatedInt32  {
                output += "\(indent) repeatedInt32[\(repeatedInt32ElementIndex)]: \(oneValueRepeatedInt32)\n"
                repeatedInt32ElementIndex += 1
            }
            var repeatedInt64ElementIndex:Int = 0
            for oneValueRepeatedInt64 in repeatedInt64  {
                output += "\(indent) repeatedInt64[\(repeatedInt64ElementIndex)]: \(oneValueRepeatedInt64)\n"
                repeatedInt64ElementIndex += 1
            }
            var repeatedUint32ElementIndex:Int = 0
            for oneValueRepeatedUint32 in repeatedUint32  {
                output += "\(indent) repeatedUint32[\(repeatedUint32ElementIndex)]: \(oneValueRepeatedUint32)\n"
                repeatedUint32ElementIndex += 1
            }
            var repeatedUint64ElementIndex:Int = 0
            for oneValueRepeatedUint64 in repeatedUint64  {
                output += "\(indent) repeatedUint64[\(repeatedUint64ElementIndex)]: \(oneValueRepeatedUint64)\n"
                repeatedUint64ElementIndex += 1
            }
            var repeatedSint32ElementIndex:Int = 0
            for oneValueRepeatedSint32 in repeatedSint32  {
                output += "\(indent) repeatedSint32[\(repeatedSint32ElementIndex)]: \(oneValueRepeatedSint32)\n"
                repeatedSint32ElementIndex += 1
            }
            var repeatedSint64ElementIndex:Int = 0
            for oneValueRepeatedSint64 in repeatedSint64  {
                output += "\(indent) repeatedSint64[\(repeatedSint64ElementIndex)]: \(oneValueRepeatedSint64)\n"
                repeatedSint64ElementIndex += 1
            }
            var repeatedFixed32ElementIndex:Int = 0
            for oneValueRepeatedFixed32 in repeatedFixed32  {
                output += "\(indent) repeatedFixed32[\(repeatedFixed32ElementIndex)]: \(oneValueRepeatedFixed32)\n"
                repeatedFixed32ElementIndex += 1
            }
            var repeatedFixed64ElementIndex:Int = 0
            for oneValueRepeatedFixed64 in repeatedFixed64  {
                output += "\(indent) repeatedFixed64[\(repeatedFixed64ElementIndex)]: \(oneValueRepeatedFixed64)\n"
                repeatedFixed64ElementIndex += 1
            }
            var repeatedSfixed32ElementIndex:Int = 0
            for oneValueRepeatedSfixed32 in repeatedSfixed32  {
                output += "\(indent) repeatedSfixed32[\(repeatedSfixed32ElementIndex)]: \(oneValueRepeatedSfixed32)\n"
                repeatedSfixed32ElementIndex += 1
            }
            var repeatedSfixed64ElementIndex:Int = 0
            for oneValueRepeatedSfixed64 in repeatedSfixed64  {
                output += "\(indent) repeatedSfixed64[\(repeatedSfixed64ElementIndex)]: \(oneValueRepeatedSfixed64)\n"
                repeatedSfixed64ElementIndex += 1
            }
            var repeatedFloatElementIndex:Int = 0
            for oneValueRepeatedFloat in repeatedFloat  {
                output += "\(indent) repeatedFloat[\(repeatedFloatElementIndex)]: \(oneValueRepeatedFloat)\n"
                repeatedFloatElementIndex += 1
            }
            var repeatedDoubleElementIndex:Int = 0
            for oneValueRepeatedDouble in repeatedDouble  {
                output += "\(indent) repeatedDouble[\(repeatedDoubleElementIndex)]: \(oneValueRepeatedDouble)\n"
                repeatedDoubleElementIndex += 1
            }
            var repeatedBoolElementIndex:Int = 0
            for oneValueRepeatedBool in repeatedBool  {
                output += "\(indent) repeatedBool[\(repeatedBoolElementIndex)]: \(oneValueRepeatedBool)\n"
                repeatedBoolElementIndex += 1
            }
            var repeatedStringElementIndex:Int = 0
            for oneValueRepeatedString in repeatedString  {
                output += "\(indent) repeatedString[\(repeatedStringElementIndex)]: \(oneValueRepeatedString)\n"
                repeatedStringElementIndex += 1
            }
            var repeatedBytesElementIndex:Int = 0
            for oneValueRepeatedBytes in repeatedBytes  {
                output += "\(indent) repeatedBytes[\(repeatedBytesElementIndex)]: \(oneValueRepeatedBytes)\n"
                repeatedBytesElementIndex += 1
            }
            var repeatedNestedMessageElementIndex:Int = 0
            for oneElementRepeatedNestedMessage in repeatedNestedMessage {
                output += "\(indent) repeatedNestedMessage[\(repeatedNestedMessageElementIndex)] {\n"
                output += try oneElementRepeatedNestedMessage.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedNestedMessageElementIndex += 1
            }
            var repeatedForeignMessageElementIndex:Int = 0
            for oneElementRepeatedForeignMessage in repeatedForeignMessage {
                output += "\(indent) repeatedForeignMessage[\(repeatedForeignMessageElementIndex)] {\n"
                output += try oneElementRepeatedForeignMessage.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedForeignMessageElementIndex += 1
            }
            var repeatedImportMessageElementIndex:Int = 0
            for oneElementRepeatedImportMessage in repeatedImportMessage {
                output += "\(indent) repeatedImportMessage[\(repeatedImportMessageElementIndex)] {\n"
                output += try oneElementRepeatedImportMessage.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedImportMessageElementIndex += 1
            }
            var repeatedNestedEnumElementIndex:Int = 0
            for oneValueOfrepeatedNestedEnum in repeatedNestedEnum {
                output += "\(indent) repeatedNestedEnum[\(repeatedNestedEnumElementIndex)]: \(oneValueOfrepeatedNestedEnum.description)\n"
                repeatedNestedEnumElementIndex += 1
            }
            var repeatedForeignEnumElementIndex:Int = 0
            for oneValueOfrepeatedForeignEnum in repeatedForeignEnum {
                output += "\(indent) repeatedForeignEnum[\(repeatedForeignEnumElementIndex)]: \(oneValueOfrepeatedForeignEnum.description)\n"
                repeatedForeignEnumElementIndex += 1
            }
            var repeatedStringPieceElementIndex:Int = 0
            for oneValueRepeatedStringPiece in repeatedStringPiece  {
                output += "\(indent) repeatedStringPiece[\(repeatedStringPieceElementIndex)]: \(oneValueRepeatedStringPiece)\n"
                repeatedStringPieceElementIndex += 1
            }
            var repeatedCordElementIndex:Int = 0
            for oneValueRepeatedCord in repeatedCord  {
                output += "\(indent) repeatedCord[\(repeatedCordElementIndex)]: \(oneValueRepeatedCord)\n"
                repeatedCordElementIndex += 1
            }
            var repeatedLazyMessageElementIndex:Int = 0
            for oneElementRepeatedLazyMessage in repeatedLazyMessage {
                output += "\(indent) repeatedLazyMessage[\(repeatedLazyMessageElementIndex)] {\n"
                output += try oneElementRepeatedLazyMessage.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedLazyMessageElementIndex += 1
            }
            if hasOneofUint32 {
                output += "\(indent) oneofUint32: \(String(describing: oneofUint32)) \n"
            }
            if hasOneofNestedMessage {
                output += "\(indent) oneofNestedMessage {\n"
                if let outDescOneofNestedMessage = oneofNestedMessage {
                    output += try outDescOneofNestedMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasOneofString {
                output += "\(indent) oneofString: \(String(describing: oneofString)) \n"
            }
            if hasOneofBytes {
                output += "\(indent) oneofBytes: \(String(describing: oneofBytes)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasOptionalInt32 {
                    hashCode = (hashCode &* 31) &+ optionalInt32.hashValue
                }
                if hasOptionalInt64 {
                    hashCode = (hashCode &* 31) &+ optionalInt64.hashValue
                }
                if hasOptionalUint32 {
                    hashCode = (hashCode &* 31) &+ optionalUint32.hashValue
                }
                if hasOptionalUint64 {
                    hashCode = (hashCode &* 31) &+ optionalUint64.hashValue
                }
                if hasOptionalSint32 {
                    hashCode = (hashCode &* 31) &+ optionalSint32.hashValue
                }
                if hasOptionalSint64 {
                    hashCode = (hashCode &* 31) &+ optionalSint64.hashValue
                }
                if hasOptionalFixed32 {
                    hashCode = (hashCode &* 31) &+ optionalFixed32.hashValue
                }
                if hasOptionalFixed64 {
                    hashCode = (hashCode &* 31) &+ optionalFixed64.hashValue
                }
                if hasOptionalSfixed32 {
                    hashCode = (hashCode &* 31) &+ optionalSfixed32.hashValue
                }
                if hasOptionalSfixed64 {
                    hashCode = (hashCode &* 31) &+ optionalSfixed64.hashValue
                }
                if hasOptionalFloat {
                    hashCode = (hashCode &* 31) &+ optionalFloat.hashValue
                }
                if hasOptionalDouble {
                    hashCode = (hashCode &* 31) &+ optionalDouble.hashValue
                }
                if hasOptionalBool {
                    hashCode = (hashCode &* 31) &+ optionalBool.hashValue
                }
                if hasOptionalString {
                    hashCode = (hashCode &* 31) &+ optionalString.hashValue
                }
                if hasOptionalBytes {
                    hashCode = (hashCode &* 31) &+ optionalBytes.hashValue
                }
                if hasOptionalNestedMessage {
                    if let hashValueoptionalNestedMessage = optionalNestedMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalNestedMessage
                    }
                }
                if hasOptionalForeignMessage {
                    if let hashValueoptionalForeignMessage = optionalForeignMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalForeignMessage
                    }
                }
                if hasOptionalImportMessage {
                    if let hashValueoptionalImportMessage = optionalImportMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalImportMessage
                    }
                }
                if hasOptionalNestedEnum {
                     hashCode = (hashCode &* 31) &+ optionalNestedEnum.hashValue
                }
                if hasOptionalForeignEnum {
                     hashCode = (hashCode &* 31) &+ optionalForeignEnum.hashValue
                }
                if hasOptionalStringPiece {
                    hashCode = (hashCode &* 31) &+ optionalStringPiece.hashValue
                }
                if hasOptionalCord {
                    hashCode = (hashCode &* 31) &+ optionalCord.hashValue
                }
                if hasOptionalPublicImportMessage {
                    if let hashValueoptionalPublicImportMessage = optionalPublicImportMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalPublicImportMessage
                    }
                }
                if hasOptionalLazyMessage {
                    if let hashValueoptionalLazyMessage = optionalLazyMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalLazyMessage
                    }
                }
                for oneValueRepeatedInt32 in repeatedInt32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedInt32.hashValue
                }
                for oneValueRepeatedInt64 in repeatedInt64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedInt64.hashValue
                }
                for oneValueRepeatedUint32 in repeatedUint32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedUint32.hashValue
                }
                for oneValueRepeatedUint64 in repeatedUint64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedUint64.hashValue
                }
                for oneValueRepeatedSint32 in repeatedSint32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedSint32.hashValue
                }
                for oneValueRepeatedSint64 in repeatedSint64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedSint64.hashValue
                }
                for oneValueRepeatedFixed32 in repeatedFixed32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedFixed32.hashValue
                }
                for oneValueRepeatedFixed64 in repeatedFixed64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedFixed64.hashValue
                }
                for oneValueRepeatedSfixed32 in repeatedSfixed32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedSfixed32.hashValue
                }
                for oneValueRepeatedSfixed64 in repeatedSfixed64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedSfixed64.hashValue
                }
                for oneValueRepeatedFloat in repeatedFloat {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedFloat.hashValue
                }
                for oneValueRepeatedDouble in repeatedDouble {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedDouble.hashValue
                }
                for oneValueRepeatedBool in repeatedBool {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedBool.hashValue
                }
                for oneValueRepeatedString in repeatedString {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedString.hashValue
                }
                for oneValueRepeatedBytes in repeatedBytes {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedBytes.hashValue
                }
                for oneElementRepeatedNestedMessage in repeatedNestedMessage {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedNestedMessage.hashValue
                }
                for oneElementRepeatedForeignMessage in repeatedForeignMessage {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedForeignMessage.hashValue
                }
                for oneElementRepeatedImportMessage in repeatedImportMessage {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedImportMessage.hashValue
                }
                for oneValueOfrepeatedNestedEnum in repeatedNestedEnum {
                    hashCode = (hashCode &* 31) &+ oneValueOfrepeatedNestedEnum.hashValue
                }
                for oneValueOfrepeatedForeignEnum in repeatedForeignEnum {
                    hashCode = (hashCode &* 31) &+ oneValueOfrepeatedForeignEnum.hashValue
                }
                for oneValueRepeatedStringPiece in repeatedStringPiece {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedStringPiece.hashValue
                }
                for oneValueRepeatedCord in repeatedCord {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedCord.hashValue
                }
                for oneElementRepeatedLazyMessage in repeatedLazyMessage {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedLazyMessage.hashValue
                }
                if hasOneofUint32 {
                    hashCode = (hashCode &* 31) &+ oneofUint32.hashValue
                }
                if hasOneofNestedMessage {
                    if let hashValueoneofNestedMessage = oneofNestedMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoneofNestedMessage
                    }
                }
                if hasOneofString {
                    hashCode = (hashCode &* 31) &+ oneofString.hashValue
                }
                if hasOneofBytes {
                    hashCode = (hashCode &* 31) &+ oneofBytes.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

        override public class func className() -> String {
            return "Proto3ArenaUnittest.TestAllTypes"
        }
        override public func className() -> String {
            return "Proto3ArenaUnittest.TestAllTypes"
        }
        //Meta information declaration end

        final public class Builder : GeneratedMessageBuilder {
            fileprivate var builderResult:Proto3ArenaUnittest.TestAllTypes = Proto3ArenaUnittest.TestAllTypes()
            public func getMessage() -> Proto3ArenaUnittest.TestAllTypes {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            public func setOneofField(_ oneOf:TestAllTypes.OneofField) ->  Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.storageOneofField = oneOf
                return self
            }
            /// Singular
            public var optionalInt32:Int32 {
                get {
                    return builderResult.optionalInt32
                }
                set (value) {
                    builderResult.hasOptionalInt32 = true
                    builderResult.optionalInt32 = value
                }
            }
            public var hasOptionalInt32:Bool {
                get {
                    return builderResult.hasOptionalInt32
                }
            }
            @discardableResult
            public func setOptionalInt32(_ value:Int32) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalInt32 = value
                return self
            }
            @discardableResult
            public func clearOptionalInt32() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalInt32 = false
                builderResult.optionalInt32 = nil
                return self
            }
            public var optionalInt64:Int64 {
                get {
                    return builderResult.optionalInt64
                }
                set (value) {
                    builderResult.hasOptionalInt64 = true
                    builderResult.optionalInt64 = value
                }
            }
            public var hasOptionalInt64:Bool {
                get {
                    return builderResult.hasOptionalInt64
                }
            }
            @discardableResult
            public func setOptionalInt64(_ value:Int64) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalInt64 = value
                return self
            }
            @discardableResult
            public func clearOptionalInt64() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalInt64 = false
                builderResult.optionalInt64 = nil
                return self
            }
            public var optionalUint32:UInt32 {
                get {
                    return builderResult.optionalUint32
                }
                set (value) {
                    builderResult.hasOptionalUint32 = true
                    builderResult.optionalUint32 = value
                }
            }
            public var hasOptionalUint32:Bool {
                get {
                    return builderResult.hasOptionalUint32
                }
            }
            @discardableResult
            public func setOptionalUint32(_ value:UInt32) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalUint32 = value
                return self
            }
            @discardableResult
            public func clearOptionalUint32() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalUint32 = false
                builderResult.optionalUint32 = nil
                return self
            }
            public var optionalUint64:UInt64 {
                get {
                    return builderResult.optionalUint64
                }
                set (value) {
                    builderResult.hasOptionalUint64 = true
                    builderResult.optionalUint64 = value
                }
            }
            public var hasOptionalUint64:Bool {
                get {
                    return builderResult.hasOptionalUint64
                }
            }
            @discardableResult
            public func setOptionalUint64(_ value:UInt64) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalUint64 = value
                return self
            }
            @discardableResult
            public func clearOptionalUint64() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalUint64 = false
                builderResult.optionalUint64 = nil
                return self
            }
            public var optionalSint32:Int32 {
                get {
                    return builderResult.optionalSint32
                }
                set (value) {
                    builderResult.hasOptionalSint32 = true
                    builderResult.optionalSint32 = value
                }
            }
            public var hasOptionalSint32:Bool {
                get {
                    return builderResult.hasOptionalSint32
                }
            }
            @discardableResult
            public func setOptionalSint32(_ value:Int32) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalSint32 = value
                return self
            }
            @discardableResult
            public func clearOptionalSint32() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalSint32 = false
                builderResult.optionalSint32 = nil
                return self
            }
            public var optionalSint64:Int64 {
                get {
                    return builderResult.optionalSint64
                }
                set (value) {
                    builderResult.hasOptionalSint64 = true
                    builderResult.optionalSint64 = value
                }
            }
            public var hasOptionalSint64:Bool {
                get {
                    return builderResult.hasOptionalSint64
                }
            }
            @discardableResult
            public func setOptionalSint64(_ value:Int64) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalSint64 = value
                return self
            }
            @discardableResult
            public func clearOptionalSint64() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalSint64 = false
                builderResult.optionalSint64 = nil
                return self
            }
            public var optionalFixed32:UInt32 {
                get {
                    return builderResult.optionalFixed32
                }
                set (value) {
                    builderResult.hasOptionalFixed32 = true
                    builderResult.optionalFixed32 = value
                }
            }
            public var hasOptionalFixed32:Bool {
                get {
                    return builderResult.hasOptionalFixed32
                }
            }
            @discardableResult
            public func setOptionalFixed32(_ value:UInt32) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalFixed32 = value
                return self
            }
            @discardableResult
            public func clearOptionalFixed32() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalFixed32 = false
                builderResult.optionalFixed32 = nil
                return self
            }
            public var optionalFixed64:UInt64 {
                get {
                    return builderResult.optionalFixed64
                }
                set (value) {
                    builderResult.hasOptionalFixed64 = true
                    builderResult.optionalFixed64 = value
                }
            }
            public var hasOptionalFixed64:Bool {
                get {
                    return builderResult.hasOptionalFixed64
                }
            }
            @discardableResult
            public func setOptionalFixed64(_ value:UInt64) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalFixed64 = value
                return self
            }
            @discardableResult
            public func clearOptionalFixed64() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalFixed64 = false
                builderResult.optionalFixed64 = nil
                return self
            }
            public var optionalSfixed32:Int32 {
                get {
                    return builderResult.optionalSfixed32
                }
                set (value) {
                    builderResult.hasOptionalSfixed32 = true
                    builderResult.optionalSfixed32 = value
                }
            }
            public var hasOptionalSfixed32:Bool {
                get {
                    return builderResult.hasOptionalSfixed32
                }
            }
            @discardableResult
            public func setOptionalSfixed32(_ value:Int32) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalSfixed32 = value
                return self
            }
            @discardableResult
            public func clearOptionalSfixed32() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalSfixed32 = false
                builderResult.optionalSfixed32 = nil
                return self
            }
            public var optionalSfixed64:Int64 {
                get {
                    return builderResult.optionalSfixed64
                }
                set (value) {
                    builderResult.hasOptionalSfixed64 = true
                    builderResult.optionalSfixed64 = value
                }
            }
            public var hasOptionalSfixed64:Bool {
                get {
                    return builderResult.hasOptionalSfixed64
                }
            }
            @discardableResult
            public func setOptionalSfixed64(_ value:Int64) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalSfixed64 = value
                return self
            }
            @discardableResult
            public func clearOptionalSfixed64() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalSfixed64 = false
                builderResult.optionalSfixed64 = nil
                return self
            }
            public var optionalFloat:Float {
                get {
                    return builderResult.optionalFloat
                }
                set (value) {
                    builderResult.hasOptionalFloat = true
                    builderResult.optionalFloat = value
                }
            }
            public var hasOptionalFloat:Bool {
                get {
                    return builderResult.hasOptionalFloat
                }
            }
            @discardableResult
            public func setOptionalFloat(_ value:Float) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalFloat = value
                return self
            }
            @discardableResult
            public func clearOptionalFloat() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalFloat = false
                builderResult.optionalFloat = nil
                return self
            }
            public var optionalDouble:Double {
                get {
                    return builderResult.optionalDouble
                }
                set (value) {
                    builderResult.hasOptionalDouble = true
                    builderResult.optionalDouble = value
                }
            }
            public var hasOptionalDouble:Bool {
                get {
                    return builderResult.hasOptionalDouble
                }
            }
            @discardableResult
            public func setOptionalDouble(_ value:Double) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalDouble = value
                return self
            }
            @discardableResult
            public func clearOptionalDouble() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalDouble = false
                builderResult.optionalDouble = nil
                return self
            }
            public var optionalBool:Bool {
                get {
                    return builderResult.optionalBool
                }
                set (value) {
                    builderResult.hasOptionalBool = true
                    builderResult.optionalBool = value
                }
            }
            public var hasOptionalBool:Bool {
                get {
                    return builderResult.hasOptionalBool
                }
            }
            @discardableResult
            public func setOptionalBool(_ value:Bool) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalBool = value
                return self
            }
            @discardableResult
            public func clearOptionalBool() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalBool = false
                builderResult.optionalBool = nil
                return self
            }
            public var optionalString:String {
                get {
                    return builderResult.optionalString
                }
                set (value) {
                    builderResult.hasOptionalString = true
                    builderResult.optionalString = value
                }
            }
            public var hasOptionalString:Bool {
                get {
                    return builderResult.hasOptionalString
                }
            }
            @discardableResult
            public func setOptionalString(_ value:String) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalString = value
                return self
            }
            @discardableResult
            public func clearOptionalString() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalString = false
                builderResult.optionalString = nil
                return self
            }
            public var optionalBytes:Data {
                get {
                    return builderResult.optionalBytes
                }
                set (value) {
                    builderResult.hasOptionalBytes = true
                    builderResult.optionalBytes = value
                }
            }
            public var hasOptionalBytes:Bool {
                get {
                    return builderResult.hasOptionalBytes
                }
            }
            @discardableResult
            public func setOptionalBytes(_ value:Data) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalBytes = value
                return self
            }
            @discardableResult
            public func clearOptionalBytes() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalBytes = false
                builderResult.optionalBytes = nil
                return self
            }
            public var optionalNestedMessage:Proto3ArenaUnittest.TestAllTypes.NestedMessage! {
                get {
                    if optionalNestedMessageBuilder_ != nil {
                        builderResult.optionalNestedMessage = optionalNestedMessageBuilder_.getMessage()
                    }
                    return builderResult.optionalNestedMessage
                }
                set (value) {
                    builderResult.hasOptionalNestedMessage = value != nil
                    builderResult.optionalNestedMessage = value
                }
            }
            public var hasOptionalNestedMessage:Bool {
                get {
                    return builderResult.hasOptionalNestedMessage
                }
            }
            fileprivate var optionalNestedMessageBuilder_:Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder! {
                didSet {
                    builderResult.hasOptionalNestedMessage = true
                }
            }
            public func getOptionalNestedMessageBuilder() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                if optionalNestedMessageBuilder_ == nil {
                    optionalNestedMessageBuilder_ = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
                    builderResult.optionalNestedMessage = optionalNestedMessageBuilder_.getMessage()
                    if optionalNestedMessage != nil {
                        try! optionalNestedMessageBuilder_.mergeFrom(other: optionalNestedMessage)
                    }
                }
                return optionalNestedMessageBuilder_
            }
            @discardableResult
            public func setOptionalNestedMessage(_ value:Proto3ArenaUnittest.TestAllTypes.NestedMessage!) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalNestedMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalNestedMessage(value:Proto3ArenaUnittest.TestAllTypes.NestedMessage) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                if builderResult.hasOptionalNestedMessage {
                    builderResult.optionalNestedMessage = try Proto3ArenaUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:builderResult.optionalNestedMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalNestedMessage = value
                }
                builderResult.hasOptionalNestedMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalNestedMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                optionalNestedMessageBuilder_ = nil
                builderResult.hasOptionalNestedMessage = false
                builderResult.optionalNestedMessage = nil
                return self
            }
            public var optionalForeignMessage:Proto3ArenaUnittest.ForeignMessage! {
                get {
                    if optionalForeignMessageBuilder_ != nil {
                        builderResult.optionalForeignMessage = optionalForeignMessageBuilder_.getMessage()
                    }
                    return builderResult.optionalForeignMessage
                }
                set (value) {
                    builderResult.hasOptionalForeignMessage = value != nil
                    builderResult.optionalForeignMessage = value
                }
            }
            public var hasOptionalForeignMessage:Bool {
                get {
                    return builderResult.hasOptionalForeignMessage
                }
            }
            fileprivate var optionalForeignMessageBuilder_:Proto3ArenaUnittest.ForeignMessage.Builder! {
                didSet {
                    builderResult.hasOptionalForeignMessage = true
                }
            }
            public func getOptionalForeignMessageBuilder() -> Proto3ArenaUnittest.ForeignMessage.Builder {
                if optionalForeignMessageBuilder_ == nil {
                    optionalForeignMessageBuilder_ = Proto3ArenaUnittest.ForeignMessage.Builder()
                    builderResult.optionalForeignMessage = optionalForeignMessageBuilder_.getMessage()
                    if optionalForeignMessage != nil {
                        try! optionalForeignMessageBuilder_.mergeFrom(other: optionalForeignMessage)
                    }
                }
                return optionalForeignMessageBuilder_
            }
            @discardableResult
            public func setOptionalForeignMessage(_ value:Proto3ArenaUnittest.ForeignMessage!) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalForeignMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalForeignMessage(value:Proto3ArenaUnittest.ForeignMessage) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                if builderResult.hasOptionalForeignMessage {
                    builderResult.optionalForeignMessage = try Proto3ArenaUnittest.ForeignMessage.builderWithPrototype(prototype:builderResult.optionalForeignMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalForeignMessage = value
                }
                builderResult.hasOptionalForeignMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalForeignMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                optionalForeignMessageBuilder_ = nil
                builderResult.hasOptionalForeignMessage = false
                builderResult.optionalForeignMessage = nil
                return self
            }
            public var optionalImportMessage:ProtobufUnittestImport.ImportMessage! {
                get {
                    if optionalImportMessageBuilder_ != nil {
                        builderResult.optionalImportMessage = optionalImportMessageBuilder_.getMessage()
                    }
                    return builderResult.optionalImportMessage
                }
                set (value) {
                    builderResult.hasOptionalImportMessage = value != nil
                    builderResult.optionalImportMessage = value
                }
            }
            public var hasOptionalImportMessage:Bool {
                get {
                    return builderResult.hasOptionalImportMessage
                }
            }
            fileprivate var optionalImportMessageBuilder_:ProtobufUnittestImport.ImportMessage.Builder! {
                didSet {
                    builderResult.hasOptionalImportMessage = true
                }
            }
            public func getOptionalImportMessageBuilder() -> ProtobufUnittestImport.ImportMessage.Builder {
                if optionalImportMessageBuilder_ == nil {
                    optionalImportMessageBuilder_ = ProtobufUnittestImport.ImportMessage.Builder()
                    builderResult.optionalImportMessage = optionalImportMessageBuilder_.getMessage()
                    if optionalImportMessage != nil {
                        try! optionalImportMessageBuilder_.mergeFrom(other: optionalImportMessage)
                    }
                }
                return optionalImportMessageBuilder_
            }
            @discardableResult
            public func setOptionalImportMessage(_ value:ProtobufUnittestImport.ImportMessage!) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalImportMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalImportMessage(value:ProtobufUnittestImport.ImportMessage) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                if builderResult.hasOptionalImportMessage {
                    builderResult.optionalImportMessage = try ProtobufUnittestImport.ImportMessage.builderWithPrototype(prototype:builderResult.optionalImportMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalImportMessage = value
                }
                builderResult.hasOptionalImportMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalImportMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                optionalImportMessageBuilder_ = nil
                builderResult.hasOptionalImportMessage = false
                builderResult.optionalImportMessage = nil
                return self
            }
                public var optionalNestedEnum:Proto3ArenaUnittest.TestAllTypes.NestedEnum {
                    get {
                        return builderResult.optionalNestedEnum
                    }
                    set (value) {
                        builderResult.hasOptionalNestedEnum = true
                        builderResult.optionalNestedEnum = value
                    }
                }
                public var hasOptionalNestedEnum:Bool{
                    get {
                        return builderResult.hasOptionalNestedEnum
                    }
                }
            @discardableResult
                public func setOptionalNestedEnum(_ value:Proto3ArenaUnittest.TestAllTypes.NestedEnum) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                  self.optionalNestedEnum = value
                  return self
                }
            @discardableResult
                public func clearOptionalNestedEnum() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                   builderResult.hasOptionalNestedEnum = false
                   builderResult.optionalNestedEnum = .zero
                   return self
                }
                public var optionalForeignEnum:Proto3ArenaUnittest.ForeignEnum {
                    get {
                        return builderResult.optionalForeignEnum
                    }
                    set (value) {
                        builderResult.hasOptionalForeignEnum = true
                        builderResult.optionalForeignEnum = value
                    }
                }
                public var hasOptionalForeignEnum:Bool{
                    get {
                        return builderResult.hasOptionalForeignEnum
                    }
                }
            @discardableResult
                public func setOptionalForeignEnum(_ value:Proto3ArenaUnittest.ForeignEnum) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                  self.optionalForeignEnum = value
                  return self
                }
            @discardableResult
                public func clearOptionalForeignEnum() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                   builderResult.hasOptionalForeignEnum = false
                   builderResult.optionalForeignEnum = .foreignZero
                   return self
                }
            public var optionalStringPiece:String {
                get {
                    return builderResult.optionalStringPiece
                }
                set (value) {
                    builderResult.hasOptionalStringPiece = true
                    builderResult.optionalStringPiece = value
                }
            }
            public var hasOptionalStringPiece:Bool {
                get {
                    return builderResult.hasOptionalStringPiece
                }
            }
            @discardableResult
            public func setOptionalStringPiece(_ value:String) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalStringPiece = value
                return self
            }
            @discardableResult
            public func clearOptionalStringPiece() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalStringPiece = false
                builderResult.optionalStringPiece = nil
                return self
            }
            public var optionalCord:String {
                get {
                    return builderResult.optionalCord
                }
                set (value) {
                    builderResult.hasOptionalCord = true
                    builderResult.optionalCord = value
                }
            }
            public var hasOptionalCord:Bool {
                get {
                    return builderResult.hasOptionalCord
                }
            }
            @discardableResult
            public func setOptionalCord(_ value:String) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalCord = value
                return self
            }
            @discardableResult
            public func clearOptionalCord() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalCord = false
                builderResult.optionalCord = nil
                return self
            }
            /// Defined in unittest_import_public.proto
            public var optionalPublicImportMessage:ProtobufUnittestImport.PublicImportMessage! {
                get {
                    if optionalPublicImportMessageBuilder_ != nil {
                        builderResult.optionalPublicImportMessage = optionalPublicImportMessageBuilder_.getMessage()
                    }
                    return builderResult.optionalPublicImportMessage
                }
                set (value) {
                    builderResult.hasOptionalPublicImportMessage = value != nil
                    builderResult.optionalPublicImportMessage = value
                }
            }
            public var hasOptionalPublicImportMessage:Bool {
                get {
                    return builderResult.hasOptionalPublicImportMessage
                }
            }
            fileprivate var optionalPublicImportMessageBuilder_:ProtobufUnittestImport.PublicImportMessage.Builder! {
                didSet {
                    builderResult.hasOptionalPublicImportMessage = true
                }
            }
            public func getOptionalPublicImportMessageBuilder() -> ProtobufUnittestImport.PublicImportMessage.Builder {
                if optionalPublicImportMessageBuilder_ == nil {
                    optionalPublicImportMessageBuilder_ = ProtobufUnittestImport.PublicImportMessage.Builder()
                    builderResult.optionalPublicImportMessage = optionalPublicImportMessageBuilder_.getMessage()
                    if optionalPublicImportMessage != nil {
                        try! optionalPublicImportMessageBuilder_.mergeFrom(other: optionalPublicImportMessage)
                    }
                }
                return optionalPublicImportMessageBuilder_
            }
            @discardableResult
            public func setOptionalPublicImportMessage(_ value:ProtobufUnittestImport.PublicImportMessage!) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalPublicImportMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalPublicImportMessage(value:ProtobufUnittestImport.PublicImportMessage) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                if builderResult.hasOptionalPublicImportMessage {
                    builderResult.optionalPublicImportMessage = try ProtobufUnittestImport.PublicImportMessage.builderWithPrototype(prototype:builderResult.optionalPublicImportMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalPublicImportMessage = value
                }
                builderResult.hasOptionalPublicImportMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalPublicImportMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                optionalPublicImportMessageBuilder_ = nil
                builderResult.hasOptionalPublicImportMessage = false
                builderResult.optionalPublicImportMessage = nil
                return self
            }
            public var optionalLazyMessage:Proto3ArenaUnittest.TestAllTypes.NestedMessage! {
                get {
                    if optionalLazyMessageBuilder_ != nil {
                        builderResult.optionalLazyMessage = optionalLazyMessageBuilder_.getMessage()
                    }
                    return builderResult.optionalLazyMessage
                }
                set (value) {
                    builderResult.hasOptionalLazyMessage = value != nil
                    builderResult.optionalLazyMessage = value
                }
            }
            public var hasOptionalLazyMessage:Bool {
                get {
                    return builderResult.hasOptionalLazyMessage
                }
            }
            fileprivate var optionalLazyMessageBuilder_:Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder! {
                didSet {
                    builderResult.hasOptionalLazyMessage = true
                }
            }
            public func getOptionalLazyMessageBuilder() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                if optionalLazyMessageBuilder_ == nil {
                    optionalLazyMessageBuilder_ = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
                    builderResult.optionalLazyMessage = optionalLazyMessageBuilder_.getMessage()
                    if optionalLazyMessage != nil {
                        try! optionalLazyMessageBuilder_.mergeFrom(other: optionalLazyMessage)
                    }
                }
                return optionalLazyMessageBuilder_
            }
            @discardableResult
            public func setOptionalLazyMessage(_ value:Proto3ArenaUnittest.TestAllTypes.NestedMessage!) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.optionalLazyMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalLazyMessage(value:Proto3ArenaUnittest.TestAllTypes.NestedMessage) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                if builderResult.hasOptionalLazyMessage {
                    builderResult.optionalLazyMessage = try Proto3ArenaUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:builderResult.optionalLazyMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalLazyMessage = value
                }
                builderResult.hasOptionalLazyMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalLazyMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                optionalLazyMessageBuilder_ = nil
                builderResult.hasOptionalLazyMessage = false
                builderResult.optionalLazyMessage = nil
                return self
            }
            /// Repeated
            public var repeatedInt32:Array<Int32> {
                get {
                    return builderResult.repeatedInt32
                }
                set (array) {
                    builderResult.repeatedInt32 = array
                }
            }
            @discardableResult
            public func setRepeatedInt32(_ value:Array<Int32>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedInt32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedInt32() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedInt32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedInt64:Array<Int64> {
                get {
                    return builderResult.repeatedInt64
                }
                set (array) {
                    builderResult.repeatedInt64 = array
                }
            }
            @discardableResult
            public func setRepeatedInt64(_ value:Array<Int64>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedInt64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedInt64() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedInt64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedUint32:Array<UInt32> {
                get {
                    return builderResult.repeatedUint32
                }
                set (array) {
                    builderResult.repeatedUint32 = array
                }
            }
            @discardableResult
            public func setRepeatedUint32(_ value:Array<UInt32>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedUint32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedUint32() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedUint32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedUint64:Array<UInt64> {
                get {
                    return builderResult.repeatedUint64
                }
                set (array) {
                    builderResult.repeatedUint64 = array
                }
            }
            @discardableResult
            public func setRepeatedUint64(_ value:Array<UInt64>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedUint64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedUint64() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedUint64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedSint32:Array<Int32> {
                get {
                    return builderResult.repeatedSint32
                }
                set (array) {
                    builderResult.repeatedSint32 = array
                }
            }
            @discardableResult
            public func setRepeatedSint32(_ value:Array<Int32>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedSint32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSint32() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedSint32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedSint64:Array<Int64> {
                get {
                    return builderResult.repeatedSint64
                }
                set (array) {
                    builderResult.repeatedSint64 = array
                }
            }
            @discardableResult
            public func setRepeatedSint64(_ value:Array<Int64>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedSint64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSint64() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedSint64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedFixed32:Array<UInt32> {
                get {
                    return builderResult.repeatedFixed32
                }
                set (array) {
                    builderResult.repeatedFixed32 = array
                }
            }
            @discardableResult
            public func setRepeatedFixed32(_ value:Array<UInt32>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedFixed32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedFixed32() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedFixed32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedFixed64:Array<UInt64> {
                get {
                    return builderResult.repeatedFixed64
                }
                set (array) {
                    builderResult.repeatedFixed64 = array
                }
            }
            @discardableResult
            public func setRepeatedFixed64(_ value:Array<UInt64>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedFixed64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedFixed64() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedFixed64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedSfixed32:Array<Int32> {
                get {
                    return builderResult.repeatedSfixed32
                }
                set (array) {
                    builderResult.repeatedSfixed32 = array
                }
            }
            @discardableResult
            public func setRepeatedSfixed32(_ value:Array<Int32>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedSfixed32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSfixed32() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedSfixed32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedSfixed64:Array<Int64> {
                get {
                    return builderResult.repeatedSfixed64
                }
                set (array) {
                    builderResult.repeatedSfixed64 = array
                }
            }
            @discardableResult
            public func setRepeatedSfixed64(_ value:Array<Int64>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedSfixed64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSfixed64() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedSfixed64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedFloat:Array<Float> {
                get {
                    return builderResult.repeatedFloat
                }
                set (array) {
                    builderResult.repeatedFloat = array
                }
            }
            @discardableResult
            public func setRepeatedFloat(_ value:Array<Float>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedFloat = value
                return self
            }
            @discardableResult
            public func clearRepeatedFloat() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedFloat.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedDouble:Array<Double> {
                get {
                    return builderResult.repeatedDouble
                }
                set (array) {
                    builderResult.repeatedDouble = array
                }
            }
            @discardableResult
            public func setRepeatedDouble(_ value:Array<Double>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedDouble = value
                return self
            }
            @discardableResult
            public func clearRepeatedDouble() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedDouble.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedBool:Array<Bool> {
                get {
                    return builderResult.repeatedBool
                }
                set (array) {
                    builderResult.repeatedBool = array
                }
            }
            @discardableResult
            public func setRepeatedBool(_ value:Array<Bool>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedBool = value
                return self
            }
            @discardableResult
            public func clearRepeatedBool() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedBool.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedString:Array<String> {
                get {
                    return builderResult.repeatedString
                }
                set (array) {
                    builderResult.repeatedString = array
                }
            }
            @discardableResult
            public func setRepeatedString(_ value:Array<String>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedString = value
                return self
            }
            @discardableResult
            public func clearRepeatedString() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedString.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedBytes:Array<Data> {
                get {
                    return builderResult.repeatedBytes
                }
                set (array) {
                    builderResult.repeatedBytes = array
                }
            }
            @discardableResult
            public func setRepeatedBytes(_ value:Array<Data>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedBytes = value
                return self
            }
            @discardableResult
            public func clearRepeatedBytes() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedBytes.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedNestedMessage:Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage> {
                get {
                    return builderResult.repeatedNestedMessage
                }
                set (value) {
                    builderResult.repeatedNestedMessage = value
                }
            }
            @discardableResult
            public func setRepeatedNestedMessage(_ value:Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedNestedMessage = value
                return self
            }
            @discardableResult
            public func clearRepeatedNestedMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedNestedMessage.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedForeignMessage:Array<Proto3ArenaUnittest.ForeignMessage> {
                get {
                    return builderResult.repeatedForeignMessage
                }
                set (value) {
                    builderResult.repeatedForeignMessage = value
                }
            }
            @discardableResult
            public func setRepeatedForeignMessage(_ value:Array<Proto3ArenaUnittest.ForeignMessage>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedForeignMessage = value
                return self
            }
            @discardableResult
            public func clearRepeatedForeignMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedForeignMessage.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedImportMessage:Array<ProtobufUnittestImport.ImportMessage> {
                get {
                    return builderResult.repeatedImportMessage
                }
                set (value) {
                    builderResult.repeatedImportMessage = value
                }
            }
            @discardableResult
            public func setRepeatedImportMessage(_ value:Array<ProtobufUnittestImport.ImportMessage>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedImportMessage = value
                return self
            }
            @discardableResult
            public func clearRepeatedImportMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedImportMessage.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedNestedEnum:Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum> {
                get {
                    return builderResult.repeatedNestedEnum
                }
                set (value) {
                    builderResult.repeatedNestedEnum = value
                }
            }
            @discardableResult
            public func setRepeatedNestedEnum(_ value:Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedNestedEnum = value
                return self
            }
            @discardableResult
            public func clearRepeatedNestedEnum() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedNestedEnum.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedForeignEnum:Array<Proto3ArenaUnittest.ForeignEnum> {
                get {
                    return builderResult.repeatedForeignEnum
                }
                set (value) {
                    builderResult.repeatedForeignEnum = value
                }
            }
            @discardableResult
            public func setRepeatedForeignEnum(_ value:Array<Proto3ArenaUnittest.ForeignEnum>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedForeignEnum = value
                return self
            }
            @discardableResult
            public func clearRepeatedForeignEnum() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedForeignEnum.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedStringPiece:Array<String> {
                get {
                    return builderResult.repeatedStringPiece
                }
                set (array) {
                    builderResult.repeatedStringPiece = array
                }
            }
            @discardableResult
            public func setRepeatedStringPiece(_ value:Array<String>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedStringPiece = value
                return self
            }
            @discardableResult
            public func clearRepeatedStringPiece() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedStringPiece.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedCord:Array<String> {
                get {
                    return builderResult.repeatedCord
                }
                set (array) {
                    builderResult.repeatedCord = array
                }
            }
            @discardableResult
            public func setRepeatedCord(_ value:Array<String>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedCord = value
                return self
            }
            @discardableResult
            public func clearRepeatedCord() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedCord.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedLazyMessage:Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage> {
                get {
                    return builderResult.repeatedLazyMessage
                }
                set (value) {
                    builderResult.repeatedLazyMessage = value
                }
            }
            @discardableResult
            public func setRepeatedLazyMessage(_ value:Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage>) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.repeatedLazyMessage = value
                return self
            }
            @discardableResult
            public func clearRepeatedLazyMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult.repeatedLazyMessage.removeAll(keepingCapacity: false)
                return self
            }
            public var oneofUint32:UInt32 {
                get {
                    return builderResult.oneofUint32
                }
                set (value) {
                    builderResult.hasOneofUint32 = true
                    builderResult.oneofUint32 = value
                }
            }
            public var hasOneofUint32:Bool {
                get {
                    return builderResult.hasOneofUint32
                }
            }
            @discardableResult
            public func setOneofUint32(_ value:UInt32) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.oneofUint32 = value
                return self
            }
            @discardableResult
            public func clearOneofUint32() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOneofUint32 = false
                builderResult.oneofUint32 = nil
                return self
            }
            public var oneofNestedMessage:Proto3ArenaUnittest.TestAllTypes.NestedMessage! {
                get {
                    if oneofNestedMessageBuilder_ != nil {
                        builderResult.oneofNestedMessage = oneofNestedMessageBuilder_.getMessage()
                    }
                    return builderResult.oneofNestedMessage
                }
                set (value) {
                    builderResult.hasOneofNestedMessage = value != nil
                    builderResult.oneofNestedMessage = value
                }
            }
            public var hasOneofNestedMessage:Bool {
                get {
                    return builderResult.hasOneofNestedMessage
                }
            }
            fileprivate var oneofNestedMessageBuilder_:Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder! {
                didSet {
                    builderResult.hasOneofNestedMessage = true
                }
            }
            public func getOneofNestedMessageBuilder() -> Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder {
                if oneofNestedMessageBuilder_ == nil {
                    oneofNestedMessageBuilder_ = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
                    builderResult.oneofNestedMessage = oneofNestedMessageBuilder_.getMessage()
                    if oneofNestedMessage != nil {
                        try! oneofNestedMessageBuilder_.mergeFrom(other: oneofNestedMessage)
                    }
                }
                return oneofNestedMessageBuilder_
            }
            @discardableResult
            public func setOneofNestedMessage(_ value:Proto3ArenaUnittest.TestAllTypes.NestedMessage!) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.oneofNestedMessage = value
                return self
            }
            @discardableResult
            public func mergeOneofNestedMessage(value:Proto3ArenaUnittest.TestAllTypes.NestedMessage) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                if builderResult.hasOneofNestedMessage {
                    builderResult.oneofNestedMessage = try Proto3ArenaUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:builderResult.oneofNestedMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.oneofNestedMessage = value
                }
                builderResult.hasOneofNestedMessage = true
                return self
            }
            @discardableResult
            public func clearOneofNestedMessage() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                oneofNestedMessageBuilder_ = nil
                builderResult.hasOneofNestedMessage = false
                builderResult.oneofNestedMessage = nil
                return self
            }
            public var oneofString:String {
                get {
                    return builderResult.oneofString
                }
                set (value) {
                    builderResult.hasOneofString = true
                    builderResult.oneofString = value
                }
            }
            public var hasOneofString:Bool {
                get {
                    return builderResult.hasOneofString
                }
            }
            @discardableResult
            public func setOneofString(_ value:String) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.oneofString = value
                return self
            }
            @discardableResult
            public func clearOneofString() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOneofString = false
                builderResult.oneofString = nil
                return self
            }
            public var oneofBytes:Data {
                get {
                    return builderResult.oneofBytes
                }
                set (value) {
                    builderResult.hasOneofBytes = true
                    builderResult.oneofBytes = value
                }
            }
            public var hasOneofBytes:Bool {
                get {
                    return builderResult.hasOneofBytes
                }
            }
            @discardableResult
            public func setOneofBytes(_ value:Data) -> Proto3ArenaUnittest.TestAllTypes.Builder {
                self.oneofBytes = value
                return self
            }
            @discardableResult
            public func clearOneofBytes() -> Proto3ArenaUnittest.TestAllTypes.Builder{
                builderResult.hasOneofBytes = false
                builderResult.oneofBytes = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                builderResult = Proto3ArenaUnittest.TestAllTypes()
                return self
            }
            override public func clone() throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                return try Proto3ArenaUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Proto3ArenaUnittest.TestAllTypes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Proto3ArenaUnittest.TestAllTypes {
                let returnMe:Proto3ArenaUnittest.TestAllTypes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Proto3ArenaUnittest.TestAllTypes) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                if other == Proto3ArenaUnittest.TestAllTypes() {
                    return self
                }
                if other.hasOptionalInt32 {
                    optionalInt32 = other.optionalInt32
                }
                if other.hasOptionalInt64 {
                    optionalInt64 = other.optionalInt64
                }
                if other.hasOptionalUint32 {
                    optionalUint32 = other.optionalUint32
                }
                if other.hasOptionalUint64 {
                    optionalUint64 = other.optionalUint64
                }
                if other.hasOptionalSint32 {
                    optionalSint32 = other.optionalSint32
                }
                if other.hasOptionalSint64 {
                    optionalSint64 = other.optionalSint64
                }
                if other.hasOptionalFixed32 {
                    optionalFixed32 = other.optionalFixed32
                }
                if other.hasOptionalFixed64 {
                    optionalFixed64 = other.optionalFixed64
                }
                if other.hasOptionalSfixed32 {
                    optionalSfixed32 = other.optionalSfixed32
                }
                if other.hasOptionalSfixed64 {
                    optionalSfixed64 = other.optionalSfixed64
                }
                if other.hasOptionalFloat {
                    optionalFloat = other.optionalFloat
                }
                if other.hasOptionalDouble {
                    optionalDouble = other.optionalDouble
                }
                if other.hasOptionalBool {
                    optionalBool = other.optionalBool
                }
                if other.hasOptionalString {
                    optionalString = other.optionalString
                }
                if other.hasOptionalBytes {
                    optionalBytes = other.optionalBytes
                }
                if (other.hasOptionalNestedMessage) {
                    try mergeOptionalNestedMessage(value: other.optionalNestedMessage)
                }
                if (other.hasOptionalForeignMessage) {
                    try mergeOptionalForeignMessage(value: other.optionalForeignMessage)
                }
                if (other.hasOptionalImportMessage) {
                    try mergeOptionalImportMessage(value: other.optionalImportMessage)
                }
                if other.hasOptionalNestedEnum {
                    optionalNestedEnum = other.optionalNestedEnum
                }
                if other.hasOptionalForeignEnum {
                    optionalForeignEnum = other.optionalForeignEnum
                }
                if other.hasOptionalStringPiece {
                    optionalStringPiece = other.optionalStringPiece
                }
                if other.hasOptionalCord {
                    optionalCord = other.optionalCord
                }
                if (other.hasOptionalPublicImportMessage) {
                    try mergeOptionalPublicImportMessage(value: other.optionalPublicImportMessage)
                }
                if (other.hasOptionalLazyMessage) {
                    try mergeOptionalLazyMessage(value: other.optionalLazyMessage)
                }
                if !other.repeatedInt32.isEmpty {
                    builderResult.repeatedInt32 += other.repeatedInt32
                }
                if !other.repeatedInt64.isEmpty {
                    builderResult.repeatedInt64 += other.repeatedInt64
                }
                if !other.repeatedUint32.isEmpty {
                    builderResult.repeatedUint32 += other.repeatedUint32
                }
                if !other.repeatedUint64.isEmpty {
                    builderResult.repeatedUint64 += other.repeatedUint64
                }
                if !other.repeatedSint32.isEmpty {
                    builderResult.repeatedSint32 += other.repeatedSint32
                }
                if !other.repeatedSint64.isEmpty {
                    builderResult.repeatedSint64 += other.repeatedSint64
                }
                if !other.repeatedFixed32.isEmpty {
                    builderResult.repeatedFixed32 += other.repeatedFixed32
                }
                if !other.repeatedFixed64.isEmpty {
                    builderResult.repeatedFixed64 += other.repeatedFixed64
                }
                if !other.repeatedSfixed32.isEmpty {
                    builderResult.repeatedSfixed32 += other.repeatedSfixed32
                }
                if !other.repeatedSfixed64.isEmpty {
                    builderResult.repeatedSfixed64 += other.repeatedSfixed64
                }
                if !other.repeatedFloat.isEmpty {
                    builderResult.repeatedFloat += other.repeatedFloat
                }
                if !other.repeatedDouble.isEmpty {
                    builderResult.repeatedDouble += other.repeatedDouble
                }
                if !other.repeatedBool.isEmpty {
                    builderResult.repeatedBool += other.repeatedBool
                }
                if !other.repeatedString.isEmpty {
                    builderResult.repeatedString += other.repeatedString
                }
                if !other.repeatedBytes.isEmpty {
                    builderResult.repeatedBytes += other.repeatedBytes
                }
                if !other.repeatedNestedMessage.isEmpty  {
                     builderResult.repeatedNestedMessage += other.repeatedNestedMessage
                }
                if !other.repeatedForeignMessage.isEmpty  {
                     builderResult.repeatedForeignMessage += other.repeatedForeignMessage
                }
                if !other.repeatedImportMessage.isEmpty  {
                     builderResult.repeatedImportMessage += other.repeatedImportMessage
                }
                if !other.repeatedNestedEnum.isEmpty {
                     builderResult.repeatedNestedEnum += other.repeatedNestedEnum
                }
                if !other.repeatedForeignEnum.isEmpty {
                     builderResult.repeatedForeignEnum += other.repeatedForeignEnum
                }
                if !other.repeatedStringPiece.isEmpty {
                    builderResult.repeatedStringPiece += other.repeatedStringPiece
                }
                if !other.repeatedCord.isEmpty {
                    builderResult.repeatedCord += other.repeatedCord
                }
                if !other.repeatedLazyMessage.isEmpty  {
                     builderResult.repeatedLazyMessage += other.repeatedLazyMessage
                }
                if other.hasOneofUint32 {
                    oneofUint32 = other.oneofUint32
                }
                if (other.hasOneofNestedMessage) {
                    try mergeOneofNestedMessage(value: other.oneofNestedMessage)
                }
                if other.hasOneofString {
                    oneofString = other.oneofString
                }
                if other.hasOneofBytes {
                    oneofBytes = other.oneofBytes
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                while (true) {
                    let protobufTag = try codedInputStream.readTag()
                    switch protobufTag {
                    case 0: 
                        self.unknownFields = try unknownFieldsBuilder.build()
                        return self

                    case 8:
                        optionalInt32 = try codedInputStream.readInt32()

                    case 16:
                        optionalInt64 = try codedInputStream.readInt64()

                    case 24:
                        optionalUint32 = try codedInputStream.readUInt32()

                    case 32:
                        optionalUint64 = try codedInputStream.readUInt64()

                    case 40:
                        optionalSint32 = try codedInputStream.readSInt32()

                    case 48:
                        optionalSint64 = try codedInputStream.readSInt64()

                    case 61:
                        optionalFixed32 = try codedInputStream.readFixed32()

                    case 65:
                        optionalFixed64 = try codedInputStream.readFixed64()

                    case 77:
                        optionalSfixed32 = try codedInputStream.readSFixed32()

                    case 81:
                        optionalSfixed64 = try codedInputStream.readSFixed64()

                    case 93:
                        optionalFloat = try codedInputStream.readFloat()

                    case 97:
                        optionalDouble = try codedInputStream.readDouble()

                    case 104:
                        optionalBool = try codedInputStream.readBool()

                    case 114:
                        optionalString = try codedInputStream.readString()

                    case 122:
                        optionalBytes = try codedInputStream.readData()

                    case 146:
                        let subBuilder:Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
                        if hasOptionalNestedMessage {
                            try subBuilder.mergeFrom(other: optionalNestedMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalNestedMessage = subBuilder.buildPartial()

                    case 154:
                        let subBuilder:Proto3ArenaUnittest.ForeignMessage.Builder = Proto3ArenaUnittest.ForeignMessage.Builder()
                        if hasOptionalForeignMessage {
                            try subBuilder.mergeFrom(other: optionalForeignMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalForeignMessage = subBuilder.buildPartial()

                    case 162:
                        let subBuilder:ProtobufUnittestImport.ImportMessage.Builder = ProtobufUnittestImport.ImportMessage.Builder()
                        if hasOptionalImportMessage {
                            try subBuilder.mergeFrom(other: optionalImportMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalImportMessage = subBuilder.buildPartial()

                    case 168:
                        let valueIntoptionalNestedEnum = try codedInputStream.readEnum()
                        if let enumsoptionalNestedEnum = Proto3ArenaUnittest.TestAllTypes.NestedEnum(rawValue:valueIntoptionalNestedEnum){
                            optionalNestedEnum = enumsoptionalNestedEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 21, value:Int64(valueIntoptionalNestedEnum))
                        }

                    case 176:
                        let valueIntoptionalForeignEnum = try codedInputStream.readEnum()
                        if let enumsoptionalForeignEnum = Proto3ArenaUnittest.ForeignEnum(rawValue:valueIntoptionalForeignEnum){
                            optionalForeignEnum = enumsoptionalForeignEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 22, value:Int64(valueIntoptionalForeignEnum))
                        }

                    case 194:
                        optionalStringPiece = try codedInputStream.readString()

                    case 202:
                        optionalCord = try codedInputStream.readString()

                    case 210:
                        let subBuilder:ProtobufUnittestImport.PublicImportMessage.Builder = ProtobufUnittestImport.PublicImportMessage.Builder()
                        if hasOptionalPublicImportMessage {
                            try subBuilder.mergeFrom(other: optionalPublicImportMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalPublicImportMessage = subBuilder.buildPartial()

                    case 218:
                        let subBuilder:Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
                        if hasOptionalLazyMessage {
                            try subBuilder.mergeFrom(other: optionalLazyMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalLazyMessage = subBuilder.buildPartial()

                    case 250:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedInt32.append(try codedInputStream.readInt32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 258:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedInt64.append(try codedInputStream.readInt64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 266:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedUint32.append(try codedInputStream.readUInt32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 274:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedUint64.append(try codedInputStream.readUInt64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 282:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedSint32.append(try codedInputStream.readSInt32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 290:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedSint64.append(try codedInputStream.readSInt64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 298:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedFixed32.append(try codedInputStream.readFixed32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 306:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedFixed64.append(try codedInputStream.readFixed64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 314:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedSfixed32.append(try codedInputStream.readSFixed32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 322:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedSfixed64.append(try codedInputStream.readSFixed64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 330:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedFloat.append(try codedInputStream.readFloat())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 338:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedDouble.append(try codedInputStream.readDouble())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 346:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedBool.append(try codedInputStream.readBool())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 354:
                        repeatedString += [try codedInputStream.readString()]

                    case 362:
                        repeatedBytes += [try codedInputStream.readData()]

                    case 386:
                        let subBuilder = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        repeatedNestedMessage.append(subBuilder.buildPartial())

                    case 394:
                        let subBuilder = Proto3ArenaUnittest.ForeignMessage.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        repeatedForeignMessage.append(subBuilder.buildPartial())

                    case 402:
                        let subBuilder = ProtobufUnittestImport.ImportMessage.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        repeatedImportMessage.append(subBuilder.buildPartial())

                    case 410:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let oldLimit = try codedInputStream.pushLimit(byteLimit: length)
                        while codedInputStream.bytesUntilLimit() > 0 {
                        let valueIntrepeatedNestedEnum = try codedInputStream.readEnum()
                        if let enumsrepeatedNestedEnum = Proto3ArenaUnittest.TestAllTypes.NestedEnum(rawValue:valueIntrepeatedNestedEnum) {
                            builderResult.repeatedNestedEnum.append(enumsrepeatedNestedEnum)
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 51, value:Int64(valueIntrepeatedNestedEnum))
                        }
                        }
                        codedInputStream.popLimit(oldLimit: oldLimit)

                    case 418:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let oldLimit = try codedInputStream.pushLimit(byteLimit: length)
                        while codedInputStream.bytesUntilLimit() > 0 {
                        let valueIntrepeatedForeignEnum = try codedInputStream.readEnum()
                        if let enumsrepeatedForeignEnum = Proto3ArenaUnittest.ForeignEnum(rawValue:valueIntrepeatedForeignEnum) {
                            builderResult.repeatedForeignEnum.append(enumsrepeatedForeignEnum)
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 52, value:Int64(valueIntrepeatedForeignEnum))
                        }
                        }
                        codedInputStream.popLimit(oldLimit: oldLimit)

                    case 434:
                        repeatedStringPiece += [try codedInputStream.readString()]

                    case 442:
                        repeatedCord += [try codedInputStream.readString()]

                    case 458:
                        let subBuilder = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        repeatedLazyMessage.append(subBuilder.buildPartial())

                    case 888:
                        oneofUint32 = try codedInputStream.readUInt32()

                    case 898:
                        let subBuilder:Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder = Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder()
                        if hasOneofNestedMessage {
                            try subBuilder.mergeFrom(other: oneofNestedMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        oneofNestedMessage = subBuilder.buildPartial()

                    case 906:
                        oneofString = try codedInputStream.readString()

                    case 914:
                        oneofBytes = try codedInputStream.readData()

                    default:
                        if (!(try parse(codedInputStream:codedInputStream, unknownFields:unknownFieldsBuilder, extensionRegistry:extensionRegistry, tag:protobufTag))) {
                            unknownFields = try unknownFieldsBuilder.build()
                            return self
                        }
                    }
                }
            }
            class override public func decodeToBuilder(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                let resultDecodedBuilder = Proto3ArenaUnittest.TestAllTypes.Builder()
                if let jsonValueOptionalInt32 = jsonMap["optionalInt32"] as? Int {
                    resultDecodedBuilder.optionalInt32 = Int32(jsonValueOptionalInt32)
                } else if let jsonValueOptionalInt32 = jsonMap["optionalInt32"] as? String {
                    resultDecodedBuilder.optionalInt32 = Int32(jsonValueOptionalInt32)!
                }
                if let jsonValueOptionalInt64 = jsonMap["optionalInt64"] as? String {
                    resultDecodedBuilder.optionalInt64 = Int64(jsonValueOptionalInt64)!
                } else if let jsonValueOptionalInt64 = jsonMap["optionalInt64"] as? Int {
                    resultDecodedBuilder.optionalInt64 = Int64(jsonValueOptionalInt64)
                }
                if let jsonValueOptionalUint32 = jsonMap["optionalUint32"] as? UInt {
                    resultDecodedBuilder.optionalUint32 = UInt32(jsonValueOptionalUint32)
                } else if let jsonValueOptionalUint32 = jsonMap["optionalUint32"] as? String {
                    resultDecodedBuilder.optionalUint32 = UInt32(jsonValueOptionalUint32)!
                }
                if let jsonValueOptionalUint64 = jsonMap["optionalUint64"] as? String {
                    resultDecodedBuilder.optionalUint64 = UInt64(jsonValueOptionalUint64)!
                } else if let jsonValueOptionalUint64 = jsonMap["optionalUint64"] as? UInt {
                    resultDecodedBuilder.optionalUint64 = UInt64(jsonValueOptionalUint64)
                }
                if let jsonValueOptionalSint32 = jsonMap["optionalSint32"] as? Int {
                    resultDecodedBuilder.optionalSint32 = Int32(jsonValueOptionalSint32)
                } else if let jsonValueOptionalSint32 = jsonMap["optionalSint32"] as? String {
                    resultDecodedBuilder.optionalSint32 = Int32(jsonValueOptionalSint32)!
                }
                if let jsonValueOptionalSint64 = jsonMap["optionalSint64"] as? String {
                    resultDecodedBuilder.optionalSint64 = Int64(jsonValueOptionalSint64)!
                } else if let jsonValueOptionalSint64 = jsonMap["optionalSint64"] as? Int {
                    resultDecodedBuilder.optionalSint64 = Int64(jsonValueOptionalSint64)
                }
                if let jsonValueOptionalFixed32 = jsonMap["optionalFixed32"] as? UInt {
                    resultDecodedBuilder.optionalFixed32 = UInt32(jsonValueOptionalFixed32)
                } else if let jsonValueOptionalFixed32 = jsonMap["optionalFixed32"] as? String {
                    resultDecodedBuilder.optionalFixed32 = UInt32(jsonValueOptionalFixed32)!
                }
                if let jsonValueOptionalFixed64 = jsonMap["optionalFixed64"] as? String {
                    resultDecodedBuilder.optionalFixed64 = UInt64(jsonValueOptionalFixed64)!
                } else if let jsonValueOptionalFixed64 = jsonMap["optionalFixed64"] as? UInt {
                    resultDecodedBuilder.optionalFixed64 = UInt64(jsonValueOptionalFixed64)
                }
                if let jsonValueOptionalSfixed32 = jsonMap["optionalSfixed32"] as? Int {
                    resultDecodedBuilder.optionalSfixed32 = Int32(jsonValueOptionalSfixed32)
                } else if let jsonValueOptionalSfixed32 = jsonMap["optionalSfixed32"] as? String {
                    resultDecodedBuilder.optionalSfixed32 = Int32(jsonValueOptionalSfixed32)!
                }
                if let jsonValueOptionalSfixed64 = jsonMap["optionalSfixed64"] as? String {
                    resultDecodedBuilder.optionalSfixed64 = Int64(jsonValueOptionalSfixed64)!
                } else if let jsonValueOptionalSfixed64 = jsonMap["optionalSfixed64"] as? Int {
                    resultDecodedBuilder.optionalSfixed64 = Int64(jsonValueOptionalSfixed64)
                }
                if let jsonValueOptionalFloat = jsonMap["optionalFloat"] as? Float {
                    resultDecodedBuilder.optionalFloat = Float(jsonValueOptionalFloat)
                } else if let jsonValueOptionalFloat = jsonMap["optionalFloat"] as? String {
                    resultDecodedBuilder.optionalFloat = Float(jsonValueOptionalFloat)!
                }
                if let jsonValueOptionalDouble = jsonMap["optionalDouble"] as? Double {
                    resultDecodedBuilder.optionalDouble = Double(jsonValueOptionalDouble)
                } else if let jsonValueOptionalDouble = jsonMap["optionalDouble"] as? String {
                    resultDecodedBuilder.optionalDouble = Double(jsonValueOptionalDouble)!
                }
                if let jsonValueOptionalBool = jsonMap["optionalBool"] as? Bool {
                    resultDecodedBuilder.optionalBool = jsonValueOptionalBool
                }
                if let jsonValueOptionalString = jsonMap["optionalString"] as? String {
                    resultDecodedBuilder.optionalString = jsonValueOptionalString
                }
                if let jsonValueOptionalBytes = jsonMap["optionalBytes"] as? String {
                    resultDecodedBuilder.optionalBytes = Data(base64Encoded:jsonValueOptionalBytes, options: Data.Base64DecodingOptions(rawValue:0))!
                }
                if let jsonValueOptionalNestedMessage = jsonMap["optionalNestedMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalNestedMessage = try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonValueOptionalNestedMessage).build()

                }
                if let jsonValueOptionalForeignMessage = jsonMap["optionalForeignMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalForeignMessage = try Proto3ArenaUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:jsonValueOptionalForeignMessage).build()

                }
                if let jsonValueOptionalImportMessage = jsonMap["optionalImportMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalImportMessage = try ProtobufUnittestImport.ImportMessage.Builder.decodeToBuilder(jsonMap:jsonValueOptionalImportMessage).build()

                }
                if let jsonValueOptionalNestedEnum = jsonMap["optionalNestedEnum"] as? String {
                    resultDecodedBuilder.optionalNestedEnum = try Proto3ArenaUnittest.TestAllTypes.NestedEnum.fromString(jsonValueOptionalNestedEnum)
                }
                if let jsonValueOptionalForeignEnum = jsonMap["optionalForeignEnum"] as? String {
                    resultDecodedBuilder.optionalForeignEnum = try Proto3ArenaUnittest.ForeignEnum.fromString(jsonValueOptionalForeignEnum)
                }
                if let jsonValueOptionalStringPiece = jsonMap["optionalStringPiece"] as? String {
                    resultDecodedBuilder.optionalStringPiece = jsonValueOptionalStringPiece
                }
                if let jsonValueOptionalCord = jsonMap["optionalCord"] as? String {
                    resultDecodedBuilder.optionalCord = jsonValueOptionalCord
                }
                if let jsonValueOptionalPublicImportMessage = jsonMap["optionalPublicImportMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalPublicImportMessage = try ProtobufUnittestImport.PublicImportMessage.Builder.decodeToBuilder(jsonMap:jsonValueOptionalPublicImportMessage).build()

                }
                if let jsonValueOptionalLazyMessage = jsonMap["optionalLazyMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalLazyMessage = try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonValueOptionalLazyMessage).build()

                }
                if let jsonValueRepeatedInt32 = jsonMap["repeatedInt32"] as? Array<Int> {
                    var jsonArrayRepeatedInt32:Array<Int32> = []
                    for oneValueRepeatedInt32 in jsonValueRepeatedInt32 {
                        jsonArrayRepeatedInt32.append(Int32(oneValueRepeatedInt32))
                    }
                    resultDecodedBuilder.repeatedInt32 = jsonArrayRepeatedInt32
                }
                if let jsonValueRepeatedInt64 = jsonMap["repeatedInt64"] as? Array<String> {
                    var jsonArrayRepeatedInt64:Array<Int64> = []
                    for oneValueRepeatedInt64 in jsonValueRepeatedInt64 {
                        jsonArrayRepeatedInt64.append(Int64(oneValueRepeatedInt64)!)
                    }
                    resultDecodedBuilder.repeatedInt64 = jsonArrayRepeatedInt64
                }
                if let jsonValueRepeatedUint32 = jsonMap["repeatedUint32"] as? Array<UInt> {
                    var jsonArrayRepeatedUint32:Array<UInt32> = []
                    for oneValueRepeatedUint32 in jsonValueRepeatedUint32 {
                        jsonArrayRepeatedUint32.append(UInt32(oneValueRepeatedUint32))
                    }
                    resultDecodedBuilder.repeatedUint32 = jsonArrayRepeatedUint32
                }
                if let jsonValueRepeatedUint64 = jsonMap["repeatedUint64"] as? Array<String> {
                    var jsonArrayRepeatedUint64:Array<UInt64> = []
                    for oneValueRepeatedUint64 in jsonValueRepeatedUint64 {
                        jsonArrayRepeatedUint64.append(UInt64(oneValueRepeatedUint64)!)
                    }
                    resultDecodedBuilder.repeatedUint64 = jsonArrayRepeatedUint64
                }
                if let jsonValueRepeatedSint32 = jsonMap["repeatedSint32"] as? Array<Int> {
                    var jsonArrayRepeatedSint32:Array<Int32> = []
                    for oneValueRepeatedSint32 in jsonValueRepeatedSint32 {
                        jsonArrayRepeatedSint32.append(Int32(oneValueRepeatedSint32))
                    }
                    resultDecodedBuilder.repeatedSint32 = jsonArrayRepeatedSint32
                }
                if let jsonValueRepeatedSint64 = jsonMap["repeatedSint64"] as? Array<String> {
                    var jsonArrayRepeatedSint64:Array<Int64> = []
                    for oneValueRepeatedSint64 in jsonValueRepeatedSint64 {
                        jsonArrayRepeatedSint64.append(Int64(oneValueRepeatedSint64)!)
                    }
                    resultDecodedBuilder.repeatedSint64 = jsonArrayRepeatedSint64
                }
                if let jsonValueRepeatedFixed32 = jsonMap["repeatedFixed32"] as? Array<UInt> {
                    var jsonArrayRepeatedFixed32:Array<UInt32> = []
                    for oneValueRepeatedFixed32 in jsonValueRepeatedFixed32 {
                        jsonArrayRepeatedFixed32.append(UInt32(oneValueRepeatedFixed32))
                    }
                    resultDecodedBuilder.repeatedFixed32 = jsonArrayRepeatedFixed32
                }
                if let jsonValueRepeatedFixed64 = jsonMap["repeatedFixed64"] as? Array<String> {
                    var jsonArrayRepeatedFixed64:Array<UInt64> = []
                    for oneValueRepeatedFixed64 in jsonValueRepeatedFixed64 {
                        jsonArrayRepeatedFixed64.append(UInt64(oneValueRepeatedFixed64)!)
                    }
                    resultDecodedBuilder.repeatedFixed64 = jsonArrayRepeatedFixed64
                }
                if let jsonValueRepeatedSfixed32 = jsonMap["repeatedSfixed32"] as? Array<Int> {
                    var jsonArrayRepeatedSfixed32:Array<Int32> = []
                    for oneValueRepeatedSfixed32 in jsonValueRepeatedSfixed32 {
                        jsonArrayRepeatedSfixed32.append(Int32(oneValueRepeatedSfixed32))
                    }
                    resultDecodedBuilder.repeatedSfixed32 = jsonArrayRepeatedSfixed32
                }
                if let jsonValueRepeatedSfixed64 = jsonMap["repeatedSfixed64"] as? Array<String> {
                    var jsonArrayRepeatedSfixed64:Array<Int64> = []
                    for oneValueRepeatedSfixed64 in jsonValueRepeatedSfixed64 {
                        jsonArrayRepeatedSfixed64.append(Int64(oneValueRepeatedSfixed64)!)
                    }
                    resultDecodedBuilder.repeatedSfixed64 = jsonArrayRepeatedSfixed64
                }
                if let jsonValueRepeatedFloat = jsonMap["repeatedFloat"] as? Array<Float> {
                    var jsonArrayRepeatedFloat:Array<Float> = []
                    for oneValueRepeatedFloat in jsonValueRepeatedFloat {
                        jsonArrayRepeatedFloat.append(Float(oneValueRepeatedFloat))
                    }
                    resultDecodedBuilder.repeatedFloat = jsonArrayRepeatedFloat
                }
                if let jsonValueRepeatedDouble = jsonMap["repeatedDouble"] as? Array<Double> {
                    var jsonArrayRepeatedDouble:Array<Double> = []
                    for oneValueRepeatedDouble in jsonValueRepeatedDouble {
                        jsonArrayRepeatedDouble.append(Double(oneValueRepeatedDouble))
                    }
                    resultDecodedBuilder.repeatedDouble = jsonArrayRepeatedDouble
                }
                if let jsonValueRepeatedBool = jsonMap["repeatedBool"] as? Array<Bool> {
                    var jsonArrayRepeatedBool:Array<Bool> = []
                    for oneValueRepeatedBool in jsonValueRepeatedBool {
                        jsonArrayRepeatedBool.append(oneValueRepeatedBool)
                    }
                    resultDecodedBuilder.repeatedBool = jsonArrayRepeatedBool
                }
                if let jsonValueRepeatedString = jsonMap["repeatedString"] as? Array<String> {
                    var jsonArrayRepeatedString:Array<String> = []
                    for oneValueRepeatedString in jsonValueRepeatedString {
                        jsonArrayRepeatedString.append(oneValueRepeatedString)
                    }
                    resultDecodedBuilder.repeatedString = jsonArrayRepeatedString
                }
                if let jsonValueRepeatedBytes = jsonMap["repeatedBytes"] as? Array<String> {
                    var jsonArrayRepeatedBytes:Array<Data> = []
                    for oneValueRepeatedBytes in jsonValueRepeatedBytes {
                        jsonArrayRepeatedBytes.append(Data(base64Encoded:oneValueRepeatedBytes, options: Data.Base64DecodingOptions(rawValue:0))!)
                    }
                    resultDecodedBuilder.repeatedBytes = jsonArrayRepeatedBytes
                }
                if let jsonValueRepeatedNestedMessage = jsonMap["repeatedNestedMessage"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedNestedMessage:Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage> = []
                    for oneValueRepeatedNestedMessage in jsonValueRepeatedNestedMessage {
                        let messageFromStringRepeatedNestedMessage = try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:oneValueRepeatedNestedMessage).build()

                        jsonArrayRepeatedNestedMessage.append(messageFromStringRepeatedNestedMessage)
                    }
                    resultDecodedBuilder.repeatedNestedMessage = jsonArrayRepeatedNestedMessage
                }
                if let jsonValueRepeatedForeignMessage = jsonMap["repeatedForeignMessage"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedForeignMessage:Array<Proto3ArenaUnittest.ForeignMessage> = []
                    for oneValueRepeatedForeignMessage in jsonValueRepeatedForeignMessage {
                        let messageFromStringRepeatedForeignMessage = try Proto3ArenaUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:oneValueRepeatedForeignMessage).build()

                        jsonArrayRepeatedForeignMessage.append(messageFromStringRepeatedForeignMessage)
                    }
                    resultDecodedBuilder.repeatedForeignMessage = jsonArrayRepeatedForeignMessage
                }
                if let jsonValueRepeatedImportMessage = jsonMap["repeatedImportMessage"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedImportMessage:Array<ProtobufUnittestImport.ImportMessage> = []
                    for oneValueRepeatedImportMessage in jsonValueRepeatedImportMessage {
                        let messageFromStringRepeatedImportMessage = try ProtobufUnittestImport.ImportMessage.Builder.decodeToBuilder(jsonMap:oneValueRepeatedImportMessage).build()

                        jsonArrayRepeatedImportMessage.append(messageFromStringRepeatedImportMessage)
                    }
                    resultDecodedBuilder.repeatedImportMessage = jsonArrayRepeatedImportMessage
                }
                if let jsonValueRepeatedNestedEnum = jsonMap["repeatedNestedEnum"] as? Array<String> {
                    var jsonArrayRepeatedNestedEnum:Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum> = []
                    for oneValueRepeatedNestedEnum in jsonValueRepeatedNestedEnum {
                        let enumFromStringRepeatedNestedEnum = try Proto3ArenaUnittest.TestAllTypes.NestedEnum.fromString(oneValueRepeatedNestedEnum)
                        jsonArrayRepeatedNestedEnum.append(enumFromStringRepeatedNestedEnum)
                    }
                    resultDecodedBuilder.repeatedNestedEnum = jsonArrayRepeatedNestedEnum
                }
                if let jsonValueRepeatedForeignEnum = jsonMap["repeatedForeignEnum"] as? Array<String> {
                    var jsonArrayRepeatedForeignEnum:Array<Proto3ArenaUnittest.ForeignEnum> = []
                    for oneValueRepeatedForeignEnum in jsonValueRepeatedForeignEnum {
                        let enumFromStringRepeatedForeignEnum = try Proto3ArenaUnittest.ForeignEnum.fromString(oneValueRepeatedForeignEnum)
                        jsonArrayRepeatedForeignEnum.append(enumFromStringRepeatedForeignEnum)
                    }
                    resultDecodedBuilder.repeatedForeignEnum = jsonArrayRepeatedForeignEnum
                }
                if let jsonValueRepeatedStringPiece = jsonMap["repeatedStringPiece"] as? Array<String> {
                    var jsonArrayRepeatedStringPiece:Array<String> = []
                    for oneValueRepeatedStringPiece in jsonValueRepeatedStringPiece {
                        jsonArrayRepeatedStringPiece.append(oneValueRepeatedStringPiece)
                    }
                    resultDecodedBuilder.repeatedStringPiece = jsonArrayRepeatedStringPiece
                }
                if let jsonValueRepeatedCord = jsonMap["repeatedCord"] as? Array<String> {
                    var jsonArrayRepeatedCord:Array<String> = []
                    for oneValueRepeatedCord in jsonValueRepeatedCord {
                        jsonArrayRepeatedCord.append(oneValueRepeatedCord)
                    }
                    resultDecodedBuilder.repeatedCord = jsonArrayRepeatedCord
                }
                if let jsonValueRepeatedLazyMessage = jsonMap["repeatedLazyMessage"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedLazyMessage:Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage> = []
                    for oneValueRepeatedLazyMessage in jsonValueRepeatedLazyMessage {
                        let messageFromStringRepeatedLazyMessage = try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:oneValueRepeatedLazyMessage).build()

                        jsonArrayRepeatedLazyMessage.append(messageFromStringRepeatedLazyMessage)
                    }
                    resultDecodedBuilder.repeatedLazyMessage = jsonArrayRepeatedLazyMessage
                }
                if let jsonValueOneofUint32 = jsonMap["oneofUint32"] as? UInt {
                    resultDecodedBuilder.oneofUint32 = UInt32(jsonValueOneofUint32)
                } else if let jsonValueOneofUint32 = jsonMap["oneofUint32"] as? String {
                    resultDecodedBuilder.oneofUint32 = UInt32(jsonValueOneofUint32)!
                }
                if let jsonValueOneofNestedMessage = jsonMap["oneofNestedMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.oneofNestedMessage = try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonValueOneofNestedMessage).build()

                }
                if let jsonValueOneofString = jsonMap["oneofString"] as? String {
                    resultDecodedBuilder.oneofString = jsonValueOneofString
                }
                if let jsonValueOneofBytes = jsonMap["oneofBytes"] as? String {
                    resultDecodedBuilder.oneofBytes = Data(base64Encoded:jsonValueOneofBytes, options: Data.Base64DecodingOptions(rawValue:0))!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestAllTypes.Builder {
                let jsonData = try JSONSerialization.jsonObject(with:data, options: options)
                guard let jsDataCast = jsonData as? Dictionary<String,Any> else {
                  throw ProtocolBuffersError.invalidProtocolBuffer("Invalid JSON data")
                }
                return try Proto3ArenaUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestPackedTypes : GeneratedMessage {
        public typealias BuilderType = Proto3ArenaUnittest.TestPackedTypes.Builder

        public static func == (lhs: Proto3ArenaUnittest.TestPackedTypes, rhs: Proto3ArenaUnittest.TestPackedTypes) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.packedInt32 == rhs.packedInt32)
            fieldCheck = fieldCheck && (lhs.packedInt64 == rhs.packedInt64)
            fieldCheck = fieldCheck && (lhs.packedUint32 == rhs.packedUint32)
            fieldCheck = fieldCheck && (lhs.packedUint64 == rhs.packedUint64)
            fieldCheck = fieldCheck && (lhs.packedSint32 == rhs.packedSint32)
            fieldCheck = fieldCheck && (lhs.packedSint64 == rhs.packedSint64)
            fieldCheck = fieldCheck && (lhs.packedFixed32 == rhs.packedFixed32)
            fieldCheck = fieldCheck && (lhs.packedFixed64 == rhs.packedFixed64)
            fieldCheck = fieldCheck && (lhs.packedSfixed32 == rhs.packedSfixed32)
            fieldCheck = fieldCheck && (lhs.packedSfixed64 == rhs.packedSfixed64)
            fieldCheck = fieldCheck && (lhs.packedFloat == rhs.packedFloat)
            fieldCheck = fieldCheck && (lhs.packedDouble == rhs.packedDouble)
            fieldCheck = fieldCheck && (lhs.packedBool == rhs.packedBool)
            fieldCheck = fieldCheck && (lhs.packedEnum == rhs.packedEnum)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var packedInt32:Array<Int32> = Array<Int32>()
        private var packedInt32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedInt64:Array<Int64> = Array<Int64>()
        private var packedInt64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedUint32:Array<UInt32> = Array<UInt32>()
        private var packedUint32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedUint64:Array<UInt64> = Array<UInt64>()
        private var packedUint64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedSint32:Array<Int32> = Array<Int32>()
        private var packedSint32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedSint64:Array<Int64> = Array<Int64>()
        private var packedSint64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedFixed32:Array<UInt32> = Array<UInt32>()
        private var packedFixed32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedFixed64:Array<UInt64> = Array<UInt64>()
        private var packedFixed64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedSfixed32:Array<Int32> = Array<Int32>()
        private var packedSfixed32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedSfixed64:Array<Int64> = Array<Int64>()
        private var packedSfixed64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedFloat:Array<Float> = Array<Float>()
        private var packedFloatMemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedDouble:Array<Double> = Array<Double>()
        private var packedDoubleMemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var packedBool:Array<Bool> = Array<Bool>()
        private var packedBoolMemoizedSerializedSize:Int32 = -1
        private var packedEnumMemoizedSerializedSize:Int32 = 0
        public fileprivate(set) var packedEnum:Array<Proto3ArenaUnittest.ForeignEnum> = Array<Proto3ArenaUnittest.ForeignEnum>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if !packedInt32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 722)
                try codedOutputStream.writeRawVarint32(value: packedInt32MemoizedSerializedSize)
                for oneValuepackedInt32 in packedInt32 {
                    try codedOutputStream.writeInt32NoTag(value: oneValuepackedInt32)
                }
            }
            if !packedInt64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 730)
                try codedOutputStream.writeRawVarint32(value: packedInt64MemoizedSerializedSize)
                for oneValuepackedInt64 in packedInt64 {
                    try codedOutputStream.writeInt64NoTag(value: oneValuepackedInt64)
                }
            }
            if !packedUint32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 738)
                try codedOutputStream.writeRawVarint32(value: packedUint32MemoizedSerializedSize)
                for oneValuepackedUint32 in packedUint32 {
                    try codedOutputStream.writeUInt32NoTag(value: oneValuepackedUint32)
                }
            }
            if !packedUint64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 746)
                try codedOutputStream.writeRawVarint32(value: packedUint64MemoizedSerializedSize)
                for oneValuepackedUint64 in packedUint64 {
                    try codedOutputStream.writeUInt64NoTag(value: oneValuepackedUint64)
                }
            }
            if !packedSint32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 754)
                try codedOutputStream.writeRawVarint32(value: packedSint32MemoizedSerializedSize)
                for oneValuepackedSint32 in packedSint32 {
                    try codedOutputStream.writeSInt32NoTag(value: oneValuepackedSint32)
                }
            }
            if !packedSint64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 762)
                try codedOutputStream.writeRawVarint32(value: packedSint64MemoizedSerializedSize)
                for oneValuepackedSint64 in packedSint64 {
                    try codedOutputStream.writeSInt64NoTag(value: oneValuepackedSint64)
                }
            }
            if !packedFixed32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 770)
                try codedOutputStream.writeRawVarint32(value: packedFixed32MemoizedSerializedSize)
                for oneValuepackedFixed32 in packedFixed32 {
                    try codedOutputStream.writeFixed32NoTag(value: oneValuepackedFixed32)
                }
            }
            if !packedFixed64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 778)
                try codedOutputStream.writeRawVarint32(value: packedFixed64MemoizedSerializedSize)
                for oneValuepackedFixed64 in packedFixed64 {
                    try codedOutputStream.writeFixed64NoTag(value: oneValuepackedFixed64)
                }
            }
            if !packedSfixed32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 786)
                try codedOutputStream.writeRawVarint32(value: packedSfixed32MemoizedSerializedSize)
                for oneValuepackedSfixed32 in packedSfixed32 {
                    try codedOutputStream.writeSFixed32NoTag(value: oneValuepackedSfixed32)
                }
            }
            if !packedSfixed64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 794)
                try codedOutputStream.writeRawVarint32(value: packedSfixed64MemoizedSerializedSize)
                for oneValuepackedSfixed64 in packedSfixed64 {
                    try codedOutputStream.writeSFixed64NoTag(value: oneValuepackedSfixed64)
                }
            }
            if !packedFloat.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 802)
                try codedOutputStream.writeRawVarint32(value: packedFloatMemoizedSerializedSize)
                for oneValuepackedFloat in packedFloat {
                    try codedOutputStream.writeFloatNoTag(value: oneValuepackedFloat)
                }
            }
            if !packedDouble.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 810)
                try codedOutputStream.writeRawVarint32(value: packedDoubleMemoizedSerializedSize)
                for oneValuepackedDouble in packedDouble {
                    try codedOutputStream.writeDoubleNoTag(value: oneValuepackedDouble)
                }
            }
            if !packedBool.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 818)
                try codedOutputStream.writeRawVarint32(value: packedBoolMemoizedSerializedSize)
                for oneValuepackedBool in packedBool {
                    try codedOutputStream.writeBoolNoTag(value: oneValuepackedBool)
                }
            }
            if !packedEnum.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 826)
                try codedOutputStream.writeRawVarint32(value: packedEnumMemoizedSerializedSize)
            }
            for oneValueOfpackedEnum in packedEnum {
                  try codedOutputStream.writeEnumNoTag(value: oneValueOfpackedEnum.rawValue)
            }
            try unknownFields.writeTo(codedOutputStream: codedOutputStream)
        }
        override public func serializedSize() -> Int32 {
            var serialize_size:Int32 = memoizedSerializedSize
            if serialize_size != -1 {
             return serialize_size
            }

            serialize_size = 0
            var dataSizePackedInt32:Int32 = 0
            for oneValuepackedInt32 in packedInt32 {
                dataSizePackedInt32 += oneValuepackedInt32.computeInt32SizeNoTag()
            }
            serialize_size += dataSizePackedInt32
            if !packedInt32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedInt32.computeInt32SizeNoTag()
            }
            packedInt32MemoizedSerializedSize = dataSizePackedInt32
            var dataSizePackedInt64:Int32 = 0
            for oneValuepackedInt64 in packedInt64 {
                dataSizePackedInt64 += oneValuepackedInt64.computeInt64SizeNoTag()
            }
            serialize_size += dataSizePackedInt64
            if !packedInt64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedInt64.computeInt32SizeNoTag()
            }
            packedInt64MemoizedSerializedSize = dataSizePackedInt64
            var dataSizePackedUint32:Int32 = 0
            for oneValuepackedUint32 in packedUint32 {
                dataSizePackedUint32 += oneValuepackedUint32.computeUInt32SizeNoTag()
            }
            serialize_size += dataSizePackedUint32
            if !packedUint32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedUint32.computeInt32SizeNoTag()
            }
            packedUint32MemoizedSerializedSize = dataSizePackedUint32
            var dataSizePackedUint64:Int32 = 0
            for oneValuepackedUint64 in packedUint64 {
                dataSizePackedUint64 += oneValuepackedUint64.computeUInt64SizeNoTag()
            }
            serialize_size += dataSizePackedUint64
            if !packedUint64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedUint64.computeInt32SizeNoTag()
            }
            packedUint64MemoizedSerializedSize = dataSizePackedUint64
            var dataSizePackedSint32:Int32 = 0
            for oneValuepackedSint32 in packedSint32 {
                dataSizePackedSint32 += oneValuepackedSint32.computeSInt32SizeNoTag()
            }
            serialize_size += dataSizePackedSint32
            if !packedSint32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedSint32.computeInt32SizeNoTag()
            }
            packedSint32MemoizedSerializedSize = dataSizePackedSint32
            var dataSizePackedSint64:Int32 = 0
            for oneValuepackedSint64 in packedSint64 {
                dataSizePackedSint64 += oneValuepackedSint64.computeSInt64SizeNoTag()
            }
            serialize_size += dataSizePackedSint64
            if !packedSint64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedSint64.computeInt32SizeNoTag()
            }
            packedSint64MemoizedSerializedSize = dataSizePackedSint64
            var dataSizePackedFixed32:Int32 = 0
            dataSizePackedFixed32 = 4 * Int32(packedFixed32.count)
            serialize_size += dataSizePackedFixed32
            if !packedFixed32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedFixed32.computeInt32SizeNoTag()
            }
            packedFixed32MemoizedSerializedSize = dataSizePackedFixed32
            var dataSizePackedFixed64:Int32 = 0
            dataSizePackedFixed64 = 8 * Int32(packedFixed64.count)
            serialize_size += dataSizePackedFixed64
            if !packedFixed64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedFixed64.computeInt32SizeNoTag()
            }
            packedFixed64MemoizedSerializedSize = dataSizePackedFixed64
            var dataSizePackedSfixed32:Int32 = 0
            dataSizePackedSfixed32 = 4 * Int32(packedSfixed32.count)
            serialize_size += dataSizePackedSfixed32
            if !packedSfixed32.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedSfixed32.computeInt32SizeNoTag()
            }
            packedSfixed32MemoizedSerializedSize = dataSizePackedSfixed32
            var dataSizePackedSfixed64:Int32 = 0
            dataSizePackedSfixed64 = 8 * Int32(packedSfixed64.count)
            serialize_size += dataSizePackedSfixed64
            if !packedSfixed64.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedSfixed64.computeInt32SizeNoTag()
            }
            packedSfixed64MemoizedSerializedSize = dataSizePackedSfixed64
            var dataSizePackedFloat:Int32 = 0
            dataSizePackedFloat = 4 * Int32(packedFloat.count)
            serialize_size += dataSizePackedFloat
            if !packedFloat.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedFloat.computeInt32SizeNoTag()
            }
            packedFloatMemoizedSerializedSize = dataSizePackedFloat
            var dataSizePackedDouble:Int32 = 0
            dataSizePackedDouble = 8 * Int32(packedDouble.count)
            serialize_size += dataSizePackedDouble
            if !packedDouble.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedDouble.computeInt32SizeNoTag()
            }
            packedDoubleMemoizedSerializedSize = dataSizePackedDouble
            var dataSizePackedBool:Int32 = 0
            dataSizePackedBool = 1 * Int32(packedBool.count)
            serialize_size += dataSizePackedBool
            if !packedBool.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedBool.computeInt32SizeNoTag()
            }
            packedBoolMemoizedSerializedSize = dataSizePackedBool
            var dataSizepackedEnum:Int32 = 0
            for oneValueOfpackedEnum in packedEnum {
                dataSizepackedEnum += oneValueOfpackedEnum.rawValue.computeEnumSizeNoTag()
            }
            serialize_size += dataSizepackedEnum
            if !packedEnum.isEmpty {
                serialize_size += 2
                serialize_size += dataSizepackedEnum.computeRawVarint32Size()
            }
            packedEnumMemoizedSerializedSize = dataSizepackedEnum
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
            return Proto3ArenaUnittest.TestPackedTypes.classBuilder() as! Proto3ArenaUnittest.TestPackedTypes.Builder
        }
        public func getBuilder() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
            return classBuilder() as! Proto3ArenaUnittest.TestPackedTypes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.TestPackedTypes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.TestPackedTypes.Builder()
        }
        public func toBuilder() throws -> Proto3ArenaUnittest.TestPackedTypes.Builder {
            return try Proto3ArenaUnittest.TestPackedTypes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Proto3ArenaUnittest.TestPackedTypes) throws -> Proto3ArenaUnittest.TestPackedTypes.Builder {
            return try Proto3ArenaUnittest.TestPackedTypes.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if !packedInt32.isEmpty {
                var jsonArrayPackedInt32:Array<Int> = []
                for oneValuePackedInt32 in packedInt32 {
                    jsonArrayPackedInt32.append(Int(oneValuePackedInt32))
                }
                jsonMap["packedInt32"] = jsonArrayPackedInt32
            }
            if !packedInt64.isEmpty {
                var jsonArrayPackedInt64:Array<String> = []
                for oneValuePackedInt64 in packedInt64 {
                    jsonArrayPackedInt64.append("\(oneValuePackedInt64)")
                }
                jsonMap["packedInt64"] = jsonArrayPackedInt64
            }
            if !packedUint32.isEmpty {
                var jsonArrayPackedUint32:Array<UInt> = []
                for oneValuePackedUint32 in packedUint32 {
                    jsonArrayPackedUint32.append(UInt(oneValuePackedUint32))
                }
                jsonMap["packedUint32"] = jsonArrayPackedUint32
            }
            if !packedUint64.isEmpty {
                var jsonArrayPackedUint64:Array<String> = []
                for oneValuePackedUint64 in packedUint64 {
                    jsonArrayPackedUint64.append("\(oneValuePackedUint64)")
                }
                jsonMap["packedUint64"] = jsonArrayPackedUint64
            }
            if !packedSint32.isEmpty {
                var jsonArrayPackedSint32:Array<Int> = []
                for oneValuePackedSint32 in packedSint32 {
                    jsonArrayPackedSint32.append(Int(oneValuePackedSint32))
                }
                jsonMap["packedSint32"] = jsonArrayPackedSint32
            }
            if !packedSint64.isEmpty {
                var jsonArrayPackedSint64:Array<String> = []
                for oneValuePackedSint64 in packedSint64 {
                    jsonArrayPackedSint64.append("\(oneValuePackedSint64)")
                }
                jsonMap["packedSint64"] = jsonArrayPackedSint64
            }
            if !packedFixed32.isEmpty {
                var jsonArrayPackedFixed32:Array<UInt> = []
                for oneValuePackedFixed32 in packedFixed32 {
                    jsonArrayPackedFixed32.append(UInt(oneValuePackedFixed32))
                }
                jsonMap["packedFixed32"] = jsonArrayPackedFixed32
            }
            if !packedFixed64.isEmpty {
                var jsonArrayPackedFixed64:Array<String> = []
                for oneValuePackedFixed64 in packedFixed64 {
                    jsonArrayPackedFixed64.append("\(oneValuePackedFixed64)")
                }
                jsonMap["packedFixed64"] = jsonArrayPackedFixed64
            }
            if !packedSfixed32.isEmpty {
                var jsonArrayPackedSfixed32:Array<Int> = []
                for oneValuePackedSfixed32 in packedSfixed32 {
                    jsonArrayPackedSfixed32.append(Int(oneValuePackedSfixed32))
                }
                jsonMap["packedSfixed32"] = jsonArrayPackedSfixed32
            }
            if !packedSfixed64.isEmpty {
                var jsonArrayPackedSfixed64:Array<String> = []
                for oneValuePackedSfixed64 in packedSfixed64 {
                    jsonArrayPackedSfixed64.append("\(oneValuePackedSfixed64)")
                }
                jsonMap["packedSfixed64"] = jsonArrayPackedSfixed64
            }
            if !packedFloat.isEmpty {
                var jsonArrayPackedFloat:Array<Float> = []
                for oneValuePackedFloat in packedFloat {
                    jsonArrayPackedFloat.append(Float(oneValuePackedFloat))
                }
                jsonMap["packedFloat"] = jsonArrayPackedFloat
            }
            if !packedDouble.isEmpty {
                var jsonArrayPackedDouble:Array<Double> = []
                for oneValuePackedDouble in packedDouble {
                    jsonArrayPackedDouble.append(Double(oneValuePackedDouble))
                }
                jsonMap["packedDouble"] = jsonArrayPackedDouble
            }
            if !packedBool.isEmpty {
                var jsonArrayPackedBool:Array<Bool> = []
                for oneValuePackedBool in packedBool {
                    jsonArrayPackedBool.append(oneValuePackedBool)
                }
                jsonMap["packedBool"] = jsonArrayPackedBool
            }
            if !packedEnum.isEmpty {
                var jsonArrayPackedEnum:Array<String> = []
                for oneValuePackedEnum in packedEnum {
                    jsonArrayPackedEnum.append(oneValuePackedEnum.toString())
                }
                jsonMap["packedEnum"] = jsonArrayPackedEnum
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestPackedTypes {
            return try Proto3ArenaUnittest.TestPackedTypes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestPackedTypes {
            return try Proto3ArenaUnittest.TestPackedTypes.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            var packedInt32ElementIndex:Int = 0
            for oneValuePackedInt32 in packedInt32  {
                output += "\(indent) packedInt32[\(packedInt32ElementIndex)]: \(oneValuePackedInt32)\n"
                packedInt32ElementIndex += 1
            }
            var packedInt64ElementIndex:Int = 0
            for oneValuePackedInt64 in packedInt64  {
                output += "\(indent) packedInt64[\(packedInt64ElementIndex)]: \(oneValuePackedInt64)\n"
                packedInt64ElementIndex += 1
            }
            var packedUint32ElementIndex:Int = 0
            for oneValuePackedUint32 in packedUint32  {
                output += "\(indent) packedUint32[\(packedUint32ElementIndex)]: \(oneValuePackedUint32)\n"
                packedUint32ElementIndex += 1
            }
            var packedUint64ElementIndex:Int = 0
            for oneValuePackedUint64 in packedUint64  {
                output += "\(indent) packedUint64[\(packedUint64ElementIndex)]: \(oneValuePackedUint64)\n"
                packedUint64ElementIndex += 1
            }
            var packedSint32ElementIndex:Int = 0
            for oneValuePackedSint32 in packedSint32  {
                output += "\(indent) packedSint32[\(packedSint32ElementIndex)]: \(oneValuePackedSint32)\n"
                packedSint32ElementIndex += 1
            }
            var packedSint64ElementIndex:Int = 0
            for oneValuePackedSint64 in packedSint64  {
                output += "\(indent) packedSint64[\(packedSint64ElementIndex)]: \(oneValuePackedSint64)\n"
                packedSint64ElementIndex += 1
            }
            var packedFixed32ElementIndex:Int = 0
            for oneValuePackedFixed32 in packedFixed32  {
                output += "\(indent) packedFixed32[\(packedFixed32ElementIndex)]: \(oneValuePackedFixed32)\n"
                packedFixed32ElementIndex += 1
            }
            var packedFixed64ElementIndex:Int = 0
            for oneValuePackedFixed64 in packedFixed64  {
                output += "\(indent) packedFixed64[\(packedFixed64ElementIndex)]: \(oneValuePackedFixed64)\n"
                packedFixed64ElementIndex += 1
            }
            var packedSfixed32ElementIndex:Int = 0
            for oneValuePackedSfixed32 in packedSfixed32  {
                output += "\(indent) packedSfixed32[\(packedSfixed32ElementIndex)]: \(oneValuePackedSfixed32)\n"
                packedSfixed32ElementIndex += 1
            }
            var packedSfixed64ElementIndex:Int = 0
            for oneValuePackedSfixed64 in packedSfixed64  {
                output += "\(indent) packedSfixed64[\(packedSfixed64ElementIndex)]: \(oneValuePackedSfixed64)\n"
                packedSfixed64ElementIndex += 1
            }
            var packedFloatElementIndex:Int = 0
            for oneValuePackedFloat in packedFloat  {
                output += "\(indent) packedFloat[\(packedFloatElementIndex)]: \(oneValuePackedFloat)\n"
                packedFloatElementIndex += 1
            }
            var packedDoubleElementIndex:Int = 0
            for oneValuePackedDouble in packedDouble  {
                output += "\(indent) packedDouble[\(packedDoubleElementIndex)]: \(oneValuePackedDouble)\n"
                packedDoubleElementIndex += 1
            }
            var packedBoolElementIndex:Int = 0
            for oneValuePackedBool in packedBool  {
                output += "\(indent) packedBool[\(packedBoolElementIndex)]: \(oneValuePackedBool)\n"
                packedBoolElementIndex += 1
            }
            var packedEnumElementIndex:Int = 0
            for oneValueOfpackedEnum in packedEnum {
                output += "\(indent) packedEnum[\(packedEnumElementIndex)]: \(oneValueOfpackedEnum.description)\n"
                packedEnumElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                for oneValuePackedInt32 in packedInt32 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedInt32.hashValue
                }
                for oneValuePackedInt64 in packedInt64 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedInt64.hashValue
                }
                for oneValuePackedUint32 in packedUint32 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedUint32.hashValue
                }
                for oneValuePackedUint64 in packedUint64 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedUint64.hashValue
                }
                for oneValuePackedSint32 in packedSint32 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedSint32.hashValue
                }
                for oneValuePackedSint64 in packedSint64 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedSint64.hashValue
                }
                for oneValuePackedFixed32 in packedFixed32 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedFixed32.hashValue
                }
                for oneValuePackedFixed64 in packedFixed64 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedFixed64.hashValue
                }
                for oneValuePackedSfixed32 in packedSfixed32 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedSfixed32.hashValue
                }
                for oneValuePackedSfixed64 in packedSfixed64 {
                    hashCode = (hashCode &* 31) &+ oneValuePackedSfixed64.hashValue
                }
                for oneValuePackedFloat in packedFloat {
                    hashCode = (hashCode &* 31) &+ oneValuePackedFloat.hashValue
                }
                for oneValuePackedDouble in packedDouble {
                    hashCode = (hashCode &* 31) &+ oneValuePackedDouble.hashValue
                }
                for oneValuePackedBool in packedBool {
                    hashCode = (hashCode &* 31) &+ oneValuePackedBool.hashValue
                }
                for oneValueOfpackedEnum in packedEnum {
                    hashCode = (hashCode &* 31) &+ oneValueOfpackedEnum.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

        override public class func className() -> String {
            return "Proto3ArenaUnittest.TestPackedTypes"
        }
        override public func className() -> String {
            return "Proto3ArenaUnittest.TestPackedTypes"
        }
        //Meta information declaration end

        final public class Builder : GeneratedMessageBuilder {
            fileprivate var builderResult:Proto3ArenaUnittest.TestPackedTypes = Proto3ArenaUnittest.TestPackedTypes()
            public func getMessage() -> Proto3ArenaUnittest.TestPackedTypes {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            public var packedInt32:Array<Int32> {
                get {
                    return builderResult.packedInt32
                }
                set (array) {
                    builderResult.packedInt32 = array
                }
            }
            @discardableResult
            public func setPackedInt32(_ value:Array<Int32>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedInt32 = value
                return self
            }
            @discardableResult
            public func clearPackedInt32() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedInt32.removeAll(keepingCapacity: false)
                return self
            }
            public var packedInt64:Array<Int64> {
                get {
                    return builderResult.packedInt64
                }
                set (array) {
                    builderResult.packedInt64 = array
                }
            }
            @discardableResult
            public func setPackedInt64(_ value:Array<Int64>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedInt64 = value
                return self
            }
            @discardableResult
            public func clearPackedInt64() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedInt64.removeAll(keepingCapacity: false)
                return self
            }
            public var packedUint32:Array<UInt32> {
                get {
                    return builderResult.packedUint32
                }
                set (array) {
                    builderResult.packedUint32 = array
                }
            }
            @discardableResult
            public func setPackedUint32(_ value:Array<UInt32>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedUint32 = value
                return self
            }
            @discardableResult
            public func clearPackedUint32() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedUint32.removeAll(keepingCapacity: false)
                return self
            }
            public var packedUint64:Array<UInt64> {
                get {
                    return builderResult.packedUint64
                }
                set (array) {
                    builderResult.packedUint64 = array
                }
            }
            @discardableResult
            public func setPackedUint64(_ value:Array<UInt64>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedUint64 = value
                return self
            }
            @discardableResult
            public func clearPackedUint64() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedUint64.removeAll(keepingCapacity: false)
                return self
            }
            public var packedSint32:Array<Int32> {
                get {
                    return builderResult.packedSint32
                }
                set (array) {
                    builderResult.packedSint32 = array
                }
            }
            @discardableResult
            public func setPackedSint32(_ value:Array<Int32>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedSint32 = value
                return self
            }
            @discardableResult
            public func clearPackedSint32() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedSint32.removeAll(keepingCapacity: false)
                return self
            }
            public var packedSint64:Array<Int64> {
                get {
                    return builderResult.packedSint64
                }
                set (array) {
                    builderResult.packedSint64 = array
                }
            }
            @discardableResult
            public func setPackedSint64(_ value:Array<Int64>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedSint64 = value
                return self
            }
            @discardableResult
            public func clearPackedSint64() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedSint64.removeAll(keepingCapacity: false)
                return self
            }
            public var packedFixed32:Array<UInt32> {
                get {
                    return builderResult.packedFixed32
                }
                set (array) {
                    builderResult.packedFixed32 = array
                }
            }
            @discardableResult
            public func setPackedFixed32(_ value:Array<UInt32>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedFixed32 = value
                return self
            }
            @discardableResult
            public func clearPackedFixed32() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedFixed32.removeAll(keepingCapacity: false)
                return self
            }
            public var packedFixed64:Array<UInt64> {
                get {
                    return builderResult.packedFixed64
                }
                set (array) {
                    builderResult.packedFixed64 = array
                }
            }
            @discardableResult
            public func setPackedFixed64(_ value:Array<UInt64>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedFixed64 = value
                return self
            }
            @discardableResult
            public func clearPackedFixed64() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedFixed64.removeAll(keepingCapacity: false)
                return self
            }
            public var packedSfixed32:Array<Int32> {
                get {
                    return builderResult.packedSfixed32
                }
                set (array) {
                    builderResult.packedSfixed32 = array
                }
            }
            @discardableResult
            public func setPackedSfixed32(_ value:Array<Int32>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedSfixed32 = value
                return self
            }
            @discardableResult
            public func clearPackedSfixed32() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedSfixed32.removeAll(keepingCapacity: false)
                return self
            }
            public var packedSfixed64:Array<Int64> {
                get {
                    return builderResult.packedSfixed64
                }
                set (array) {
                    builderResult.packedSfixed64 = array
                }
            }
            @discardableResult
            public func setPackedSfixed64(_ value:Array<Int64>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedSfixed64 = value
                return self
            }
            @discardableResult
            public func clearPackedSfixed64() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedSfixed64.removeAll(keepingCapacity: false)
                return self
            }
            public var packedFloat:Array<Float> {
                get {
                    return builderResult.packedFloat
                }
                set (array) {
                    builderResult.packedFloat = array
                }
            }
            @discardableResult
            public func setPackedFloat(_ value:Array<Float>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedFloat = value
                return self
            }
            @discardableResult
            public func clearPackedFloat() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedFloat.removeAll(keepingCapacity: false)
                return self
            }
            public var packedDouble:Array<Double> {
                get {
                    return builderResult.packedDouble
                }
                set (array) {
                    builderResult.packedDouble = array
                }
            }
            @discardableResult
            public func setPackedDouble(_ value:Array<Double>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedDouble = value
                return self
            }
            @discardableResult
            public func clearPackedDouble() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedDouble.removeAll(keepingCapacity: false)
                return self
            }
            public var packedBool:Array<Bool> {
                get {
                    return builderResult.packedBool
                }
                set (array) {
                    builderResult.packedBool = array
                }
            }
            @discardableResult
            public func setPackedBool(_ value:Array<Bool>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedBool = value
                return self
            }
            @discardableResult
            public func clearPackedBool() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedBool.removeAll(keepingCapacity: false)
                return self
            }
            public var packedEnum:Array<Proto3ArenaUnittest.ForeignEnum> {
                get {
                    return builderResult.packedEnum
                }
                set (value) {
                    builderResult.packedEnum = value
                }
            }
            @discardableResult
            public func setPackedEnum(_ value:Array<Proto3ArenaUnittest.ForeignEnum>) -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                self.packedEnum = value
                return self
            }
            @discardableResult
            public func clearPackedEnum() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult.packedEnum.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                builderResult = Proto3ArenaUnittest.TestPackedTypes()
                return self
            }
            override public func clone() throws -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                return try Proto3ArenaUnittest.TestPackedTypes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Proto3ArenaUnittest.TestPackedTypes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Proto3ArenaUnittest.TestPackedTypes {
                let returnMe:Proto3ArenaUnittest.TestPackedTypes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Proto3ArenaUnittest.TestPackedTypes) throws -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                if other == Proto3ArenaUnittest.TestPackedTypes() {
                    return self
                }
                if !other.packedInt32.isEmpty {
                    builderResult.packedInt32 += other.packedInt32
                }
                if !other.packedInt64.isEmpty {
                    builderResult.packedInt64 += other.packedInt64
                }
                if !other.packedUint32.isEmpty {
                    builderResult.packedUint32 += other.packedUint32
                }
                if !other.packedUint64.isEmpty {
                    builderResult.packedUint64 += other.packedUint64
                }
                if !other.packedSint32.isEmpty {
                    builderResult.packedSint32 += other.packedSint32
                }
                if !other.packedSint64.isEmpty {
                    builderResult.packedSint64 += other.packedSint64
                }
                if !other.packedFixed32.isEmpty {
                    builderResult.packedFixed32 += other.packedFixed32
                }
                if !other.packedFixed64.isEmpty {
                    builderResult.packedFixed64 += other.packedFixed64
                }
                if !other.packedSfixed32.isEmpty {
                    builderResult.packedSfixed32 += other.packedSfixed32
                }
                if !other.packedSfixed64.isEmpty {
                    builderResult.packedSfixed64 += other.packedSfixed64
                }
                if !other.packedFloat.isEmpty {
                    builderResult.packedFloat += other.packedFloat
                }
                if !other.packedDouble.isEmpty {
                    builderResult.packedDouble += other.packedDouble
                }
                if !other.packedBool.isEmpty {
                    builderResult.packedBool += other.packedBool
                }
                if !other.packedEnum.isEmpty {
                     builderResult.packedEnum += other.packedEnum
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                while (true) {
                    let protobufTag = try codedInputStream.readTag()
                    switch protobufTag {
                    case 0: 
                        self.unknownFields = try unknownFieldsBuilder.build()
                        return self

                    case 722:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedInt32.append(try codedInputStream.readInt32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 730:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedInt64.append(try codedInputStream.readInt64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 738:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedUint32.append(try codedInputStream.readUInt32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 746:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedUint64.append(try codedInputStream.readUInt64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 754:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedSint32.append(try codedInputStream.readSInt32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 762:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedSint64.append(try codedInputStream.readSInt64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 770:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedFixed32.append(try codedInputStream.readFixed32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 778:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedFixed64.append(try codedInputStream.readFixed64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 786:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedSfixed32.append(try codedInputStream.readSFixed32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 794:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedSfixed64.append(try codedInputStream.readSFixed64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 802:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedFloat.append(try codedInputStream.readFloat())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 810:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedDouble.append(try codedInputStream.readDouble())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 818:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.packedBool.append(try codedInputStream.readBool())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 826:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let oldLimit = try codedInputStream.pushLimit(byteLimit: length)
                        while codedInputStream.bytesUntilLimit() > 0 {
                        let valueIntpackedEnum = try codedInputStream.readEnum()
                        if let enumspackedEnum = Proto3ArenaUnittest.ForeignEnum(rawValue:valueIntpackedEnum) {
                            builderResult.packedEnum.append(enumspackedEnum)
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 103, value:Int64(valueIntpackedEnum))
                        }
                        }
                        codedInputStream.popLimit(oldLimit: oldLimit)

                    default:
                        if (!(try parse(codedInputStream:codedInputStream, unknownFields:unknownFieldsBuilder, extensionRegistry:extensionRegistry, tag:protobufTag))) {
                            unknownFields = try unknownFieldsBuilder.build()
                            return self
                        }
                    }
                }
            }
            class override public func decodeToBuilder(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                let resultDecodedBuilder = Proto3ArenaUnittest.TestPackedTypes.Builder()
                if let jsonValuePackedInt32 = jsonMap["packedInt32"] as? Array<Int> {
                    var jsonArrayPackedInt32:Array<Int32> = []
                    for oneValuePackedInt32 in jsonValuePackedInt32 {
                        jsonArrayPackedInt32.append(Int32(oneValuePackedInt32))
                    }
                    resultDecodedBuilder.packedInt32 = jsonArrayPackedInt32
                }
                if let jsonValuePackedInt64 = jsonMap["packedInt64"] as? Array<String> {
                    var jsonArrayPackedInt64:Array<Int64> = []
                    for oneValuePackedInt64 in jsonValuePackedInt64 {
                        jsonArrayPackedInt64.append(Int64(oneValuePackedInt64)!)
                    }
                    resultDecodedBuilder.packedInt64 = jsonArrayPackedInt64
                }
                if let jsonValuePackedUint32 = jsonMap["packedUint32"] as? Array<UInt> {
                    var jsonArrayPackedUint32:Array<UInt32> = []
                    for oneValuePackedUint32 in jsonValuePackedUint32 {
                        jsonArrayPackedUint32.append(UInt32(oneValuePackedUint32))
                    }
                    resultDecodedBuilder.packedUint32 = jsonArrayPackedUint32
                }
                if let jsonValuePackedUint64 = jsonMap["packedUint64"] as? Array<String> {
                    var jsonArrayPackedUint64:Array<UInt64> = []
                    for oneValuePackedUint64 in jsonValuePackedUint64 {
                        jsonArrayPackedUint64.append(UInt64(oneValuePackedUint64)!)
                    }
                    resultDecodedBuilder.packedUint64 = jsonArrayPackedUint64
                }
                if let jsonValuePackedSint32 = jsonMap["packedSint32"] as? Array<Int> {
                    var jsonArrayPackedSint32:Array<Int32> = []
                    for oneValuePackedSint32 in jsonValuePackedSint32 {
                        jsonArrayPackedSint32.append(Int32(oneValuePackedSint32))
                    }
                    resultDecodedBuilder.packedSint32 = jsonArrayPackedSint32
                }
                if let jsonValuePackedSint64 = jsonMap["packedSint64"] as? Array<String> {
                    var jsonArrayPackedSint64:Array<Int64> = []
                    for oneValuePackedSint64 in jsonValuePackedSint64 {
                        jsonArrayPackedSint64.append(Int64(oneValuePackedSint64)!)
                    }
                    resultDecodedBuilder.packedSint64 = jsonArrayPackedSint64
                }
                if let jsonValuePackedFixed32 = jsonMap["packedFixed32"] as? Array<UInt> {
                    var jsonArrayPackedFixed32:Array<UInt32> = []
                    for oneValuePackedFixed32 in jsonValuePackedFixed32 {
                        jsonArrayPackedFixed32.append(UInt32(oneValuePackedFixed32))
                    }
                    resultDecodedBuilder.packedFixed32 = jsonArrayPackedFixed32
                }
                if let jsonValuePackedFixed64 = jsonMap["packedFixed64"] as? Array<String> {
                    var jsonArrayPackedFixed64:Array<UInt64> = []
                    for oneValuePackedFixed64 in jsonValuePackedFixed64 {
                        jsonArrayPackedFixed64.append(UInt64(oneValuePackedFixed64)!)
                    }
                    resultDecodedBuilder.packedFixed64 = jsonArrayPackedFixed64
                }
                if let jsonValuePackedSfixed32 = jsonMap["packedSfixed32"] as? Array<Int> {
                    var jsonArrayPackedSfixed32:Array<Int32> = []
                    for oneValuePackedSfixed32 in jsonValuePackedSfixed32 {
                        jsonArrayPackedSfixed32.append(Int32(oneValuePackedSfixed32))
                    }
                    resultDecodedBuilder.packedSfixed32 = jsonArrayPackedSfixed32
                }
                if let jsonValuePackedSfixed64 = jsonMap["packedSfixed64"] as? Array<String> {
                    var jsonArrayPackedSfixed64:Array<Int64> = []
                    for oneValuePackedSfixed64 in jsonValuePackedSfixed64 {
                        jsonArrayPackedSfixed64.append(Int64(oneValuePackedSfixed64)!)
                    }
                    resultDecodedBuilder.packedSfixed64 = jsonArrayPackedSfixed64
                }
                if let jsonValuePackedFloat = jsonMap["packedFloat"] as? Array<Float> {
                    var jsonArrayPackedFloat:Array<Float> = []
                    for oneValuePackedFloat in jsonValuePackedFloat {
                        jsonArrayPackedFloat.append(Float(oneValuePackedFloat))
                    }
                    resultDecodedBuilder.packedFloat = jsonArrayPackedFloat
                }
                if let jsonValuePackedDouble = jsonMap["packedDouble"] as? Array<Double> {
                    var jsonArrayPackedDouble:Array<Double> = []
                    for oneValuePackedDouble in jsonValuePackedDouble {
                        jsonArrayPackedDouble.append(Double(oneValuePackedDouble))
                    }
                    resultDecodedBuilder.packedDouble = jsonArrayPackedDouble
                }
                if let jsonValuePackedBool = jsonMap["packedBool"] as? Array<Bool> {
                    var jsonArrayPackedBool:Array<Bool> = []
                    for oneValuePackedBool in jsonValuePackedBool {
                        jsonArrayPackedBool.append(oneValuePackedBool)
                    }
                    resultDecodedBuilder.packedBool = jsonArrayPackedBool
                }
                if let jsonValuePackedEnum = jsonMap["packedEnum"] as? Array<String> {
                    var jsonArrayPackedEnum:Array<Proto3ArenaUnittest.ForeignEnum> = []
                    for oneValuePackedEnum in jsonValuePackedEnum {
                        let enumFromStringPackedEnum = try Proto3ArenaUnittest.ForeignEnum.fromString(oneValuePackedEnum)
                        jsonArrayPackedEnum.append(enumFromStringPackedEnum)
                    }
                    resultDecodedBuilder.packedEnum = jsonArrayPackedEnum
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestPackedTypes.Builder {
                let jsonData = try JSONSerialization.jsonObject(with:data, options: options)
                guard let jsDataCast = jsonData as? Dictionary<String,Any> else {
                  throw ProtocolBuffersError.invalidProtocolBuffer("Invalid JSON data")
                }
                return try Proto3ArenaUnittest.TestPackedTypes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Explicitly set packed to false
    final public class TestUnpackedTypes : GeneratedMessage {
        public typealias BuilderType = Proto3ArenaUnittest.TestUnpackedTypes.Builder

        public static func == (lhs: Proto3ArenaUnittest.TestUnpackedTypes, rhs: Proto3ArenaUnittest.TestUnpackedTypes) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.repeatedInt32 == rhs.repeatedInt32)
            fieldCheck = fieldCheck && (lhs.repeatedInt64 == rhs.repeatedInt64)
            fieldCheck = fieldCheck && (lhs.repeatedUint32 == rhs.repeatedUint32)
            fieldCheck = fieldCheck && (lhs.repeatedUint64 == rhs.repeatedUint64)
            fieldCheck = fieldCheck && (lhs.repeatedSint32 == rhs.repeatedSint32)
            fieldCheck = fieldCheck && (lhs.repeatedSint64 == rhs.repeatedSint64)
            fieldCheck = fieldCheck && (lhs.repeatedFixed32 == rhs.repeatedFixed32)
            fieldCheck = fieldCheck && (lhs.repeatedFixed64 == rhs.repeatedFixed64)
            fieldCheck = fieldCheck && (lhs.repeatedSfixed32 == rhs.repeatedSfixed32)
            fieldCheck = fieldCheck && (lhs.repeatedSfixed64 == rhs.repeatedSfixed64)
            fieldCheck = fieldCheck && (lhs.repeatedFloat == rhs.repeatedFloat)
            fieldCheck = fieldCheck && (lhs.repeatedDouble == rhs.repeatedDouble)
            fieldCheck = fieldCheck && (lhs.repeatedBool == rhs.repeatedBool)
            fieldCheck = fieldCheck && (lhs.repeatedNestedEnum == rhs.repeatedNestedEnum)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var repeatedInt32:Array<Int32> = Array<Int32>()
        private var repeatedInt32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedInt64:Array<Int64> = Array<Int64>()
        private var repeatedInt64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedUint32:Array<UInt32> = Array<UInt32>()
        private var repeatedUint32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedUint64:Array<UInt64> = Array<UInt64>()
        private var repeatedUint64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedSint32:Array<Int32> = Array<Int32>()
        private var repeatedSint32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedSint64:Array<Int64> = Array<Int64>()
        private var repeatedSint64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedFixed32:Array<UInt32> = Array<UInt32>()
        private var repeatedFixed32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedFixed64:Array<UInt64> = Array<UInt64>()
        private var repeatedFixed64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedSfixed32:Array<Int32> = Array<Int32>()
        private var repeatedSfixed32MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedSfixed64:Array<Int64> = Array<Int64>()
        private var repeatedSfixed64MemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedFloat:Array<Float> = Array<Float>()
        private var repeatedFloatMemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedDouble:Array<Double> = Array<Double>()
        private var repeatedDoubleMemoizedSerializedSize:Int32 = -1
        public fileprivate(set) var repeatedBool:Array<Bool> = Array<Bool>()
        private var repeatedBoolMemoizedSerializedSize:Int32 = -1
        private var repeatedNestedEnumMemoizedSerializedSize:Int32 = 0
        public fileprivate(set) var repeatedNestedEnum:Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum> = Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if !repeatedInt32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 8)
                try codedOutputStream.writeRawVarint32(value: repeatedInt32MemoizedSerializedSize)
                for oneValuerepeatedInt32 in repeatedInt32 {
                    try codedOutputStream.writeInt32NoTag(value: oneValuerepeatedInt32)
                }
            }
            if !repeatedInt64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 16)
                try codedOutputStream.writeRawVarint32(value: repeatedInt64MemoizedSerializedSize)
                for oneValuerepeatedInt64 in repeatedInt64 {
                    try codedOutputStream.writeInt64NoTag(value: oneValuerepeatedInt64)
                }
            }
            if !repeatedUint32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 24)
                try codedOutputStream.writeRawVarint32(value: repeatedUint32MemoizedSerializedSize)
                for oneValuerepeatedUint32 in repeatedUint32 {
                    try codedOutputStream.writeUInt32NoTag(value: oneValuerepeatedUint32)
                }
            }
            if !repeatedUint64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 32)
                try codedOutputStream.writeRawVarint32(value: repeatedUint64MemoizedSerializedSize)
                for oneValuerepeatedUint64 in repeatedUint64 {
                    try codedOutputStream.writeUInt64NoTag(value: oneValuerepeatedUint64)
                }
            }
            if !repeatedSint32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 40)
                try codedOutputStream.writeRawVarint32(value: repeatedSint32MemoizedSerializedSize)
                for oneValuerepeatedSint32 in repeatedSint32 {
                    try codedOutputStream.writeSInt32NoTag(value: oneValuerepeatedSint32)
                }
            }
            if !repeatedSint64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 48)
                try codedOutputStream.writeRawVarint32(value: repeatedSint64MemoizedSerializedSize)
                for oneValuerepeatedSint64 in repeatedSint64 {
                    try codedOutputStream.writeSInt64NoTag(value: oneValuerepeatedSint64)
                }
            }
            if !repeatedFixed32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 61)
                try codedOutputStream.writeRawVarint32(value: repeatedFixed32MemoizedSerializedSize)
                for oneValuerepeatedFixed32 in repeatedFixed32 {
                    try codedOutputStream.writeFixed32NoTag(value: oneValuerepeatedFixed32)
                }
            }
            if !repeatedFixed64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 65)
                try codedOutputStream.writeRawVarint32(value: repeatedFixed64MemoizedSerializedSize)
                for oneValuerepeatedFixed64 in repeatedFixed64 {
                    try codedOutputStream.writeFixed64NoTag(value: oneValuerepeatedFixed64)
                }
            }
            if !repeatedSfixed32.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 77)
                try codedOutputStream.writeRawVarint32(value: repeatedSfixed32MemoizedSerializedSize)
                for oneValuerepeatedSfixed32 in repeatedSfixed32 {
                    try codedOutputStream.writeSFixed32NoTag(value: oneValuerepeatedSfixed32)
                }
            }
            if !repeatedSfixed64.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 81)
                try codedOutputStream.writeRawVarint32(value: repeatedSfixed64MemoizedSerializedSize)
                for oneValuerepeatedSfixed64 in repeatedSfixed64 {
                    try codedOutputStream.writeSFixed64NoTag(value: oneValuerepeatedSfixed64)
                }
            }
            if !repeatedFloat.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 93)
                try codedOutputStream.writeRawVarint32(value: repeatedFloatMemoizedSerializedSize)
                for oneValuerepeatedFloat in repeatedFloat {
                    try codedOutputStream.writeFloatNoTag(value: oneValuerepeatedFloat)
                }
            }
            if !repeatedDouble.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 97)
                try codedOutputStream.writeRawVarint32(value: repeatedDoubleMemoizedSerializedSize)
                for oneValuerepeatedDouble in repeatedDouble {
                    try codedOutputStream.writeDoubleNoTag(value: oneValuerepeatedDouble)
                }
            }
            if !repeatedBool.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 104)
                try codedOutputStream.writeRawVarint32(value: repeatedBoolMemoizedSerializedSize)
                for oneValuerepeatedBool in repeatedBool {
                    try codedOutputStream.writeBoolNoTag(value: oneValuerepeatedBool)
                }
            }
            if !repeatedNestedEnum.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 112)
                try codedOutputStream.writeRawVarint32(value: repeatedNestedEnumMemoizedSerializedSize)
            }
            for oneValueOfrepeatedNestedEnum in repeatedNestedEnum {
                  try codedOutputStream.writeEnumNoTag(value: oneValueOfrepeatedNestedEnum.rawValue)
            }
            try unknownFields.writeTo(codedOutputStream: codedOutputStream)
        }
        override public func serializedSize() -> Int32 {
            var serialize_size:Int32 = memoizedSerializedSize
            if serialize_size != -1 {
             return serialize_size
            }

            serialize_size = 0
            var dataSizeRepeatedInt32:Int32 = 0
            for oneValuerepeatedInt32 in repeatedInt32 {
                dataSizeRepeatedInt32 += oneValuerepeatedInt32.computeInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedInt32
            if !repeatedInt32.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedInt32.computeInt32SizeNoTag()
            }
            repeatedInt32MemoizedSerializedSize = dataSizeRepeatedInt32
            var dataSizeRepeatedInt64:Int32 = 0
            for oneValuerepeatedInt64 in repeatedInt64 {
                dataSizeRepeatedInt64 += oneValuerepeatedInt64.computeInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedInt64
            if !repeatedInt64.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedInt64.computeInt32SizeNoTag()
            }
            repeatedInt64MemoizedSerializedSize = dataSizeRepeatedInt64
            var dataSizeRepeatedUint32:Int32 = 0
            for oneValuerepeatedUint32 in repeatedUint32 {
                dataSizeRepeatedUint32 += oneValuerepeatedUint32.computeUInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedUint32
            if !repeatedUint32.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedUint32.computeInt32SizeNoTag()
            }
            repeatedUint32MemoizedSerializedSize = dataSizeRepeatedUint32
            var dataSizeRepeatedUint64:Int32 = 0
            for oneValuerepeatedUint64 in repeatedUint64 {
                dataSizeRepeatedUint64 += oneValuerepeatedUint64.computeUInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedUint64
            if !repeatedUint64.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedUint64.computeInt32SizeNoTag()
            }
            repeatedUint64MemoizedSerializedSize = dataSizeRepeatedUint64
            var dataSizeRepeatedSint32:Int32 = 0
            for oneValuerepeatedSint32 in repeatedSint32 {
                dataSizeRepeatedSint32 += oneValuerepeatedSint32.computeSInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedSint32
            if !repeatedSint32.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedSint32.computeInt32SizeNoTag()
            }
            repeatedSint32MemoizedSerializedSize = dataSizeRepeatedSint32
            var dataSizeRepeatedSint64:Int32 = 0
            for oneValuerepeatedSint64 in repeatedSint64 {
                dataSizeRepeatedSint64 += oneValuerepeatedSint64.computeSInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedSint64
            if !repeatedSint64.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedSint64.computeInt32SizeNoTag()
            }
            repeatedSint64MemoizedSerializedSize = dataSizeRepeatedSint64
            var dataSizeRepeatedFixed32:Int32 = 0
            dataSizeRepeatedFixed32 = 4 * Int32(repeatedFixed32.count)
            serialize_size += dataSizeRepeatedFixed32
            if !repeatedFixed32.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedFixed32.computeInt32SizeNoTag()
            }
            repeatedFixed32MemoizedSerializedSize = dataSizeRepeatedFixed32
            var dataSizeRepeatedFixed64:Int32 = 0
            dataSizeRepeatedFixed64 = 8 * Int32(repeatedFixed64.count)
            serialize_size += dataSizeRepeatedFixed64
            if !repeatedFixed64.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedFixed64.computeInt32SizeNoTag()
            }
            repeatedFixed64MemoizedSerializedSize = dataSizeRepeatedFixed64
            var dataSizeRepeatedSfixed32:Int32 = 0
            dataSizeRepeatedSfixed32 = 4 * Int32(repeatedSfixed32.count)
            serialize_size += dataSizeRepeatedSfixed32
            if !repeatedSfixed32.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedSfixed32.computeInt32SizeNoTag()
            }
            repeatedSfixed32MemoizedSerializedSize = dataSizeRepeatedSfixed32
            var dataSizeRepeatedSfixed64:Int32 = 0
            dataSizeRepeatedSfixed64 = 8 * Int32(repeatedSfixed64.count)
            serialize_size += dataSizeRepeatedSfixed64
            if !repeatedSfixed64.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedSfixed64.computeInt32SizeNoTag()
            }
            repeatedSfixed64MemoizedSerializedSize = dataSizeRepeatedSfixed64
            var dataSizeRepeatedFloat:Int32 = 0
            dataSizeRepeatedFloat = 4 * Int32(repeatedFloat.count)
            serialize_size += dataSizeRepeatedFloat
            if !repeatedFloat.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedFloat.computeInt32SizeNoTag()
            }
            repeatedFloatMemoizedSerializedSize = dataSizeRepeatedFloat
            var dataSizeRepeatedDouble:Int32 = 0
            dataSizeRepeatedDouble = 8 * Int32(repeatedDouble.count)
            serialize_size += dataSizeRepeatedDouble
            if !repeatedDouble.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedDouble.computeInt32SizeNoTag()
            }
            repeatedDoubleMemoizedSerializedSize = dataSizeRepeatedDouble
            var dataSizeRepeatedBool:Int32 = 0
            dataSizeRepeatedBool = 1 * Int32(repeatedBool.count)
            serialize_size += dataSizeRepeatedBool
            if !repeatedBool.isEmpty {
                serialize_size += 1
                serialize_size += dataSizeRepeatedBool.computeInt32SizeNoTag()
            }
            repeatedBoolMemoizedSerializedSize = dataSizeRepeatedBool
            var dataSizerepeatedNestedEnum:Int32 = 0
            for oneValueOfrepeatedNestedEnum in repeatedNestedEnum {
                dataSizerepeatedNestedEnum += oneValueOfrepeatedNestedEnum.rawValue.computeEnumSizeNoTag()
            }
            serialize_size += dataSizerepeatedNestedEnum
            if !repeatedNestedEnum.isEmpty {
                serialize_size += 1
                serialize_size += dataSizerepeatedNestedEnum.computeRawVarint32Size()
            }
            repeatedNestedEnumMemoizedSerializedSize = dataSizerepeatedNestedEnum
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
            return Proto3ArenaUnittest.TestUnpackedTypes.classBuilder() as! Proto3ArenaUnittest.TestUnpackedTypes.Builder
        }
        public func getBuilder() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
            return classBuilder() as! Proto3ArenaUnittest.TestUnpackedTypes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.TestUnpackedTypes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.TestUnpackedTypes.Builder()
        }
        public func toBuilder() throws -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
            return try Proto3ArenaUnittest.TestUnpackedTypes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Proto3ArenaUnittest.TestUnpackedTypes) throws -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
            return try Proto3ArenaUnittest.TestUnpackedTypes.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if !repeatedInt32.isEmpty {
                var jsonArrayRepeatedInt32:Array<Int> = []
                for oneValueRepeatedInt32 in repeatedInt32 {
                    jsonArrayRepeatedInt32.append(Int(oneValueRepeatedInt32))
                }
                jsonMap["repeatedInt32"] = jsonArrayRepeatedInt32
            }
            if !repeatedInt64.isEmpty {
                var jsonArrayRepeatedInt64:Array<String> = []
                for oneValueRepeatedInt64 in repeatedInt64 {
                    jsonArrayRepeatedInt64.append("\(oneValueRepeatedInt64)")
                }
                jsonMap["repeatedInt64"] = jsonArrayRepeatedInt64
            }
            if !repeatedUint32.isEmpty {
                var jsonArrayRepeatedUint32:Array<UInt> = []
                for oneValueRepeatedUint32 in repeatedUint32 {
                    jsonArrayRepeatedUint32.append(UInt(oneValueRepeatedUint32))
                }
                jsonMap["repeatedUint32"] = jsonArrayRepeatedUint32
            }
            if !repeatedUint64.isEmpty {
                var jsonArrayRepeatedUint64:Array<String> = []
                for oneValueRepeatedUint64 in repeatedUint64 {
                    jsonArrayRepeatedUint64.append("\(oneValueRepeatedUint64)")
                }
                jsonMap["repeatedUint64"] = jsonArrayRepeatedUint64
            }
            if !repeatedSint32.isEmpty {
                var jsonArrayRepeatedSint32:Array<Int> = []
                for oneValueRepeatedSint32 in repeatedSint32 {
                    jsonArrayRepeatedSint32.append(Int(oneValueRepeatedSint32))
                }
                jsonMap["repeatedSint32"] = jsonArrayRepeatedSint32
            }
            if !repeatedSint64.isEmpty {
                var jsonArrayRepeatedSint64:Array<String> = []
                for oneValueRepeatedSint64 in repeatedSint64 {
                    jsonArrayRepeatedSint64.append("\(oneValueRepeatedSint64)")
                }
                jsonMap["repeatedSint64"] = jsonArrayRepeatedSint64
            }
            if !repeatedFixed32.isEmpty {
                var jsonArrayRepeatedFixed32:Array<UInt> = []
                for oneValueRepeatedFixed32 in repeatedFixed32 {
                    jsonArrayRepeatedFixed32.append(UInt(oneValueRepeatedFixed32))
                }
                jsonMap["repeatedFixed32"] = jsonArrayRepeatedFixed32
            }
            if !repeatedFixed64.isEmpty {
                var jsonArrayRepeatedFixed64:Array<String> = []
                for oneValueRepeatedFixed64 in repeatedFixed64 {
                    jsonArrayRepeatedFixed64.append("\(oneValueRepeatedFixed64)")
                }
                jsonMap["repeatedFixed64"] = jsonArrayRepeatedFixed64
            }
            if !repeatedSfixed32.isEmpty {
                var jsonArrayRepeatedSfixed32:Array<Int> = []
                for oneValueRepeatedSfixed32 in repeatedSfixed32 {
                    jsonArrayRepeatedSfixed32.append(Int(oneValueRepeatedSfixed32))
                }
                jsonMap["repeatedSfixed32"] = jsonArrayRepeatedSfixed32
            }
            if !repeatedSfixed64.isEmpty {
                var jsonArrayRepeatedSfixed64:Array<String> = []
                for oneValueRepeatedSfixed64 in repeatedSfixed64 {
                    jsonArrayRepeatedSfixed64.append("\(oneValueRepeatedSfixed64)")
                }
                jsonMap["repeatedSfixed64"] = jsonArrayRepeatedSfixed64
            }
            if !repeatedFloat.isEmpty {
                var jsonArrayRepeatedFloat:Array<Float> = []
                for oneValueRepeatedFloat in repeatedFloat {
                    jsonArrayRepeatedFloat.append(Float(oneValueRepeatedFloat))
                }
                jsonMap["repeatedFloat"] = jsonArrayRepeatedFloat
            }
            if !repeatedDouble.isEmpty {
                var jsonArrayRepeatedDouble:Array<Double> = []
                for oneValueRepeatedDouble in repeatedDouble {
                    jsonArrayRepeatedDouble.append(Double(oneValueRepeatedDouble))
                }
                jsonMap["repeatedDouble"] = jsonArrayRepeatedDouble
            }
            if !repeatedBool.isEmpty {
                var jsonArrayRepeatedBool:Array<Bool> = []
                for oneValueRepeatedBool in repeatedBool {
                    jsonArrayRepeatedBool.append(oneValueRepeatedBool)
                }
                jsonMap["repeatedBool"] = jsonArrayRepeatedBool
            }
            if !repeatedNestedEnum.isEmpty {
                var jsonArrayRepeatedNestedEnum:Array<String> = []
                for oneValueRepeatedNestedEnum in repeatedNestedEnum {
                    jsonArrayRepeatedNestedEnum.append(oneValueRepeatedNestedEnum.toString())
                }
                jsonMap["repeatedNestedEnum"] = jsonArrayRepeatedNestedEnum
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestUnpackedTypes {
            return try Proto3ArenaUnittest.TestUnpackedTypes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestUnpackedTypes {
            return try Proto3ArenaUnittest.TestUnpackedTypes.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            var repeatedInt32ElementIndex:Int = 0
            for oneValueRepeatedInt32 in repeatedInt32  {
                output += "\(indent) repeatedInt32[\(repeatedInt32ElementIndex)]: \(oneValueRepeatedInt32)\n"
                repeatedInt32ElementIndex += 1
            }
            var repeatedInt64ElementIndex:Int = 0
            for oneValueRepeatedInt64 in repeatedInt64  {
                output += "\(indent) repeatedInt64[\(repeatedInt64ElementIndex)]: \(oneValueRepeatedInt64)\n"
                repeatedInt64ElementIndex += 1
            }
            var repeatedUint32ElementIndex:Int = 0
            for oneValueRepeatedUint32 in repeatedUint32  {
                output += "\(indent) repeatedUint32[\(repeatedUint32ElementIndex)]: \(oneValueRepeatedUint32)\n"
                repeatedUint32ElementIndex += 1
            }
            var repeatedUint64ElementIndex:Int = 0
            for oneValueRepeatedUint64 in repeatedUint64  {
                output += "\(indent) repeatedUint64[\(repeatedUint64ElementIndex)]: \(oneValueRepeatedUint64)\n"
                repeatedUint64ElementIndex += 1
            }
            var repeatedSint32ElementIndex:Int = 0
            for oneValueRepeatedSint32 in repeatedSint32  {
                output += "\(indent) repeatedSint32[\(repeatedSint32ElementIndex)]: \(oneValueRepeatedSint32)\n"
                repeatedSint32ElementIndex += 1
            }
            var repeatedSint64ElementIndex:Int = 0
            for oneValueRepeatedSint64 in repeatedSint64  {
                output += "\(indent) repeatedSint64[\(repeatedSint64ElementIndex)]: \(oneValueRepeatedSint64)\n"
                repeatedSint64ElementIndex += 1
            }
            var repeatedFixed32ElementIndex:Int = 0
            for oneValueRepeatedFixed32 in repeatedFixed32  {
                output += "\(indent) repeatedFixed32[\(repeatedFixed32ElementIndex)]: \(oneValueRepeatedFixed32)\n"
                repeatedFixed32ElementIndex += 1
            }
            var repeatedFixed64ElementIndex:Int = 0
            for oneValueRepeatedFixed64 in repeatedFixed64  {
                output += "\(indent) repeatedFixed64[\(repeatedFixed64ElementIndex)]: \(oneValueRepeatedFixed64)\n"
                repeatedFixed64ElementIndex += 1
            }
            var repeatedSfixed32ElementIndex:Int = 0
            for oneValueRepeatedSfixed32 in repeatedSfixed32  {
                output += "\(indent) repeatedSfixed32[\(repeatedSfixed32ElementIndex)]: \(oneValueRepeatedSfixed32)\n"
                repeatedSfixed32ElementIndex += 1
            }
            var repeatedSfixed64ElementIndex:Int = 0
            for oneValueRepeatedSfixed64 in repeatedSfixed64  {
                output += "\(indent) repeatedSfixed64[\(repeatedSfixed64ElementIndex)]: \(oneValueRepeatedSfixed64)\n"
                repeatedSfixed64ElementIndex += 1
            }
            var repeatedFloatElementIndex:Int = 0
            for oneValueRepeatedFloat in repeatedFloat  {
                output += "\(indent) repeatedFloat[\(repeatedFloatElementIndex)]: \(oneValueRepeatedFloat)\n"
                repeatedFloatElementIndex += 1
            }
            var repeatedDoubleElementIndex:Int = 0
            for oneValueRepeatedDouble in repeatedDouble  {
                output += "\(indent) repeatedDouble[\(repeatedDoubleElementIndex)]: \(oneValueRepeatedDouble)\n"
                repeatedDoubleElementIndex += 1
            }
            var repeatedBoolElementIndex:Int = 0
            for oneValueRepeatedBool in repeatedBool  {
                output += "\(indent) repeatedBool[\(repeatedBoolElementIndex)]: \(oneValueRepeatedBool)\n"
                repeatedBoolElementIndex += 1
            }
            var repeatedNestedEnumElementIndex:Int = 0
            for oneValueOfrepeatedNestedEnum in repeatedNestedEnum {
                output += "\(indent) repeatedNestedEnum[\(repeatedNestedEnumElementIndex)]: \(oneValueOfrepeatedNestedEnum.description)\n"
                repeatedNestedEnumElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                for oneValueRepeatedInt32 in repeatedInt32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedInt32.hashValue
                }
                for oneValueRepeatedInt64 in repeatedInt64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedInt64.hashValue
                }
                for oneValueRepeatedUint32 in repeatedUint32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedUint32.hashValue
                }
                for oneValueRepeatedUint64 in repeatedUint64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedUint64.hashValue
                }
                for oneValueRepeatedSint32 in repeatedSint32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedSint32.hashValue
                }
                for oneValueRepeatedSint64 in repeatedSint64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedSint64.hashValue
                }
                for oneValueRepeatedFixed32 in repeatedFixed32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedFixed32.hashValue
                }
                for oneValueRepeatedFixed64 in repeatedFixed64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedFixed64.hashValue
                }
                for oneValueRepeatedSfixed32 in repeatedSfixed32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedSfixed32.hashValue
                }
                for oneValueRepeatedSfixed64 in repeatedSfixed64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedSfixed64.hashValue
                }
                for oneValueRepeatedFloat in repeatedFloat {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedFloat.hashValue
                }
                for oneValueRepeatedDouble in repeatedDouble {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedDouble.hashValue
                }
                for oneValueRepeatedBool in repeatedBool {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedBool.hashValue
                }
                for oneValueOfrepeatedNestedEnum in repeatedNestedEnum {
                    hashCode = (hashCode &* 31) &+ oneValueOfrepeatedNestedEnum.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

        override public class func className() -> String {
            return "Proto3ArenaUnittest.TestUnpackedTypes"
        }
        override public func className() -> String {
            return "Proto3ArenaUnittest.TestUnpackedTypes"
        }
        //Meta information declaration end

        final public class Builder : GeneratedMessageBuilder {
            fileprivate var builderResult:Proto3ArenaUnittest.TestUnpackedTypes = Proto3ArenaUnittest.TestUnpackedTypes()
            public func getMessage() -> Proto3ArenaUnittest.TestUnpackedTypes {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            public var repeatedInt32:Array<Int32> {
                get {
                    return builderResult.repeatedInt32
                }
                set (array) {
                    builderResult.repeatedInt32 = array
                }
            }
            @discardableResult
            public func setRepeatedInt32(_ value:Array<Int32>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedInt32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedInt32() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedInt32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedInt64:Array<Int64> {
                get {
                    return builderResult.repeatedInt64
                }
                set (array) {
                    builderResult.repeatedInt64 = array
                }
            }
            @discardableResult
            public func setRepeatedInt64(_ value:Array<Int64>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedInt64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedInt64() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedInt64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedUint32:Array<UInt32> {
                get {
                    return builderResult.repeatedUint32
                }
                set (array) {
                    builderResult.repeatedUint32 = array
                }
            }
            @discardableResult
            public func setRepeatedUint32(_ value:Array<UInt32>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedUint32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedUint32() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedUint32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedUint64:Array<UInt64> {
                get {
                    return builderResult.repeatedUint64
                }
                set (array) {
                    builderResult.repeatedUint64 = array
                }
            }
            @discardableResult
            public func setRepeatedUint64(_ value:Array<UInt64>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedUint64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedUint64() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedUint64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedSint32:Array<Int32> {
                get {
                    return builderResult.repeatedSint32
                }
                set (array) {
                    builderResult.repeatedSint32 = array
                }
            }
            @discardableResult
            public func setRepeatedSint32(_ value:Array<Int32>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedSint32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSint32() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedSint32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedSint64:Array<Int64> {
                get {
                    return builderResult.repeatedSint64
                }
                set (array) {
                    builderResult.repeatedSint64 = array
                }
            }
            @discardableResult
            public func setRepeatedSint64(_ value:Array<Int64>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedSint64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSint64() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedSint64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedFixed32:Array<UInt32> {
                get {
                    return builderResult.repeatedFixed32
                }
                set (array) {
                    builderResult.repeatedFixed32 = array
                }
            }
            @discardableResult
            public func setRepeatedFixed32(_ value:Array<UInt32>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedFixed32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedFixed32() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedFixed32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedFixed64:Array<UInt64> {
                get {
                    return builderResult.repeatedFixed64
                }
                set (array) {
                    builderResult.repeatedFixed64 = array
                }
            }
            @discardableResult
            public func setRepeatedFixed64(_ value:Array<UInt64>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedFixed64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedFixed64() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedFixed64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedSfixed32:Array<Int32> {
                get {
                    return builderResult.repeatedSfixed32
                }
                set (array) {
                    builderResult.repeatedSfixed32 = array
                }
            }
            @discardableResult
            public func setRepeatedSfixed32(_ value:Array<Int32>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedSfixed32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSfixed32() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedSfixed32.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedSfixed64:Array<Int64> {
                get {
                    return builderResult.repeatedSfixed64
                }
                set (array) {
                    builderResult.repeatedSfixed64 = array
                }
            }
            @discardableResult
            public func setRepeatedSfixed64(_ value:Array<Int64>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedSfixed64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSfixed64() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedSfixed64.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedFloat:Array<Float> {
                get {
                    return builderResult.repeatedFloat
                }
                set (array) {
                    builderResult.repeatedFloat = array
                }
            }
            @discardableResult
            public func setRepeatedFloat(_ value:Array<Float>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedFloat = value
                return self
            }
            @discardableResult
            public func clearRepeatedFloat() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedFloat.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedDouble:Array<Double> {
                get {
                    return builderResult.repeatedDouble
                }
                set (array) {
                    builderResult.repeatedDouble = array
                }
            }
            @discardableResult
            public func setRepeatedDouble(_ value:Array<Double>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedDouble = value
                return self
            }
            @discardableResult
            public func clearRepeatedDouble() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedDouble.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedBool:Array<Bool> {
                get {
                    return builderResult.repeatedBool
                }
                set (array) {
                    builderResult.repeatedBool = array
                }
            }
            @discardableResult
            public func setRepeatedBool(_ value:Array<Bool>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedBool = value
                return self
            }
            @discardableResult
            public func clearRepeatedBool() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedBool.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedNestedEnum:Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum> {
                get {
                    return builderResult.repeatedNestedEnum
                }
                set (value) {
                    builderResult.repeatedNestedEnum = value
                }
            }
            @discardableResult
            public func setRepeatedNestedEnum(_ value:Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum>) -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                self.repeatedNestedEnum = value
                return self
            }
            @discardableResult
            public func clearRepeatedNestedEnum() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult.repeatedNestedEnum.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                builderResult = Proto3ArenaUnittest.TestUnpackedTypes()
                return self
            }
            override public func clone() throws -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                return try Proto3ArenaUnittest.TestUnpackedTypes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Proto3ArenaUnittest.TestUnpackedTypes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Proto3ArenaUnittest.TestUnpackedTypes {
                let returnMe:Proto3ArenaUnittest.TestUnpackedTypes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Proto3ArenaUnittest.TestUnpackedTypes) throws -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                if other == Proto3ArenaUnittest.TestUnpackedTypes() {
                    return self
                }
                if !other.repeatedInt32.isEmpty {
                    builderResult.repeatedInt32 += other.repeatedInt32
                }
                if !other.repeatedInt64.isEmpty {
                    builderResult.repeatedInt64 += other.repeatedInt64
                }
                if !other.repeatedUint32.isEmpty {
                    builderResult.repeatedUint32 += other.repeatedUint32
                }
                if !other.repeatedUint64.isEmpty {
                    builderResult.repeatedUint64 += other.repeatedUint64
                }
                if !other.repeatedSint32.isEmpty {
                    builderResult.repeatedSint32 += other.repeatedSint32
                }
                if !other.repeatedSint64.isEmpty {
                    builderResult.repeatedSint64 += other.repeatedSint64
                }
                if !other.repeatedFixed32.isEmpty {
                    builderResult.repeatedFixed32 += other.repeatedFixed32
                }
                if !other.repeatedFixed64.isEmpty {
                    builderResult.repeatedFixed64 += other.repeatedFixed64
                }
                if !other.repeatedSfixed32.isEmpty {
                    builderResult.repeatedSfixed32 += other.repeatedSfixed32
                }
                if !other.repeatedSfixed64.isEmpty {
                    builderResult.repeatedSfixed64 += other.repeatedSfixed64
                }
                if !other.repeatedFloat.isEmpty {
                    builderResult.repeatedFloat += other.repeatedFloat
                }
                if !other.repeatedDouble.isEmpty {
                    builderResult.repeatedDouble += other.repeatedDouble
                }
                if !other.repeatedBool.isEmpty {
                    builderResult.repeatedBool += other.repeatedBool
                }
                if !other.repeatedNestedEnum.isEmpty {
                     builderResult.repeatedNestedEnum += other.repeatedNestedEnum
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                while (true) {
                    let protobufTag = try codedInputStream.readTag()
                    switch protobufTag {
                    case 0: 
                        self.unknownFields = try unknownFieldsBuilder.build()
                        return self

                    case 10:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedInt32.append(try codedInputStream.readInt32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 18:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedInt64.append(try codedInputStream.readInt64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 26:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedUint32.append(try codedInputStream.readUInt32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 34:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedUint64.append(try codedInputStream.readUInt64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 42:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedSint32.append(try codedInputStream.readSInt32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 50:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedSint64.append(try codedInputStream.readSInt64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 58:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedFixed32.append(try codedInputStream.readFixed32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 66:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedFixed64.append(try codedInputStream.readFixed64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 74:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedSfixed32.append(try codedInputStream.readSFixed32())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 82:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedSfixed64.append(try codedInputStream.readSFixed64())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 90:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedFloat.append(try codedInputStream.readFloat())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 98:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedDouble.append(try codedInputStream.readDouble())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 106:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let limit = try codedInputStream.pushLimit(byteLimit: length)
                        while (codedInputStream.bytesUntilLimit() > 0) {
                            builderResult.repeatedBool.append(try codedInputStream.readBool())
                        }
                        codedInputStream.popLimit(oldLimit: limit)

                    case 114:
                        let length = Int(try codedInputStream.readRawVarint32())
                        let oldLimit = try codedInputStream.pushLimit(byteLimit: length)
                        while codedInputStream.bytesUntilLimit() > 0 {
                        let valueIntrepeatedNestedEnum = try codedInputStream.readEnum()
                        if let enumsrepeatedNestedEnum = Proto3ArenaUnittest.TestAllTypes.NestedEnum(rawValue:valueIntrepeatedNestedEnum) {
                            builderResult.repeatedNestedEnum.append(enumsrepeatedNestedEnum)
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 14, value:Int64(valueIntrepeatedNestedEnum))
                        }
                        }
                        codedInputStream.popLimit(oldLimit: oldLimit)

                    default:
                        if (!(try parse(codedInputStream:codedInputStream, unknownFields:unknownFieldsBuilder, extensionRegistry:extensionRegistry, tag:protobufTag))) {
                            unknownFields = try unknownFieldsBuilder.build()
                            return self
                        }
                    }
                }
            }
            class override public func decodeToBuilder(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                let resultDecodedBuilder = Proto3ArenaUnittest.TestUnpackedTypes.Builder()
                if let jsonValueRepeatedInt32 = jsonMap["repeatedInt32"] as? Array<Int> {
                    var jsonArrayRepeatedInt32:Array<Int32> = []
                    for oneValueRepeatedInt32 in jsonValueRepeatedInt32 {
                        jsonArrayRepeatedInt32.append(Int32(oneValueRepeatedInt32))
                    }
                    resultDecodedBuilder.repeatedInt32 = jsonArrayRepeatedInt32
                }
                if let jsonValueRepeatedInt64 = jsonMap["repeatedInt64"] as? Array<String> {
                    var jsonArrayRepeatedInt64:Array<Int64> = []
                    for oneValueRepeatedInt64 in jsonValueRepeatedInt64 {
                        jsonArrayRepeatedInt64.append(Int64(oneValueRepeatedInt64)!)
                    }
                    resultDecodedBuilder.repeatedInt64 = jsonArrayRepeatedInt64
                }
                if let jsonValueRepeatedUint32 = jsonMap["repeatedUint32"] as? Array<UInt> {
                    var jsonArrayRepeatedUint32:Array<UInt32> = []
                    for oneValueRepeatedUint32 in jsonValueRepeatedUint32 {
                        jsonArrayRepeatedUint32.append(UInt32(oneValueRepeatedUint32))
                    }
                    resultDecodedBuilder.repeatedUint32 = jsonArrayRepeatedUint32
                }
                if let jsonValueRepeatedUint64 = jsonMap["repeatedUint64"] as? Array<String> {
                    var jsonArrayRepeatedUint64:Array<UInt64> = []
                    for oneValueRepeatedUint64 in jsonValueRepeatedUint64 {
                        jsonArrayRepeatedUint64.append(UInt64(oneValueRepeatedUint64)!)
                    }
                    resultDecodedBuilder.repeatedUint64 = jsonArrayRepeatedUint64
                }
                if let jsonValueRepeatedSint32 = jsonMap["repeatedSint32"] as? Array<Int> {
                    var jsonArrayRepeatedSint32:Array<Int32> = []
                    for oneValueRepeatedSint32 in jsonValueRepeatedSint32 {
                        jsonArrayRepeatedSint32.append(Int32(oneValueRepeatedSint32))
                    }
                    resultDecodedBuilder.repeatedSint32 = jsonArrayRepeatedSint32
                }
                if let jsonValueRepeatedSint64 = jsonMap["repeatedSint64"] as? Array<String> {
                    var jsonArrayRepeatedSint64:Array<Int64> = []
                    for oneValueRepeatedSint64 in jsonValueRepeatedSint64 {
                        jsonArrayRepeatedSint64.append(Int64(oneValueRepeatedSint64)!)
                    }
                    resultDecodedBuilder.repeatedSint64 = jsonArrayRepeatedSint64
                }
                if let jsonValueRepeatedFixed32 = jsonMap["repeatedFixed32"] as? Array<UInt> {
                    var jsonArrayRepeatedFixed32:Array<UInt32> = []
                    for oneValueRepeatedFixed32 in jsonValueRepeatedFixed32 {
                        jsonArrayRepeatedFixed32.append(UInt32(oneValueRepeatedFixed32))
                    }
                    resultDecodedBuilder.repeatedFixed32 = jsonArrayRepeatedFixed32
                }
                if let jsonValueRepeatedFixed64 = jsonMap["repeatedFixed64"] as? Array<String> {
                    var jsonArrayRepeatedFixed64:Array<UInt64> = []
                    for oneValueRepeatedFixed64 in jsonValueRepeatedFixed64 {
                        jsonArrayRepeatedFixed64.append(UInt64(oneValueRepeatedFixed64)!)
                    }
                    resultDecodedBuilder.repeatedFixed64 = jsonArrayRepeatedFixed64
                }
                if let jsonValueRepeatedSfixed32 = jsonMap["repeatedSfixed32"] as? Array<Int> {
                    var jsonArrayRepeatedSfixed32:Array<Int32> = []
                    for oneValueRepeatedSfixed32 in jsonValueRepeatedSfixed32 {
                        jsonArrayRepeatedSfixed32.append(Int32(oneValueRepeatedSfixed32))
                    }
                    resultDecodedBuilder.repeatedSfixed32 = jsonArrayRepeatedSfixed32
                }
                if let jsonValueRepeatedSfixed64 = jsonMap["repeatedSfixed64"] as? Array<String> {
                    var jsonArrayRepeatedSfixed64:Array<Int64> = []
                    for oneValueRepeatedSfixed64 in jsonValueRepeatedSfixed64 {
                        jsonArrayRepeatedSfixed64.append(Int64(oneValueRepeatedSfixed64)!)
                    }
                    resultDecodedBuilder.repeatedSfixed64 = jsonArrayRepeatedSfixed64
                }
                if let jsonValueRepeatedFloat = jsonMap["repeatedFloat"] as? Array<Float> {
                    var jsonArrayRepeatedFloat:Array<Float> = []
                    for oneValueRepeatedFloat in jsonValueRepeatedFloat {
                        jsonArrayRepeatedFloat.append(Float(oneValueRepeatedFloat))
                    }
                    resultDecodedBuilder.repeatedFloat = jsonArrayRepeatedFloat
                }
                if let jsonValueRepeatedDouble = jsonMap["repeatedDouble"] as? Array<Double> {
                    var jsonArrayRepeatedDouble:Array<Double> = []
                    for oneValueRepeatedDouble in jsonValueRepeatedDouble {
                        jsonArrayRepeatedDouble.append(Double(oneValueRepeatedDouble))
                    }
                    resultDecodedBuilder.repeatedDouble = jsonArrayRepeatedDouble
                }
                if let jsonValueRepeatedBool = jsonMap["repeatedBool"] as? Array<Bool> {
                    var jsonArrayRepeatedBool:Array<Bool> = []
                    for oneValueRepeatedBool in jsonValueRepeatedBool {
                        jsonArrayRepeatedBool.append(oneValueRepeatedBool)
                    }
                    resultDecodedBuilder.repeatedBool = jsonArrayRepeatedBool
                }
                if let jsonValueRepeatedNestedEnum = jsonMap["repeatedNestedEnum"] as? Array<String> {
                    var jsonArrayRepeatedNestedEnum:Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum> = []
                    for oneValueRepeatedNestedEnum in jsonValueRepeatedNestedEnum {
                        let enumFromStringRepeatedNestedEnum = try Proto3ArenaUnittest.TestAllTypes.NestedEnum.fromString(oneValueRepeatedNestedEnum)
                        jsonArrayRepeatedNestedEnum.append(enumFromStringRepeatedNestedEnum)
                    }
                    resultDecodedBuilder.repeatedNestedEnum = jsonArrayRepeatedNestedEnum
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestUnpackedTypes.Builder {
                let jsonData = try JSONSerialization.jsonObject(with:data, options: options)
                guard let jsDataCast = jsonData as? Dictionary<String,Any> else {
                  throw ProtocolBuffersError.invalidProtocolBuffer("Invalid JSON data")
                }
                return try Proto3ArenaUnittest.TestUnpackedTypes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// This proto includes a recusively nested message.
    final public class NestedTestAllTypes : GeneratedMessage {
        public typealias BuilderType = Proto3ArenaUnittest.NestedTestAllTypes.Builder

        public static func == (lhs: Proto3ArenaUnittest.NestedTestAllTypes, rhs: Proto3ArenaUnittest.NestedTestAllTypes) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasChild == rhs.hasChild) && (!lhs.hasChild || lhs.child == rhs.child)
            fieldCheck = fieldCheck && (lhs.hasPayload == rhs.hasPayload) && (!lhs.hasPayload || lhs.payload == rhs.payload)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var child:Proto3ArenaUnittest.NestedTestAllTypes!
        public fileprivate(set) var hasChild:Bool = false
        public fileprivate(set) var payload:Proto3ArenaUnittest.TestAllTypes!
        public fileprivate(set) var hasPayload:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasChild {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:child)
            }
            if hasPayload {
                try codedOutputStream.writeMessage(fieldNumber: 2, value:payload)
            }
            try unknownFields.writeTo(codedOutputStream: codedOutputStream)
        }
        override public func serializedSize() -> Int32 {
            var serialize_size:Int32 = memoizedSerializedSize
            if serialize_size != -1 {
             return serialize_size
            }

            serialize_size = 0
            if hasChild {
                if let varSizechild = child?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizechild
                }
            }
            if hasPayload {
                if let varSizepayload = payload?.computeMessageSize(fieldNumber: 2) {
                    serialize_size += varSizepayload
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
            return Proto3ArenaUnittest.NestedTestAllTypes.classBuilder() as! Proto3ArenaUnittest.NestedTestAllTypes.Builder
        }
        public func getBuilder() -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
            return classBuilder() as! Proto3ArenaUnittest.NestedTestAllTypes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.NestedTestAllTypes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.NestedTestAllTypes.Builder()
        }
        public func toBuilder() throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
            return try Proto3ArenaUnittest.NestedTestAllTypes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Proto3ArenaUnittest.NestedTestAllTypes) throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
            return try Proto3ArenaUnittest.NestedTestAllTypes.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasChild {
                jsonMap["child"] = try child.encode()
            }
            if hasPayload {
                jsonMap["payload"] = try payload.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.NestedTestAllTypes {
            return try Proto3ArenaUnittest.NestedTestAllTypes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.NestedTestAllTypes {
            return try Proto3ArenaUnittest.NestedTestAllTypes.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasChild {
                output += "\(indent) child {\n"
                if let outDescChild = child {
                    output += try outDescChild.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasPayload {
                output += "\(indent) payload {\n"
                if let outDescPayload = payload {
                    output += try outDescPayload.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasChild {
                    if let hashValuechild = child?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuechild
                    }
                }
                if hasPayload {
                    if let hashValuepayload = payload?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuepayload
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

        override public class func className() -> String {
            return "Proto3ArenaUnittest.NestedTestAllTypes"
        }
        override public func className() -> String {
            return "Proto3ArenaUnittest.NestedTestAllTypes"
        }
        //Meta information declaration end

        final public class Builder : GeneratedMessageBuilder {
            fileprivate var builderResult:Proto3ArenaUnittest.NestedTestAllTypes = Proto3ArenaUnittest.NestedTestAllTypes()
            public func getMessage() -> Proto3ArenaUnittest.NestedTestAllTypes {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            public var child:Proto3ArenaUnittest.NestedTestAllTypes! {
                get {
                    if childBuilder_ != nil {
                        builderResult.child = childBuilder_.getMessage()
                    }
                    return builderResult.child
                }
                set (value) {
                    builderResult.hasChild = value != nil
                    builderResult.child = value
                }
            }
            public var hasChild:Bool {
                get {
                    return builderResult.hasChild
                }
            }
            fileprivate var childBuilder_:Proto3ArenaUnittest.NestedTestAllTypes.Builder! {
                didSet {
                    builderResult.hasChild = true
                }
            }
            public func getChildBuilder() -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                if childBuilder_ == nil {
                    childBuilder_ = Proto3ArenaUnittest.NestedTestAllTypes.Builder()
                    builderResult.child = childBuilder_.getMessage()
                    if child != nil {
                        try! childBuilder_.mergeFrom(other: child)
                    }
                }
                return childBuilder_
            }
            @discardableResult
            public func setChild(_ value:Proto3ArenaUnittest.NestedTestAllTypes!) -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                self.child = value
                return self
            }
            @discardableResult
            public func mergeChild(value:Proto3ArenaUnittest.NestedTestAllTypes) throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                if builderResult.hasChild {
                    builderResult.child = try Proto3ArenaUnittest.NestedTestAllTypes.builderWithPrototype(prototype:builderResult.child).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.child = value
                }
                builderResult.hasChild = true
                return self
            }
            @discardableResult
            public func clearChild() -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                childBuilder_ = nil
                builderResult.hasChild = false
                builderResult.child = nil
                return self
            }
            public var payload:Proto3ArenaUnittest.TestAllTypes! {
                get {
                    if payloadBuilder_ != nil {
                        builderResult.payload = payloadBuilder_.getMessage()
                    }
                    return builderResult.payload
                }
                set (value) {
                    builderResult.hasPayload = value != nil
                    builderResult.payload = value
                }
            }
            public var hasPayload:Bool {
                get {
                    return builderResult.hasPayload
                }
            }
            fileprivate var payloadBuilder_:Proto3ArenaUnittest.TestAllTypes.Builder! {
                didSet {
                    builderResult.hasPayload = true
                }
            }
            public func getPayloadBuilder() -> Proto3ArenaUnittest.TestAllTypes.Builder {
                if payloadBuilder_ == nil {
                    payloadBuilder_ = Proto3ArenaUnittest.TestAllTypes.Builder()
                    builderResult.payload = payloadBuilder_.getMessage()
                    if payload != nil {
                        try! payloadBuilder_.mergeFrom(other: payload)
                    }
                }
                return payloadBuilder_
            }
            @discardableResult
            public func setPayload(_ value:Proto3ArenaUnittest.TestAllTypes!) -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                self.payload = value
                return self
            }
            @discardableResult
            public func mergePayload(value:Proto3ArenaUnittest.TestAllTypes) throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                if builderResult.hasPayload {
                    builderResult.payload = try Proto3ArenaUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.payload).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.payload = value
                }
                builderResult.hasPayload = true
                return self
            }
            @discardableResult
            public func clearPayload() -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                payloadBuilder_ = nil
                builderResult.hasPayload = false
                builderResult.payload = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                builderResult = Proto3ArenaUnittest.NestedTestAllTypes()
                return self
            }
            override public func clone() throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                return try Proto3ArenaUnittest.NestedTestAllTypes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Proto3ArenaUnittest.NestedTestAllTypes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Proto3ArenaUnittest.NestedTestAllTypes {
                let returnMe:Proto3ArenaUnittest.NestedTestAllTypes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Proto3ArenaUnittest.NestedTestAllTypes) throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                if other == Proto3ArenaUnittest.NestedTestAllTypes() {
                    return self
                }
                if (other.hasChild) {
                    try mergeChild(value: other.child)
                }
                if (other.hasPayload) {
                    try mergePayload(value: other.payload)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                while (true) {
                    let protobufTag = try codedInputStream.readTag()
                    switch protobufTag {
                    case 0: 
                        self.unknownFields = try unknownFieldsBuilder.build()
                        return self

                    case 10:
                        let subBuilder:Proto3ArenaUnittest.NestedTestAllTypes.Builder = Proto3ArenaUnittest.NestedTestAllTypes.Builder()
                        if hasChild {
                            try subBuilder.mergeFrom(other: child)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        child = subBuilder.buildPartial()

                    case 18:
                        let subBuilder:Proto3ArenaUnittest.TestAllTypes.Builder = Proto3ArenaUnittest.TestAllTypes.Builder()
                        if hasPayload {
                            try subBuilder.mergeFrom(other: payload)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        payload = subBuilder.buildPartial()

                    default:
                        if (!(try parse(codedInputStream:codedInputStream, unknownFields:unknownFieldsBuilder, extensionRegistry:extensionRegistry, tag:protobufTag))) {
                            unknownFields = try unknownFieldsBuilder.build()
                            return self
                        }
                    }
                }
            }
            class override public func decodeToBuilder(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                let resultDecodedBuilder = Proto3ArenaUnittest.NestedTestAllTypes.Builder()
                if let jsonValueChild = jsonMap["child"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.child = try Proto3ArenaUnittest.NestedTestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueChild).build()

                }
                if let jsonValuePayload = jsonMap["payload"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.payload = try Proto3ArenaUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValuePayload).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.NestedTestAllTypes.Builder {
                let jsonData = try JSONSerialization.jsonObject(with:data, options: options)
                guard let jsDataCast = jsonData as? Dictionary<String,Any> else {
                  throw ProtocolBuffersError.invalidProtocolBuffer("Invalid JSON data")
                }
                return try Proto3ArenaUnittest.NestedTestAllTypes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Define these after TestAllTypes to make sure the compiler can handle
    /// that.
    final public class ForeignMessage : GeneratedMessage {
        public typealias BuilderType = Proto3ArenaUnittest.ForeignMessage.Builder

        public static func == (lhs: Proto3ArenaUnittest.ForeignMessage, rhs: Proto3ArenaUnittest.ForeignMessage) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasC == rhs.hasC) && (!lhs.hasC || lhs.c == rhs.c)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var c:Int32! = nil
        public fileprivate(set) var hasC:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasC {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:c)
            }
            try unknownFields.writeTo(codedOutputStream: codedOutputStream)
        }
        override public func serializedSize() -> Int32 {
            var serialize_size:Int32 = memoizedSerializedSize
            if serialize_size != -1 {
             return serialize_size
            }

            serialize_size = 0
            if hasC {
                serialize_size += c.computeInt32Size(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Proto3ArenaUnittest.ForeignMessage.Builder {
            return Proto3ArenaUnittest.ForeignMessage.classBuilder() as! Proto3ArenaUnittest.ForeignMessage.Builder
        }
        public func getBuilder() -> Proto3ArenaUnittest.ForeignMessage.Builder {
            return classBuilder() as! Proto3ArenaUnittest.ForeignMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.ForeignMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.ForeignMessage.Builder()
        }
        public func toBuilder() throws -> Proto3ArenaUnittest.ForeignMessage.Builder {
            return try Proto3ArenaUnittest.ForeignMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Proto3ArenaUnittest.ForeignMessage) throws -> Proto3ArenaUnittest.ForeignMessage.Builder {
            return try Proto3ArenaUnittest.ForeignMessage.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasC {
                jsonMap["c"] = Int(c)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.ForeignMessage {
            return try Proto3ArenaUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.ForeignMessage {
            return try Proto3ArenaUnittest.ForeignMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasC {
                output += "\(indent) c: \(String(describing: c)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasC {
                    hashCode = (hashCode &* 31) &+ c.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

        override public class func className() -> String {
            return "Proto3ArenaUnittest.ForeignMessage"
        }
        override public func className() -> String {
            return "Proto3ArenaUnittest.ForeignMessage"
        }
        //Meta information declaration end

        final public class Builder : GeneratedMessageBuilder {
            fileprivate var builderResult:Proto3ArenaUnittest.ForeignMessage = Proto3ArenaUnittest.ForeignMessage()
            public func getMessage() -> Proto3ArenaUnittest.ForeignMessage {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            public var c:Int32 {
                get {
                    return builderResult.c
                }
                set (value) {
                    builderResult.hasC = true
                    builderResult.c = value
                }
            }
            public var hasC:Bool {
                get {
                    return builderResult.hasC
                }
            }
            @discardableResult
            public func setC(_ value:Int32) -> Proto3ArenaUnittest.ForeignMessage.Builder {
                self.c = value
                return self
            }
            @discardableResult
            public func clearC() -> Proto3ArenaUnittest.ForeignMessage.Builder{
                builderResult.hasC = false
                builderResult.c = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Proto3ArenaUnittest.ForeignMessage.Builder {
                builderResult = Proto3ArenaUnittest.ForeignMessage()
                return self
            }
            override public func clone() throws -> Proto3ArenaUnittest.ForeignMessage.Builder {
                return try Proto3ArenaUnittest.ForeignMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Proto3ArenaUnittest.ForeignMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Proto3ArenaUnittest.ForeignMessage {
                let returnMe:Proto3ArenaUnittest.ForeignMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Proto3ArenaUnittest.ForeignMessage) throws -> Proto3ArenaUnittest.ForeignMessage.Builder {
                if other == Proto3ArenaUnittest.ForeignMessage() {
                    return self
                }
                if other.hasC {
                    c = other.c
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.ForeignMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.ForeignMessage.Builder {
                let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                while (true) {
                    let protobufTag = try codedInputStream.readTag()
                    switch protobufTag {
                    case 0: 
                        self.unknownFields = try unknownFieldsBuilder.build()
                        return self

                    case 8:
                        c = try codedInputStream.readInt32()

                    default:
                        if (!(try parse(codedInputStream:codedInputStream, unknownFields:unknownFieldsBuilder, extensionRegistry:extensionRegistry, tag:protobufTag))) {
                            unknownFields = try unknownFieldsBuilder.build()
                            return self
                        }
                    }
                }
            }
            class override public func decodeToBuilder(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.ForeignMessage.Builder {
                let resultDecodedBuilder = Proto3ArenaUnittest.ForeignMessage.Builder()
                if let jsonValueC = jsonMap["c"] as? Int {
                    resultDecodedBuilder.c = Int32(jsonValueC)
                } else if let jsonValueC = jsonMap["c"] as? String {
                    resultDecodedBuilder.c = Int32(jsonValueC)!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.ForeignMessage.Builder {
                let jsonData = try JSONSerialization.jsonObject(with:data, options: options)
                guard let jsDataCast = jsonData as? Dictionary<String,Any> else {
                  throw ProtocolBuffersError.invalidProtocolBuffer("Invalid JSON data")
                }
                return try Proto3ArenaUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// TestEmptyMessage is used to test behavior of unknown fields.
    final public class TestEmptyMessage : GeneratedMessage {
        public typealias BuilderType = Proto3ArenaUnittest.TestEmptyMessage.Builder

        public static func == (lhs: Proto3ArenaUnittest.TestEmptyMessage, rhs: Proto3ArenaUnittest.TestEmptyMessage) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            try unknownFields.writeTo(codedOutputStream: codedOutputStream)
        }
        override public func serializedSize() -> Int32 {
            var serialize_size:Int32 = memoizedSerializedSize
            if serialize_size != -1 {
             return serialize_size
            }

            serialize_size = 0
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
            return Proto3ArenaUnittest.TestEmptyMessage.classBuilder() as! Proto3ArenaUnittest.TestEmptyMessage.Builder
        }
        public func getBuilder() -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
            return classBuilder() as! Proto3ArenaUnittest.TestEmptyMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.TestEmptyMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Proto3ArenaUnittest.TestEmptyMessage.Builder()
        }
        public func toBuilder() throws -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
            return try Proto3ArenaUnittest.TestEmptyMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Proto3ArenaUnittest.TestEmptyMessage) throws -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
            return try Proto3ArenaUnittest.TestEmptyMessage.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            let jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestEmptyMessage {
            return try Proto3ArenaUnittest.TestEmptyMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestEmptyMessage {
            return try Proto3ArenaUnittest.TestEmptyMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

        override public class func className() -> String {
            return "Proto3ArenaUnittest.TestEmptyMessage"
        }
        override public func className() -> String {
            return "Proto3ArenaUnittest.TestEmptyMessage"
        }
        //Meta information declaration end

        final public class Builder : GeneratedMessageBuilder {
            fileprivate var builderResult:Proto3ArenaUnittest.TestEmptyMessage = Proto3ArenaUnittest.TestEmptyMessage()
            public func getMessage() -> Proto3ArenaUnittest.TestEmptyMessage {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
                builderResult = Proto3ArenaUnittest.TestEmptyMessage()
                return self
            }
            override public func clone() throws -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
                return try Proto3ArenaUnittest.TestEmptyMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Proto3ArenaUnittest.TestEmptyMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Proto3ArenaUnittest.TestEmptyMessage {
                let returnMe:Proto3ArenaUnittest.TestEmptyMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Proto3ArenaUnittest.TestEmptyMessage) throws -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
                if other == Proto3ArenaUnittest.TestEmptyMessage() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
                let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                while (true) {
                    let protobufTag = try codedInputStream.readTag()
                    switch protobufTag {
                    case 0: 
                        self.unknownFields = try unknownFieldsBuilder.build()
                        return self

                    default:
                        if (!(try parse(codedInputStream:codedInputStream, unknownFields:unknownFieldsBuilder, extensionRegistry:extensionRegistry, tag:protobufTag))) {
                            unknownFields = try unknownFieldsBuilder.build()
                            return self
                        }
                    }
                }
            }
            class override public func decodeToBuilder(jsonMap:Dictionary<String,Any>) throws -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
                let resultDecodedBuilder = Proto3ArenaUnittest.TestEmptyMessage.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Proto3ArenaUnittest.TestEmptyMessage.Builder {
                let jsonData = try JSONSerialization.jsonObject(with:data, options: options)
                guard let jsDataCast = jsonData as? Dictionary<String,Any> else {
                  throw ProtocolBuffersError.invalidProtocolBuffer("Invalid JSON data")
                }
                return try Proto3ArenaUnittest.TestEmptyMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

}
extension Proto3ArenaUnittest.TestAllTypes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Proto3ArenaUnittest.TestAllTypes> {
        var mergedArray = Array<Proto3ArenaUnittest.TestAllTypes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestAllTypes? {
        return try Proto3ArenaUnittest.TestAllTypes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Proto3ArenaUnittest.TestAllTypes {
        return try Proto3ArenaUnittest.TestAllTypes.Builder().mergeFrom(data: data, extensionRegistry:Proto3ArenaUnittest.UnittestProto3ArenaRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestAllTypes {
        return try Proto3ArenaUnittest.TestAllTypes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestAllTypes {
        return try Proto3ArenaUnittest.TestAllTypes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestAllTypes {
        return try Proto3ArenaUnittest.TestAllTypes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestAllTypes {
        return try Proto3ArenaUnittest.TestAllTypes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestAllTypes {
        return try Proto3ArenaUnittest.TestAllTypes.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "optionalInt32": return self.optionalInt32
        case "optionalInt64": return self.optionalInt64
        case "optionalUint32": return self.optionalUint32
        case "optionalUint64": return self.optionalUint64
        case "optionalSint32": return self.optionalSint32
        case "optionalSint64": return self.optionalSint64
        case "optionalFixed32": return self.optionalFixed32
        case "optionalFixed64": return self.optionalFixed64
        case "optionalSfixed32": return self.optionalSfixed32
        case "optionalSfixed64": return self.optionalSfixed64
        case "optionalFloat": return self.optionalFloat
        case "optionalDouble": return self.optionalDouble
        case "optionalBool": return self.optionalBool
        case "optionalString": return self.optionalString
        case "optionalBytes": return self.optionalBytes
        case "optionalNestedMessage": return self.optionalNestedMessage
        case "optionalForeignMessage": return self.optionalForeignMessage
        case "optionalImportMessage": return self.optionalImportMessage
        case "optionalNestedEnum": return self.optionalNestedEnum
        case "optionalForeignEnum": return self.optionalForeignEnum
        case "optionalStringPiece": return self.optionalStringPiece
        case "optionalCord": return self.optionalCord
        case "optionalPublicImportMessage": return self.optionalPublicImportMessage
        case "optionalLazyMessage": return self.optionalLazyMessage
        case "repeatedInt32": return self.repeatedInt32
        case "repeatedInt64": return self.repeatedInt64
        case "repeatedUint32": return self.repeatedUint32
        case "repeatedUint64": return self.repeatedUint64
        case "repeatedSint32": return self.repeatedSint32
        case "repeatedSint64": return self.repeatedSint64
        case "repeatedFixed32": return self.repeatedFixed32
        case "repeatedFixed64": return self.repeatedFixed64
        case "repeatedSfixed32": return self.repeatedSfixed32
        case "repeatedSfixed64": return self.repeatedSfixed64
        case "repeatedFloat": return self.repeatedFloat
        case "repeatedDouble": return self.repeatedDouble
        case "repeatedBool": return self.repeatedBool
        case "repeatedString": return self.repeatedString
        case "repeatedBytes": return self.repeatedBytes
        case "repeatedNestedMessage": return self.repeatedNestedMessage
        case "repeatedForeignMessage": return self.repeatedForeignMessage
        case "repeatedImportMessage": return self.repeatedImportMessage
        case "repeatedNestedEnum": return self.repeatedNestedEnum
        case "repeatedForeignEnum": return self.repeatedForeignEnum
        case "repeatedStringPiece": return self.repeatedStringPiece
        case "repeatedCord": return self.repeatedCord
        case "repeatedLazyMessage": return self.repeatedLazyMessage
        case "oneofUint32": return self.oneofUint32
        case "oneofNestedMessage": return self.oneofNestedMessage
        case "oneofString": return self.oneofString
        case "oneofBytes": return self.oneofBytes
        default: return nil
        }
    }
}
extension Proto3ArenaUnittest.TestAllTypes.NestedMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage> {
        var mergedArray = Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage? {
        return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
        return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:Proto3ArenaUnittest.UnittestProto3ArenaRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
        return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
        return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
        return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
        return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestAllTypes.NestedMessage {
        return try Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "bb": return self.bb
        default: return nil
        }
    }
}
extension Proto3ArenaUnittest.TestAllTypes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Proto3ArenaUnittest.TestAllTypes
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "optionalInt32": return self.optionalInt32
            case "optionalInt64": return self.optionalInt64
            case "optionalUint32": return self.optionalUint32
            case "optionalUint64": return self.optionalUint64
            case "optionalSint32": return self.optionalSint32
            case "optionalSint64": return self.optionalSint64
            case "optionalFixed32": return self.optionalFixed32
            case "optionalFixed64": return self.optionalFixed64
            case "optionalSfixed32": return self.optionalSfixed32
            case "optionalSfixed64": return self.optionalSfixed64
            case "optionalFloat": return self.optionalFloat
            case "optionalDouble": return self.optionalDouble
            case "optionalBool": return self.optionalBool
            case "optionalString": return self.optionalString
            case "optionalBytes": return self.optionalBytes
            case "optionalNestedMessage": return self.optionalNestedMessage
            case "optionalForeignMessage": return self.optionalForeignMessage
            case "optionalImportMessage": return self.optionalImportMessage
            case "optionalNestedEnum": return self.optionalNestedEnum
            case "optionalForeignEnum": return self.optionalForeignEnum
            case "optionalStringPiece": return self.optionalStringPiece
            case "optionalCord": return self.optionalCord
            case "optionalPublicImportMessage": return self.optionalPublicImportMessage
            case "optionalLazyMessage": return self.optionalLazyMessage
            case "repeatedInt32": return self.repeatedInt32
            case "repeatedInt64": return self.repeatedInt64
            case "repeatedUint32": return self.repeatedUint32
            case "repeatedUint64": return self.repeatedUint64
            case "repeatedSint32": return self.repeatedSint32
            case "repeatedSint64": return self.repeatedSint64
            case "repeatedFixed32": return self.repeatedFixed32
            case "repeatedFixed64": return self.repeatedFixed64
            case "repeatedSfixed32": return self.repeatedSfixed32
            case "repeatedSfixed64": return self.repeatedSfixed64
            case "repeatedFloat": return self.repeatedFloat
            case "repeatedDouble": return self.repeatedDouble
            case "repeatedBool": return self.repeatedBool
            case "repeatedString": return self.repeatedString
            case "repeatedBytes": return self.repeatedBytes
            case "repeatedNestedMessage": return self.repeatedNestedMessage
            case "repeatedForeignMessage": return self.repeatedForeignMessage
            case "repeatedImportMessage": return self.repeatedImportMessage
            case "repeatedNestedEnum": return self.repeatedNestedEnum
            case "repeatedForeignEnum": return self.repeatedForeignEnum
            case "repeatedStringPiece": return self.repeatedStringPiece
            case "repeatedCord": return self.repeatedCord
            case "repeatedLazyMessage": return self.repeatedLazyMessage
            case "oneofUint32": return self.oneofUint32
            case "oneofNestedMessage": return self.oneofNestedMessage
            case "oneofString": return self.oneofString
            case "oneofBytes": return self.oneofBytes
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "optionalInt32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.optionalInt32 = newSubscriptValue
            case "optionalInt64":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.optionalInt64 = newSubscriptValue
            case "optionalUint32":
                guard let newSubscriptValue = newSubscriptValue as? UInt32 else {
                    return
                }
                self.optionalUint32 = newSubscriptValue
            case "optionalUint64":
                guard let newSubscriptValue = newSubscriptValue as? UInt64 else {
                    return
                }
                self.optionalUint64 = newSubscriptValue
            case "optionalSint32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.optionalSint32 = newSubscriptValue
            case "optionalSint64":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.optionalSint64 = newSubscriptValue
            case "optionalFixed32":
                guard let newSubscriptValue = newSubscriptValue as? UInt32 else {
                    return
                }
                self.optionalFixed32 = newSubscriptValue
            case "optionalFixed64":
                guard let newSubscriptValue = newSubscriptValue as? UInt64 else {
                    return
                }
                self.optionalFixed64 = newSubscriptValue
            case "optionalSfixed32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.optionalSfixed32 = newSubscriptValue
            case "optionalSfixed64":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.optionalSfixed64 = newSubscriptValue
            case "optionalFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.optionalFloat = newSubscriptValue
            case "optionalDouble":
                guard let newSubscriptValue = newSubscriptValue as? Double else {
                    return
                }
                self.optionalDouble = newSubscriptValue
            case "optionalBool":
                guard let newSubscriptValue = newSubscriptValue as? Bool else {
                    return
                }
                self.optionalBool = newSubscriptValue
            case "optionalString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.optionalString = newSubscriptValue
            case "optionalBytes":
                guard let newSubscriptValue = newSubscriptValue as? Data else {
                    return
                }
                self.optionalBytes = newSubscriptValue
            case "optionalNestedMessage":
                guard let newSubscriptValue = newSubscriptValue as? Proto3ArenaUnittest.TestAllTypes.NestedMessage else {
                    return
                }
                self.optionalNestedMessage = newSubscriptValue
            case "optionalForeignMessage":
                guard let newSubscriptValue = newSubscriptValue as? Proto3ArenaUnittest.ForeignMessage else {
                    return
                }
                self.optionalForeignMessage = newSubscriptValue
            case "optionalImportMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittestImport.ImportMessage else {
                    return
                }
                self.optionalImportMessage = newSubscriptValue
            case "optionalNestedEnum":
                guard let newSubscriptValue = newSubscriptValue as? Proto3ArenaUnittest.TestAllTypes.NestedEnum else {
                    return
                }
                self.optionalNestedEnum = newSubscriptValue
            case "optionalForeignEnum":
                guard let newSubscriptValue = newSubscriptValue as? Proto3ArenaUnittest.ForeignEnum else {
                    return
                }
                self.optionalForeignEnum = newSubscriptValue
            case "optionalStringPiece":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.optionalStringPiece = newSubscriptValue
            case "optionalCord":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.optionalCord = newSubscriptValue
            case "optionalPublicImportMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittestImport.PublicImportMessage else {
                    return
                }
                self.optionalPublicImportMessage = newSubscriptValue
            case "optionalLazyMessage":
                guard let newSubscriptValue = newSubscriptValue as? Proto3ArenaUnittest.TestAllTypes.NestedMessage else {
                    return
                }
                self.optionalLazyMessage = newSubscriptValue
            case "repeatedInt32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.repeatedInt32 = newSubscriptValue
            case "repeatedInt64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.repeatedInt64 = newSubscriptValue
            case "repeatedUint32":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt32> else {
                    return
                }
                self.repeatedUint32 = newSubscriptValue
            case "repeatedUint64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.repeatedUint64 = newSubscriptValue
            case "repeatedSint32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.repeatedSint32 = newSubscriptValue
            case "repeatedSint64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.repeatedSint64 = newSubscriptValue
            case "repeatedFixed32":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt32> else {
                    return
                }
                self.repeatedFixed32 = newSubscriptValue
            case "repeatedFixed64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.repeatedFixed64 = newSubscriptValue
            case "repeatedSfixed32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.repeatedSfixed32 = newSubscriptValue
            case "repeatedSfixed64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.repeatedSfixed64 = newSubscriptValue
            case "repeatedFloat":
                guard let newSubscriptValue = newSubscriptValue as? Array<Float> else {
                    return
                }
                self.repeatedFloat = newSubscriptValue
            case "repeatedDouble":
                guard let newSubscriptValue = newSubscriptValue as? Array<Double> else {
                    return
                }
                self.repeatedDouble = newSubscriptValue
            case "repeatedBool":
                guard let newSubscriptValue = newSubscriptValue as? Array<Bool> else {
                    return
                }
                self.repeatedBool = newSubscriptValue
            case "repeatedString":
                guard let newSubscriptValue = newSubscriptValue as? Array<String> else {
                    return
                }
                self.repeatedString = newSubscriptValue
            case "repeatedBytes":
                guard let newSubscriptValue = newSubscriptValue as? Array<Data> else {
                    return
                }
                self.repeatedBytes = newSubscriptValue
            case "repeatedNestedMessage":
                guard let newSubscriptValue = newSubscriptValue as? Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage> else {
                    return
                }
                self.repeatedNestedMessage = newSubscriptValue
            case "repeatedForeignMessage":
                guard let newSubscriptValue = newSubscriptValue as? Array<Proto3ArenaUnittest.ForeignMessage> else {
                    return
                }
                self.repeatedForeignMessage = newSubscriptValue
            case "repeatedImportMessage":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittestImport.ImportMessage> else {
                    return
                }
                self.repeatedImportMessage = newSubscriptValue
            case "repeatedNestedEnum":
                guard let newSubscriptValue = newSubscriptValue as? Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum> else {
                    return
                }
                self.repeatedNestedEnum = newSubscriptValue
            case "repeatedForeignEnum":
                guard let newSubscriptValue = newSubscriptValue as? Array<Proto3ArenaUnittest.ForeignEnum> else {
                    return
                }
                self.repeatedForeignEnum = newSubscriptValue
            case "repeatedStringPiece":
                guard let newSubscriptValue = newSubscriptValue as? Array<String> else {
                    return
                }
                self.repeatedStringPiece = newSubscriptValue
            case "repeatedCord":
                guard let newSubscriptValue = newSubscriptValue as? Array<String> else {
                    return
                }
                self.repeatedCord = newSubscriptValue
            case "repeatedLazyMessage":
                guard let newSubscriptValue = newSubscriptValue as? Array<Proto3ArenaUnittest.TestAllTypes.NestedMessage> else {
                    return
                }
                self.repeatedLazyMessage = newSubscriptValue
            case "oneofUint32":
                guard let newSubscriptValue = newSubscriptValue as? UInt32 else {
                    return
                }
                self.oneofUint32 = newSubscriptValue
            case "oneofNestedMessage":
                guard let newSubscriptValue = newSubscriptValue as? Proto3ArenaUnittest.TestAllTypes.NestedMessage else {
                    return
                }
                self.oneofNestedMessage = newSubscriptValue
            case "oneofString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.oneofString = newSubscriptValue
            case "oneofBytes":
                guard let newSubscriptValue = newSubscriptValue as? Data else {
                    return
                }
                self.oneofBytes = newSubscriptValue
            default: return
            }
        }
    }
}
extension Proto3ArenaUnittest.TestAllTypes.NestedMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Proto3ArenaUnittest.TestAllTypes.NestedMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "bb": return self.bb
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "bb":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.bb = newSubscriptValue
            default: return
            }
        }
    }
}
extension Proto3ArenaUnittest.TestPackedTypes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Proto3ArenaUnittest.TestPackedTypes> {
        var mergedArray = Array<Proto3ArenaUnittest.TestPackedTypes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestPackedTypes? {
        return try Proto3ArenaUnittest.TestPackedTypes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Proto3ArenaUnittest.TestPackedTypes {
        return try Proto3ArenaUnittest.TestPackedTypes.Builder().mergeFrom(data: data, extensionRegistry:Proto3ArenaUnittest.UnittestProto3ArenaRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestPackedTypes {
        return try Proto3ArenaUnittest.TestPackedTypes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestPackedTypes {
        return try Proto3ArenaUnittest.TestPackedTypes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestPackedTypes {
        return try Proto3ArenaUnittest.TestPackedTypes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestPackedTypes {
        return try Proto3ArenaUnittest.TestPackedTypes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestPackedTypes {
        return try Proto3ArenaUnittest.TestPackedTypes.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "packedInt32": return self.packedInt32
        case "packedInt64": return self.packedInt64
        case "packedUint32": return self.packedUint32
        case "packedUint64": return self.packedUint64
        case "packedSint32": return self.packedSint32
        case "packedSint64": return self.packedSint64
        case "packedFixed32": return self.packedFixed32
        case "packedFixed64": return self.packedFixed64
        case "packedSfixed32": return self.packedSfixed32
        case "packedSfixed64": return self.packedSfixed64
        case "packedFloat": return self.packedFloat
        case "packedDouble": return self.packedDouble
        case "packedBool": return self.packedBool
        case "packedEnum": return self.packedEnum
        default: return nil
        }
    }
}
extension Proto3ArenaUnittest.TestPackedTypes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Proto3ArenaUnittest.TestPackedTypes
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "packedInt32": return self.packedInt32
            case "packedInt64": return self.packedInt64
            case "packedUint32": return self.packedUint32
            case "packedUint64": return self.packedUint64
            case "packedSint32": return self.packedSint32
            case "packedSint64": return self.packedSint64
            case "packedFixed32": return self.packedFixed32
            case "packedFixed64": return self.packedFixed64
            case "packedSfixed32": return self.packedSfixed32
            case "packedSfixed64": return self.packedSfixed64
            case "packedFloat": return self.packedFloat
            case "packedDouble": return self.packedDouble
            case "packedBool": return self.packedBool
            case "packedEnum": return self.packedEnum
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "packedInt32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.packedInt32 = newSubscriptValue
            case "packedInt64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.packedInt64 = newSubscriptValue
            case "packedUint32":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt32> else {
                    return
                }
                self.packedUint32 = newSubscriptValue
            case "packedUint64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.packedUint64 = newSubscriptValue
            case "packedSint32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.packedSint32 = newSubscriptValue
            case "packedSint64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.packedSint64 = newSubscriptValue
            case "packedFixed32":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt32> else {
                    return
                }
                self.packedFixed32 = newSubscriptValue
            case "packedFixed64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.packedFixed64 = newSubscriptValue
            case "packedSfixed32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.packedSfixed32 = newSubscriptValue
            case "packedSfixed64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.packedSfixed64 = newSubscriptValue
            case "packedFloat":
                guard let newSubscriptValue = newSubscriptValue as? Array<Float> else {
                    return
                }
                self.packedFloat = newSubscriptValue
            case "packedDouble":
                guard let newSubscriptValue = newSubscriptValue as? Array<Double> else {
                    return
                }
                self.packedDouble = newSubscriptValue
            case "packedBool":
                guard let newSubscriptValue = newSubscriptValue as? Array<Bool> else {
                    return
                }
                self.packedBool = newSubscriptValue
            case "packedEnum":
                guard let newSubscriptValue = newSubscriptValue as? Array<Proto3ArenaUnittest.ForeignEnum> else {
                    return
                }
                self.packedEnum = newSubscriptValue
            default: return
            }
        }
    }
}
extension Proto3ArenaUnittest.TestUnpackedTypes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Proto3ArenaUnittest.TestUnpackedTypes> {
        var mergedArray = Array<Proto3ArenaUnittest.TestUnpackedTypes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestUnpackedTypes? {
        return try Proto3ArenaUnittest.TestUnpackedTypes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Proto3ArenaUnittest.TestUnpackedTypes {
        return try Proto3ArenaUnittest.TestUnpackedTypes.Builder().mergeFrom(data: data, extensionRegistry:Proto3ArenaUnittest.UnittestProto3ArenaRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestUnpackedTypes {
        return try Proto3ArenaUnittest.TestUnpackedTypes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestUnpackedTypes {
        return try Proto3ArenaUnittest.TestUnpackedTypes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestUnpackedTypes {
        return try Proto3ArenaUnittest.TestUnpackedTypes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestUnpackedTypes {
        return try Proto3ArenaUnittest.TestUnpackedTypes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestUnpackedTypes {
        return try Proto3ArenaUnittest.TestUnpackedTypes.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "repeatedInt32": return self.repeatedInt32
        case "repeatedInt64": return self.repeatedInt64
        case "repeatedUint32": return self.repeatedUint32
        case "repeatedUint64": return self.repeatedUint64
        case "repeatedSint32": return self.repeatedSint32
        case "repeatedSint64": return self.repeatedSint64
        case "repeatedFixed32": return self.repeatedFixed32
        case "repeatedFixed64": return self.repeatedFixed64
        case "repeatedSfixed32": return self.repeatedSfixed32
        case "repeatedSfixed64": return self.repeatedSfixed64
        case "repeatedFloat": return self.repeatedFloat
        case "repeatedDouble": return self.repeatedDouble
        case "repeatedBool": return self.repeatedBool
        case "repeatedNestedEnum": return self.repeatedNestedEnum
        default: return nil
        }
    }
}
extension Proto3ArenaUnittest.TestUnpackedTypes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Proto3ArenaUnittest.TestUnpackedTypes
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "repeatedInt32": return self.repeatedInt32
            case "repeatedInt64": return self.repeatedInt64
            case "repeatedUint32": return self.repeatedUint32
            case "repeatedUint64": return self.repeatedUint64
            case "repeatedSint32": return self.repeatedSint32
            case "repeatedSint64": return self.repeatedSint64
            case "repeatedFixed32": return self.repeatedFixed32
            case "repeatedFixed64": return self.repeatedFixed64
            case "repeatedSfixed32": return self.repeatedSfixed32
            case "repeatedSfixed64": return self.repeatedSfixed64
            case "repeatedFloat": return self.repeatedFloat
            case "repeatedDouble": return self.repeatedDouble
            case "repeatedBool": return self.repeatedBool
            case "repeatedNestedEnum": return self.repeatedNestedEnum
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "repeatedInt32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.repeatedInt32 = newSubscriptValue
            case "repeatedInt64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.repeatedInt64 = newSubscriptValue
            case "repeatedUint32":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt32> else {
                    return
                }
                self.repeatedUint32 = newSubscriptValue
            case "repeatedUint64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.repeatedUint64 = newSubscriptValue
            case "repeatedSint32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.repeatedSint32 = newSubscriptValue
            case "repeatedSint64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.repeatedSint64 = newSubscriptValue
            case "repeatedFixed32":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt32> else {
                    return
                }
                self.repeatedFixed32 = newSubscriptValue
            case "repeatedFixed64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.repeatedFixed64 = newSubscriptValue
            case "repeatedSfixed32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.repeatedSfixed32 = newSubscriptValue
            case "repeatedSfixed64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.repeatedSfixed64 = newSubscriptValue
            case "repeatedFloat":
                guard let newSubscriptValue = newSubscriptValue as? Array<Float> else {
                    return
                }
                self.repeatedFloat = newSubscriptValue
            case "repeatedDouble":
                guard let newSubscriptValue = newSubscriptValue as? Array<Double> else {
                    return
                }
                self.repeatedDouble = newSubscriptValue
            case "repeatedBool":
                guard let newSubscriptValue = newSubscriptValue as? Array<Bool> else {
                    return
                }
                self.repeatedBool = newSubscriptValue
            case "repeatedNestedEnum":
                guard let newSubscriptValue = newSubscriptValue as? Array<Proto3ArenaUnittest.TestAllTypes.NestedEnum> else {
                    return
                }
                self.repeatedNestedEnum = newSubscriptValue
            default: return
            }
        }
    }
}
extension Proto3ArenaUnittest.NestedTestAllTypes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Proto3ArenaUnittest.NestedTestAllTypes> {
        var mergedArray = Array<Proto3ArenaUnittest.NestedTestAllTypes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.NestedTestAllTypes? {
        return try Proto3ArenaUnittest.NestedTestAllTypes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Proto3ArenaUnittest.NestedTestAllTypes {
        return try Proto3ArenaUnittest.NestedTestAllTypes.Builder().mergeFrom(data: data, extensionRegistry:Proto3ArenaUnittest.UnittestProto3ArenaRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.NestedTestAllTypes {
        return try Proto3ArenaUnittest.NestedTestAllTypes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.NestedTestAllTypes {
        return try Proto3ArenaUnittest.NestedTestAllTypes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.NestedTestAllTypes {
        return try Proto3ArenaUnittest.NestedTestAllTypes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.NestedTestAllTypes {
        return try Proto3ArenaUnittest.NestedTestAllTypes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.NestedTestAllTypes {
        return try Proto3ArenaUnittest.NestedTestAllTypes.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "child": return self.child
        case "payload": return self.payload
        default: return nil
        }
    }
}
extension Proto3ArenaUnittest.NestedTestAllTypes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Proto3ArenaUnittest.NestedTestAllTypes
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "child": return self.child
            case "payload": return self.payload
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "child":
                guard let newSubscriptValue = newSubscriptValue as? Proto3ArenaUnittest.NestedTestAllTypes else {
                    return
                }
                self.child = newSubscriptValue
            case "payload":
                guard let newSubscriptValue = newSubscriptValue as? Proto3ArenaUnittest.TestAllTypes else {
                    return
                }
                self.payload = newSubscriptValue
            default: return
            }
        }
    }
}
extension Proto3ArenaUnittest.ForeignMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Proto3ArenaUnittest.ForeignMessage> {
        var mergedArray = Array<Proto3ArenaUnittest.ForeignMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.ForeignMessage? {
        return try Proto3ArenaUnittest.ForeignMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Proto3ArenaUnittest.ForeignMessage {
        return try Proto3ArenaUnittest.ForeignMessage.Builder().mergeFrom(data: data, extensionRegistry:Proto3ArenaUnittest.UnittestProto3ArenaRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.ForeignMessage {
        return try Proto3ArenaUnittest.ForeignMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.ForeignMessage {
        return try Proto3ArenaUnittest.ForeignMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.ForeignMessage {
        return try Proto3ArenaUnittest.ForeignMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.ForeignMessage {
        return try Proto3ArenaUnittest.ForeignMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.ForeignMessage {
        return try Proto3ArenaUnittest.ForeignMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "c": return self.c
        default: return nil
        }
    }
}
extension Proto3ArenaUnittest.ForeignMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Proto3ArenaUnittest.ForeignMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "c": return self.c
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "c":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.c = newSubscriptValue
            default: return
            }
        }
    }
}
extension Proto3ArenaUnittest.TestEmptyMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Proto3ArenaUnittest.TestEmptyMessage> {
        var mergedArray = Array<Proto3ArenaUnittest.TestEmptyMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestEmptyMessage? {
        return try Proto3ArenaUnittest.TestEmptyMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Proto3ArenaUnittest.TestEmptyMessage {
        return try Proto3ArenaUnittest.TestEmptyMessage.Builder().mergeFrom(data: data, extensionRegistry:Proto3ArenaUnittest.UnittestProto3ArenaRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestEmptyMessage {
        return try Proto3ArenaUnittest.TestEmptyMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Proto3ArenaUnittest.TestEmptyMessage {
        return try Proto3ArenaUnittest.TestEmptyMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestEmptyMessage {
        return try Proto3ArenaUnittest.TestEmptyMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Proto3ArenaUnittest.TestEmptyMessage {
        return try Proto3ArenaUnittest.TestEmptyMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Proto3ArenaUnittest.TestEmptyMessage {
        return try Proto3ArenaUnittest.TestEmptyMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension Proto3ArenaUnittest.TestEmptyMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Proto3ArenaUnittest.TestEmptyMessage
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}

// @@protoc_insertion_point(global_scope)
