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

import Foundation
import ProtocolBuffers


public struct ProtobufUnittest { }

/// Singular
public var UnittestRootoptionalInt32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalInt32ExtensionStatic
    }
}
public var UnittestRootoptionalInt64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalInt64ExtensionStatic
    }
}
public var UnittestRootoptionalUint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalUint32ExtensionStatic
    }
}
public var UnittestRootoptionalUint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalUint64ExtensionStatic
    }
}
public var UnittestRootoptionalSint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalSint32ExtensionStatic
    }
}
public var UnittestRootoptionalSint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalSint64ExtensionStatic
    }
}
public var UnittestRootoptionalFixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalFixed32ExtensionStatic
    }
}
public var UnittestRootoptionalFixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalFixed64ExtensionStatic
    }
}
public var UnittestRootoptionalSfixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalSfixed32ExtensionStatic
    }
}
public var UnittestRootoptionalSfixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalSfixed64ExtensionStatic
    }
}
public var UnittestRootoptionalFloatExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalFloatExtensionStatic
    }
}
public var UnittestRootoptionalDoubleExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalDoubleExtensionStatic
    }
}
public var UnittestRootoptionalBoolExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalBoolExtensionStatic
    }
}
public var UnittestRootoptionalStringExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalStringExtensionStatic
    }
}
public var UnittestRootoptionalBytesExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalBytesExtensionStatic
    }
}
public var UnittestRootoptionalGroupExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalGroupExtensionStatic
    }
}
public var UnittestRootoptionalNestedMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalNestedMessageExtensionStatic
    }
}
public var UnittestRootoptionalForeignMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalForeignMessageExtensionStatic
    }
}
public var UnittestRootoptionalImportMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalImportMessageExtensionStatic
    }
}
public var UnittestRootoptionalNestedEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalNestedEnumExtensionStatic
    }
}
public var UnittestRootoptionalForeignEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalForeignEnumExtensionStatic
    }
}
public var UnittestRootoptionalImportEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalImportEnumExtensionStatic
    }
}
public var UnittestRootoptionalStringPieceExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalStringPieceExtensionStatic
    }
}
public var UnittestRootoptionalCordExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalCordExtensionStatic
    }
}
public var UnittestRootoptionalPublicImportMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalPublicImportMessageExtensionStatic
    }
}
public var UnittestRootoptionalLazyMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoptionalLazyMessageExtensionStatic
    }
}
/// Repeated
public var UnittestRootrepeatedInt32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedInt32ExtensionStatic
    }
}
public var UnittestRootrepeatedInt64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedInt64ExtensionStatic
    }
}
public var UnittestRootrepeatedUint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedUint32ExtensionStatic
    }
}
public var UnittestRootrepeatedUint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedUint64ExtensionStatic
    }
}
public var UnittestRootrepeatedSint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedSint32ExtensionStatic
    }
}
public var UnittestRootrepeatedSint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedSint64ExtensionStatic
    }
}
public var UnittestRootrepeatedFixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedFixed32ExtensionStatic
    }
}
public var UnittestRootrepeatedFixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedFixed64ExtensionStatic
    }
}
public var UnittestRootrepeatedSfixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedSfixed32ExtensionStatic
    }
}
public var UnittestRootrepeatedSfixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedSfixed64ExtensionStatic
    }
}
public var UnittestRootrepeatedFloatExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedFloatExtensionStatic
    }
}
public var UnittestRootrepeatedDoubleExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedDoubleExtensionStatic
    }
}
public var UnittestRootrepeatedBoolExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedBoolExtensionStatic
    }
}
public var UnittestRootrepeatedStringExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedStringExtensionStatic
    }
}
public var UnittestRootrepeatedBytesExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedBytesExtensionStatic
    }
}
public var UnittestRootrepeatedGroupExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedGroupExtensionStatic
    }
}
public var UnittestRootrepeatedNestedMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedNestedMessageExtensionStatic
    }
}
public var UnittestRootrepeatedForeignMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedForeignMessageExtensionStatic
    }
}
public var UnittestRootrepeatedImportMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedImportMessageExtensionStatic
    }
}
public var UnittestRootrepeatedNestedEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedNestedEnumExtensionStatic
    }
}
public var UnittestRootrepeatedForeignEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedForeignEnumExtensionStatic
    }
}
public var UnittestRootrepeatedImportEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedImportEnumExtensionStatic
    }
}
public var UnittestRootrepeatedStringPieceExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedStringPieceExtensionStatic
    }
}
public var UnittestRootrepeatedCordExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedCordExtensionStatic
    }
}
public var UnittestRootrepeatedLazyMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootrepeatedLazyMessageExtensionStatic
    }
}
/// Singular with defaults
public var UnittestRootdefaultInt32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultInt32ExtensionStatic
    }
}
public var UnittestRootdefaultInt64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultInt64ExtensionStatic
    }
}
public var UnittestRootdefaultUint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultUint32ExtensionStatic
    }
}
public var UnittestRootdefaultUint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultUint64ExtensionStatic
    }
}
public var UnittestRootdefaultSint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultSint32ExtensionStatic
    }
}
public var UnittestRootdefaultSint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultSint64ExtensionStatic
    }
}
public var UnittestRootdefaultFixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultFixed32ExtensionStatic
    }
}
public var UnittestRootdefaultFixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultFixed64ExtensionStatic
    }
}
public var UnittestRootdefaultSfixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultSfixed32ExtensionStatic
    }
}
public var UnittestRootdefaultSfixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultSfixed64ExtensionStatic
    }
}
public var UnittestRootdefaultFloatExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultFloatExtensionStatic
    }
}
public var UnittestRootdefaultDoubleExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultDoubleExtensionStatic
    }
}
public var UnittestRootdefaultBoolExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultBoolExtensionStatic
    }
}
public var UnittestRootdefaultStringExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultStringExtensionStatic
    }
}
public var UnittestRootdefaultBytesExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultBytesExtensionStatic
    }
}
public var UnittestRootdefaultNestedEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultNestedEnumExtensionStatic
    }
}
public var UnittestRootdefaultForeignEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultForeignEnumExtensionStatic
    }
}
public var UnittestRootdefaultImportEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultImportEnumExtensionStatic
    }
}
public var UnittestRootdefaultStringPieceExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultStringPieceExtensionStatic
    }
}
public var UnittestRootdefaultCordExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootdefaultCordExtensionStatic
    }
}
/// For oneof test
public var UnittestRootoneofUint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoneofUint32ExtensionStatic
    }
}
public var UnittestRootoneofNestedMessageExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoneofNestedMessageExtensionStatic
    }
}
public var UnittestRootoneofStringExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoneofStringExtensionStatic
    }
}
public var UnittestRootoneofBytesExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootoneofBytesExtensionStatic
    }
}
public var UnittestRootmyExtensionString:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootmyExtensionStringStatic
    }
}
public var UnittestRootmyExtensionInt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootmyExtensionIntStatic
    }
}
public var UnittestRootpackedInt32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedInt32ExtensionStatic
    }
}
public var UnittestRootpackedInt64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedInt64ExtensionStatic
    }
}
public var UnittestRootpackedUint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedUint32ExtensionStatic
    }
}
public var UnittestRootpackedUint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedUint64ExtensionStatic
    }
}
public var UnittestRootpackedSint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedSint32ExtensionStatic
    }
}
public var UnittestRootpackedSint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedSint64ExtensionStatic
    }
}
public var UnittestRootpackedFixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedFixed32ExtensionStatic
    }
}
public var UnittestRootpackedFixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedFixed64ExtensionStatic
    }
}
public var UnittestRootpackedSfixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedSfixed32ExtensionStatic
    }
}
public var UnittestRootpackedSfixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedSfixed64ExtensionStatic
    }
}
public var UnittestRootpackedFloatExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedFloatExtensionStatic
    }
}
public var UnittestRootpackedDoubleExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedDoubleExtensionStatic
    }
}
public var UnittestRootpackedBoolExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedBoolExtensionStatic
    }
}
public var UnittestRootpackedEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootpackedEnumExtensionStatic
    }
}
public var UnittestRootunpackedInt32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedInt32ExtensionStatic
    }
}
public var UnittestRootunpackedInt64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedInt64ExtensionStatic
    }
}
public var UnittestRootunpackedUint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedUint32ExtensionStatic
    }
}
public var UnittestRootunpackedUint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedUint64ExtensionStatic
    }
}
public var UnittestRootunpackedSint32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedSint32ExtensionStatic
    }
}
public var UnittestRootunpackedSint64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedSint64ExtensionStatic
    }
}
public var UnittestRootunpackedFixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedFixed32ExtensionStatic
    }
}
public var UnittestRootunpackedFixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedFixed64ExtensionStatic
    }
}
public var UnittestRootunpackedSfixed32Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedSfixed32ExtensionStatic
    }
}
public var UnittestRootunpackedSfixed64Extension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedSfixed64ExtensionStatic
    }
}
public var UnittestRootunpackedFloatExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedFloatExtensionStatic
    }
}
public var UnittestRootunpackedDoubleExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedDoubleExtensionStatic
    }
}
public var UnittestRootunpackedBoolExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedBoolExtensionStatic
    }
}
public var UnittestRootunpackedEnumExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.UnittestRootunpackedEnumExtensionStatic
    }
}
/// Check for bug where string extensions declared in tested scope did not
/// compile.
public var TestNestedExtensiontest:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.TestNestedExtensiontestStatic
    }
}
/// Used to test if generated extension name is correct when there are
/// underscores.
public var TestNestedExtensionnestedStringExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.TestNestedExtensionnestedStringExtensionStatic
    }
}
public var TestRequiredsingle:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.TestRequiredsingleStatic
    }
}
public var TestRequiredmulti:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.TestRequiredmultiStatic
    }
}
public var TestParsingMergeoptionalExt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.TestParsingMergeoptionalExtStatic
    }
}
public var TestParsingMergerepeatedExt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestRoot.default.TestParsingMergerepeatedExtStatic
    }
}
public extension ProtobufUnittest {
    public struct UnittestRoot {
        public static let `default` = UnittestRoot()
        var UnittestRootoptionalInt32ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalInt64ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalUint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalUint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalSint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalSint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalFixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalFixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalSfixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalSfixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalFloatExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalDoubleExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalBoolExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalStringExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalBytesExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalGroupExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalNestedMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalForeignMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalImportMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalNestedEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalForeignEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalImportEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalStringPieceExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalCordExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalPublicImportMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootoptionalLazyMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedInt32ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedInt64ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedUint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedUint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedSint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedSint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedFixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedFixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedSfixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedSfixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedFloatExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedDoubleExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedBoolExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedStringExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedBytesExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedGroupExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedNestedMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedForeignMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedImportMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedNestedEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedForeignEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedImportEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedStringPieceExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedCordExtensionStatic:ConcreateExtensionField
        var UnittestRootrepeatedLazyMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultInt32ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultInt64ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultUint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultUint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultSint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultSint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultFixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultFixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultSfixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultSfixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultFloatExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultDoubleExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultBoolExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultStringExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultBytesExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultNestedEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultForeignEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultImportEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultStringPieceExtensionStatic:ConcreateExtensionField
        var UnittestRootdefaultCordExtensionStatic:ConcreateExtensionField
        var UnittestRootoneofUint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootoneofNestedMessageExtensionStatic:ConcreateExtensionField
        var UnittestRootoneofStringExtensionStatic:ConcreateExtensionField
        var UnittestRootoneofBytesExtensionStatic:ConcreateExtensionField
        var UnittestRootmyExtensionStringStatic:ConcreateExtensionField
        var UnittestRootmyExtensionIntStatic:ConcreateExtensionField
        var UnittestRootpackedInt32ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedInt64ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedUint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedUint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedSint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedSint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedFixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedFixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedSfixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedSfixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedFloatExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedDoubleExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedBoolExtensionStatic:ConcreateExtensionField
        var UnittestRootpackedEnumExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedInt32ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedInt64ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedUint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedUint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedSint32ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedSint64ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedFixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedFixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedSfixed32ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedSfixed64ExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedFloatExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedDoubleExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedBoolExtensionStatic:ConcreateExtensionField
        var UnittestRootunpackedEnumExtensionStatic:ConcreateExtensionField
        var TestNestedExtensiontestStatic:ConcreateExtensionField
        var TestNestedExtensionnestedStringExtensionStatic:ConcreateExtensionField
        var TestRequiredsingleStatic:ConcreateExtensionField
        var TestRequiredmultiStatic:ConcreateExtensionField
        var TestParsingMergeoptionalExtStatic:ConcreateExtensionField
        var TestParsingMergerepeatedExtStatic:ConcreateExtensionField
        public var extensionRegistry:ExtensionRegistry

        init() {
            UnittestRootoptionalInt32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 1, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalInt64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 2, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalUint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 3, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalUint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 4, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalSint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 5, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalSint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 6, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalFixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 7, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalFixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 8, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalSfixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 9, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalSfixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 10, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalFloatExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFloat, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 11, defaultValue:nil, messageOrGroupClass:Float.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalDoubleExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeDouble, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 12, defaultValue:nil, messageOrGroupClass:Double.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalBoolExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBool, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 13, defaultValue:nil, messageOrGroupClass:Bool.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalStringExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 14, defaultValue:nil, messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalBytesExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBytes, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 15, defaultValue:nil, messageOrGroupClass:Data.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalGroupExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeGroup, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 16, defaultValue:ProtobufUnittest.OptionalGroupExtension(), messageOrGroupClass:ProtobufUnittest.OptionalGroupExtension.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalNestedMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 18, defaultValue:ProtobufUnittest.TestAllTypes.NestedMessage(), messageOrGroupClass:ProtobufUnittest.TestAllTypes.NestedMessage.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalForeignMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 19, defaultValue:ProtobufUnittest.ForeignMessage(), messageOrGroupClass:ProtobufUnittest.ForeignMessage.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalImportMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 20, defaultValue:ProtobufUnittestImport.ImportMessage(), messageOrGroupClass:ProtobufUnittestImport.ImportMessage.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalNestedEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 21, defaultValue:ProtobufUnittest.TestAllTypes.NestedEnum.foo.rawValue, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalForeignEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 22, defaultValue:ProtobufUnittest.ForeignEnum.foreignFoo.rawValue, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalImportEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 23, defaultValue:ProtobufUnittestImport.ImportEnum.importFoo.rawValue, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalStringPieceExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 24, defaultValue:nil, messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalCordExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 25, defaultValue:nil, messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalPublicImportMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 26, defaultValue:ProtobufUnittestImport.PublicImportMessage(), messageOrGroupClass:ProtobufUnittestImport.PublicImportMessage.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoptionalLazyMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 27, defaultValue:ProtobufUnittest.TestAllTypes.NestedMessage(), messageOrGroupClass:ProtobufUnittest.TestAllTypes.NestedMessage.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedInt32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 31, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedInt64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 32, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedUint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 33, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedUint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 34, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedSint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 35, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedSint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 36, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedFixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 37, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedFixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 38, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedSfixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 39, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedSfixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 40, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedFloatExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFloat, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 41, defaultValue:Array<Float>(), messageOrGroupClass:Float.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedDoubleExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeDouble, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 42, defaultValue:Array<Double>(), messageOrGroupClass:Double.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedBoolExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBool, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 43, defaultValue:Array<Bool>(), messageOrGroupClass:Bool.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedStringExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 44, defaultValue:Array<String>(), messageOrGroupClass:String.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedBytesExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBytes, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 45, defaultValue:Array<Data>(), messageOrGroupClass:Data.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedGroupExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeGroup, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 46, defaultValue:Array<GeneratedMessage>(), messageOrGroupClass:ProtobufUnittest.RepeatedGroupExtension.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedNestedMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 48, defaultValue:Array<GeneratedMessage>(), messageOrGroupClass:ProtobufUnittest.TestAllTypes.NestedMessage.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedForeignMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 49, defaultValue:Array<GeneratedMessage>(), messageOrGroupClass:ProtobufUnittest.ForeignMessage.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedImportMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 50, defaultValue:Array<GeneratedMessage>(), messageOrGroupClass:ProtobufUnittestImport.ImportMessage.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedNestedEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 51, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedForeignEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 52, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedImportEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 53, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedStringPieceExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 54, defaultValue:Array<String>(), messageOrGroupClass:String.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedCordExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 55, defaultValue:Array<String>(), messageOrGroupClass:String.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootrepeatedLazyMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 57, defaultValue:Array<GeneratedMessage>(), messageOrGroupClass:ProtobufUnittest.TestAllTypes.NestedMessage.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultInt32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 61, defaultValue:Int32(41), messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultInt64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 62, defaultValue:Int64(42), messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultUint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 63, defaultValue:UInt32(43), messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultUint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 64, defaultValue:UInt64(44), messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultSint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 65, defaultValue:Int32(-45), messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultSint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 66, defaultValue:Int64(46), messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultFixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 67, defaultValue:UInt32(47), messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultFixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 68, defaultValue:UInt64(48), messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultSfixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 69, defaultValue:Int32(49), messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultSfixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed64, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 70, defaultValue:Int64(-50), messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultFloatExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFloat, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 71, defaultValue:Float(51.5), messageOrGroupClass:Float.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultDoubleExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeDouble, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 72, defaultValue:Double(52000), messageOrGroupClass:Double.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultBoolExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBool, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 73, defaultValue:true, messageOrGroupClass:Bool.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultStringExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 74, defaultValue:"hello", messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultBytesExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBytes, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 75, defaultValue:Data(bytes:([UInt8]() + "world".utf8), count:5), messageOrGroupClass:Data.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultNestedEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 81, defaultValue:ProtobufUnittest.TestAllTypes.NestedEnum.bar.rawValue, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultForeignEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 82, defaultValue:ProtobufUnittest.ForeignEnum.foreignBar.rawValue, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultImportEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 83, defaultValue:ProtobufUnittestImport.ImportEnum.importBar.rawValue, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultStringPieceExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 84, defaultValue:"abc", messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootdefaultCordExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 85, defaultValue:"123", messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoneofUint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt32, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 111, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoneofNestedMessageExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 112, defaultValue:ProtobufUnittest.TestAllTypes.NestedMessage(), messageOrGroupClass:ProtobufUnittest.TestAllTypes.NestedMessage.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoneofStringExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 113, defaultValue:nil, messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootoneofBytesExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBytes, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 114, defaultValue:nil, messageOrGroupClass:Data.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootmyExtensionStringStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestFieldOrderings.self, fieldNumber: 50, defaultValue:nil, messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootmyExtensionIntStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:ProtobufUnittest.TestFieldOrderings.self, fieldNumber: 5, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootpackedInt32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 90, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedInt64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt64, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 91, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedUint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt32, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 92, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedUint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt64, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 93, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedSint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt32, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 94, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedSint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt64, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 95, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedFixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed32, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 96, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedFixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed64, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 97, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedSfixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed32, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 98, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedSfixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed64, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 99, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedFloatExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFloat, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 100, defaultValue:Array<Float>(), messageOrGroupClass:Float.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedDoubleExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeDouble, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 101, defaultValue:Array<Double>(), messageOrGroupClass:Double.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedBoolExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBool, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 102, defaultValue:Array<Bool>(), messageOrGroupClass:Bool.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootpackedEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestPackedExtensions.self, fieldNumber: 103, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:true, isMessageSetWireFormat:false)
            UnittestRootunpackedInt32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 90, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedInt64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt64, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 91, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedUint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt32, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 92, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedUint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt64, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 93, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedSint32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt32, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 94, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedSint64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt64, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 95, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedFixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed32, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 96, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedFixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed64, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 97, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedSfixed32ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed32, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 98, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedSfixed64ExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed64, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 99, defaultValue:Array<Int64>(), messageOrGroupClass:Int64.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedFloatExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFloat, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 100, defaultValue:Array<Float>(), messageOrGroupClass:Float.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedDoubleExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeDouble, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 101, defaultValue:Array<Double>(), messageOrGroupClass:Double.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedBoolExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBool, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 102, defaultValue:Array<Bool>(), messageOrGroupClass:Bool.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            UnittestRootunpackedEnumExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:ProtobufUnittest.TestUnpackedExtensions.self, fieldNumber: 103, defaultValue:Array<Int32>(), messageOrGroupClass:Int32.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            TestNestedExtensiontestStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 1002, defaultValue:"test", messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            TestNestedExtensionnestedStringExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 1003, defaultValue:nil, messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            TestRequiredsingleStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 1000, defaultValue:ProtobufUnittest.TestRequired(), messageOrGroupClass:ProtobufUnittest.TestRequired.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            TestRequiredmultiStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestAllExtensions.self, fieldNumber: 1001, defaultValue:Array<GeneratedMessage>(), messageOrGroupClass:ProtobufUnittest.TestRequired.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            TestParsingMergeoptionalExtStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestParsingMerge.self, fieldNumber: 1000, defaultValue:ProtobufUnittest.TestAllTypes(), messageOrGroupClass:ProtobufUnittest.TestAllTypes.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            TestParsingMergerepeatedExtStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.TestParsingMerge.self, fieldNumber: 1001, defaultValue:Array<GeneratedMessage>(), messageOrGroupClass:ProtobufUnittest.TestAllTypes.self, isRepeated:true, isPacked:false, isMessageSetWireFormat:false)
            extensionRegistry = ExtensionRegistry()
            registerAllExtensions(registry: extensionRegistry)
            ProtobufUnittestImport.UnittestImportRoot.default.registerAllExtensions(registry: extensionRegistry)
        }
        public func registerAllExtensions(registry: ExtensionRegistry) {
            registry.addExtension(extensions: UnittestRootoptionalInt32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalInt64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalUint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalUint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalSint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalSint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalFixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalFixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalSfixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalSfixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalFloatExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalDoubleExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalBoolExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalStringExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalBytesExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalGroupExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalNestedMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalForeignMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalImportMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalNestedEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalForeignEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalImportEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalStringPieceExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalCordExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalPublicImportMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootoptionalLazyMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedInt32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedInt64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedUint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedUint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedSint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedSint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedFixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedFixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedSfixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedSfixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedFloatExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedDoubleExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedBoolExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedStringExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedBytesExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedGroupExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedNestedMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedForeignMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedImportMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedNestedEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedForeignEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedImportEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedStringPieceExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedCordExtensionStatic)
            registry.addExtension(extensions: UnittestRootrepeatedLazyMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultInt32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultInt64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultUint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultUint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultSint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultSint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultFixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultFixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultSfixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultSfixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultFloatExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultDoubleExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultBoolExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultStringExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultBytesExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultNestedEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultForeignEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultImportEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultStringPieceExtensionStatic)
            registry.addExtension(extensions: UnittestRootdefaultCordExtensionStatic)
            registry.addExtension(extensions: UnittestRootoneofUint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootoneofNestedMessageExtensionStatic)
            registry.addExtension(extensions: UnittestRootoneofStringExtensionStatic)
            registry.addExtension(extensions: UnittestRootoneofBytesExtensionStatic)
            registry.addExtension(extensions: UnittestRootmyExtensionStringStatic)
            registry.addExtension(extensions: UnittestRootmyExtensionIntStatic)
            registry.addExtension(extensions: UnittestRootpackedInt32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedInt64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedUint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedUint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedSint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedSint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedFixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedFixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedSfixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedSfixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedFloatExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedDoubleExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedBoolExtensionStatic)
            registry.addExtension(extensions: UnittestRootpackedEnumExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedInt32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedInt64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedUint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedUint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedSint32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedSint64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedFixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedFixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedSfixed32ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedSfixed64ExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedFloatExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedDoubleExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedBoolExtensionStatic)
            registry.addExtension(extensions: UnittestRootunpackedEnumExtensionStatic)
            registry.addExtension(extensions: TestNestedExtensiontestStatic)
            registry.addExtension(extensions: TestNestedExtensionnestedStringExtensionStatic)
            registry.addExtension(extensions: TestRequiredsingleStatic)
            registry.addExtension(extensions: TestRequiredmultiStatic)
            registry.addExtension(extensions: TestParsingMergeoptionalExtStatic)
            registry.addExtension(extensions: TestParsingMergerepeatedExtStatic)
        }
        public static func optionalInt32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalInt32ExtensionStatic
        }
        public static func optionalInt64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalInt64ExtensionStatic
        }
        public static func optionalUint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalUint32ExtensionStatic
        }
        public static func optionalUint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalUint64ExtensionStatic
        }
        public static func optionalSint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalSint32ExtensionStatic
        }
        public static func optionalSint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalSint64ExtensionStatic
        }
        public static func optionalFixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalFixed32ExtensionStatic
        }
        public static func optionalFixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalFixed64ExtensionStatic
        }
        public static func optionalSfixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalSfixed32ExtensionStatic
        }
        public static func optionalSfixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalSfixed64ExtensionStatic
        }
        public static func optionalFloatExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalFloatExtensionStatic
        }
        public static func optionalDoubleExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalDoubleExtensionStatic
        }
        public static func optionalBoolExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalBoolExtensionStatic
        }
        public static func optionalStringExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalStringExtensionStatic
        }
        public static func optionalBytesExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalBytesExtensionStatic
        }
        public static func optionalGroupExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalGroupExtensionStatic
        }
        public static func optionalNestedMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalNestedMessageExtensionStatic
        }
        public static func optionalForeignMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalForeignMessageExtensionStatic
        }
        public static func optionalImportMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalImportMessageExtensionStatic
        }
        public static func optionalNestedEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalNestedEnumExtensionStatic
        }
        public static func optionalForeignEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalForeignEnumExtensionStatic
        }
        public static func optionalImportEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalImportEnumExtensionStatic
        }
        public static func optionalStringPieceExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalStringPieceExtensionStatic
        }
        public static func optionalCordExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalCordExtensionStatic
        }
        public static func optionalPublicImportMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalPublicImportMessageExtensionStatic
        }
        public static func optionalLazyMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoptionalLazyMessageExtensionStatic
        }
        public static func repeatedInt32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedInt32ExtensionStatic
        }
        public static func repeatedInt64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedInt64ExtensionStatic
        }
        public static func repeatedUint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedUint32ExtensionStatic
        }
        public static func repeatedUint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedUint64ExtensionStatic
        }
        public static func repeatedSint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedSint32ExtensionStatic
        }
        public static func repeatedSint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedSint64ExtensionStatic
        }
        public static func repeatedFixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedFixed32ExtensionStatic
        }
        public static func repeatedFixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedFixed64ExtensionStatic
        }
        public static func repeatedSfixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedSfixed32ExtensionStatic
        }
        public static func repeatedSfixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedSfixed64ExtensionStatic
        }
        public static func repeatedFloatExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedFloatExtensionStatic
        }
        public static func repeatedDoubleExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedDoubleExtensionStatic
        }
        public static func repeatedBoolExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedBoolExtensionStatic
        }
        public static func repeatedStringExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedStringExtensionStatic
        }
        public static func repeatedBytesExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedBytesExtensionStatic
        }
        public static func repeatedGroupExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedGroupExtensionStatic
        }
        public static func repeatedNestedMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedNestedMessageExtensionStatic
        }
        public static func repeatedForeignMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedForeignMessageExtensionStatic
        }
        public static func repeatedImportMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedImportMessageExtensionStatic
        }
        public static func repeatedNestedEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedNestedEnumExtensionStatic
        }
        public static func repeatedForeignEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedForeignEnumExtensionStatic
        }
        public static func repeatedImportEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedImportEnumExtensionStatic
        }
        public static func repeatedStringPieceExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedStringPieceExtensionStatic
        }
        public static func repeatedCordExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedCordExtensionStatic
        }
        public static func repeatedLazyMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootrepeatedLazyMessageExtensionStatic
        }
        public static func defaultInt32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultInt32ExtensionStatic
        }
        public static func defaultInt64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultInt64ExtensionStatic
        }
        public static func defaultUint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultUint32ExtensionStatic
        }
        public static func defaultUint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultUint64ExtensionStatic
        }
        public static func defaultSint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultSint32ExtensionStatic
        }
        public static func defaultSint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultSint64ExtensionStatic
        }
        public static func defaultFixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultFixed32ExtensionStatic
        }
        public static func defaultFixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultFixed64ExtensionStatic
        }
        public static func defaultSfixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultSfixed32ExtensionStatic
        }
        public static func defaultSfixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultSfixed64ExtensionStatic
        }
        public static func defaultFloatExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultFloatExtensionStatic
        }
        public static func defaultDoubleExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultDoubleExtensionStatic
        }
        public static func defaultBoolExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultBoolExtensionStatic
        }
        public static func defaultStringExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultStringExtensionStatic
        }
        public static func defaultBytesExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultBytesExtensionStatic
        }
        public static func defaultNestedEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultNestedEnumExtensionStatic
        }
        public static func defaultForeignEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultForeignEnumExtensionStatic
        }
        public static func defaultImportEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultImportEnumExtensionStatic
        }
        public static func defaultStringPieceExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultStringPieceExtensionStatic
        }
        public static func defaultCordExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootdefaultCordExtensionStatic
        }
        public static func oneofUint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoneofUint32ExtensionStatic
        }
        public static func oneofNestedMessageExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoneofNestedMessageExtensionStatic
        }
        public static func oneofStringExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoneofStringExtensionStatic
        }
        public static func oneofBytesExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootoneofBytesExtensionStatic
        }
        public static func myExtensionString() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootmyExtensionStringStatic
        }
        public static func myExtensionInt() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootmyExtensionIntStatic
        }
        public static func packedInt32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedInt32ExtensionStatic
        }
        public static func packedInt64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedInt64ExtensionStatic
        }
        public static func packedUint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedUint32ExtensionStatic
        }
        public static func packedUint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedUint64ExtensionStatic
        }
        public static func packedSint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedSint32ExtensionStatic
        }
        public static func packedSint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedSint64ExtensionStatic
        }
        public static func packedFixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedFixed32ExtensionStatic
        }
        public static func packedFixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedFixed64ExtensionStatic
        }
        public static func packedSfixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedSfixed32ExtensionStatic
        }
        public static func packedSfixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedSfixed64ExtensionStatic
        }
        public static func packedFloatExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedFloatExtensionStatic
        }
        public static func packedDoubleExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedDoubleExtensionStatic
        }
        public static func packedBoolExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedBoolExtensionStatic
        }
        public static func packedEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootpackedEnumExtensionStatic
        }
        public static func unpackedInt32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedInt32ExtensionStatic
        }
        public static func unpackedInt64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedInt64ExtensionStatic
        }
        public static func unpackedUint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedUint32ExtensionStatic
        }
        public static func unpackedUint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedUint64ExtensionStatic
        }
        public static func unpackedSint32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedSint32ExtensionStatic
        }
        public static func unpackedSint64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedSint64ExtensionStatic
        }
        public static func unpackedFixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedFixed32ExtensionStatic
        }
        public static func unpackedFixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedFixed64ExtensionStatic
        }
        public static func unpackedSfixed32Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedSfixed32ExtensionStatic
        }
        public static func unpackedSfixed64Extension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedSfixed64ExtensionStatic
        }
        public static func unpackedFloatExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedFloatExtensionStatic
        }
        public static func unpackedDoubleExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedDoubleExtensionStatic
        }
        public static func unpackedBoolExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedBoolExtensionStatic
        }
        public static func unpackedEnumExtension() -> ConcreateExtensionField {
               return UnittestRoot.default.UnittestRootunpackedEnumExtensionStatic
        }
    }



    //Enum type declaration start 

    public enum ForeignEnum:Int32, GeneratedEnum {
        case foreignFoo = 4
        case foreignBar = 5
        case foreignBaz = 6
        public func toString() -> String {
            switch self {
            case .foreignFoo: return "FOREIGN_FOO"
            case .foreignBar: return "FOREIGN_BAR"
            case .foreignBaz: return "FOREIGN_BAZ"
            }
        }
        public static func fromString(_ str:String) throws -> ProtobufUnittest.ForeignEnum {
            switch str {
            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 .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 



    //Enum type declaration start 

    /// Test an enum that has multiple values with the same number.
    public enum TestEnumWithDupValue:Int32, GeneratedEnum {
        case foo1 = 1
        case bar1 = 2
        case baz = 3
        public func toString() -> String {
            switch self {
            case .foo1: return "FOO1"
            case .bar1: return "BAR1"
            case .baz: return "BAZ"
            }
        }
        public static func fromString(_ str:String) throws -> ProtobufUnittest.TestEnumWithDupValue {
            switch str {
            case "FOO1":    return .foo1
            case "BAR1":    return .bar1
            case "BAZ":    return .baz
            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 .foo1: return ".foo1"
            case .bar1: return ".bar1"
            case .baz: return ".baz"
            }
        }
        public var hashValue:Int {
            return self.rawValue.hashValue
        }
        public static func ==(lhs:TestEnumWithDupValue, rhs:TestEnumWithDupValue) -> Bool {
            return lhs.hashValue == rhs.hashValue
        }
    }

    //Enum type declaration end 



    //Enum type declaration start 

    /// Test an enum with large, unordered values.
    public enum TestSparseEnum:Int32, GeneratedEnum {
        case sparseA = 123
        case sparseB = 62374
        case sparseC = 12589234
        case sparseD = -15
        case sparseE = -53452
        case sparseF = 0
        case sparseG = 2
        public func toString() -> String {
            switch self {
            case .sparseA: return "SPARSE_A"
            case .sparseB: return "SPARSE_B"
            case .sparseC: return "SPARSE_C"
            case .sparseD: return "SPARSE_D"
            case .sparseE: return "SPARSE_E"
            case .sparseF: return "SPARSE_F"
            case .sparseG: return "SPARSE_G"
            }
        }
        public static func fromString(_ str:String) throws -> ProtobufUnittest.TestSparseEnum {
            switch str {
            case "SPARSE_A":    return .sparseA
            case "SPARSE_B":    return .sparseB
            case "SPARSE_C":    return .sparseC
            case "SPARSE_D":    return .sparseD
            case "SPARSE_E":    return .sparseE
            case "SPARSE_F":    return .sparseF
            case "SPARSE_G":    return .sparseG
            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 .sparseA: return ".sparseA"
            case .sparseB: return ".sparseB"
            case .sparseC: return ".sparseC"
            case .sparseD: return ".sparseD"
            case .sparseE: return ".sparseE"
            case .sparseF: return ".sparseF"
            case .sparseG: return ".sparseG"
            }
        }
        public var hashValue:Int {
            return self.rawValue.hashValue
        }
        public static func ==(lhs:TestSparseEnum, rhs:TestSparseEnum) -> 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 = ProtobufUnittest.TestAllTypes.Builder

        public static func == (lhs: ProtobufUnittest.TestAllTypes, rhs: ProtobufUnittest.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.hasOptionalGroup == rhs.hasOptionalGroup) && (!lhs.hasOptionalGroup || lhs.optionalGroup == rhs.optionalGroup)
            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.hasOptionalImportEnum == rhs.hasOptionalImportEnum) && (!lhs.hasOptionalImportEnum || lhs.optionalImportEnum == rhs.optionalImportEnum)
            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.repeatedGroup == rhs.repeatedGroup)
            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.repeatedImportEnum == rhs.repeatedImportEnum)
            fieldCheck = fieldCheck && (lhs.repeatedStringPiece == rhs.repeatedStringPiece)
            fieldCheck = fieldCheck && (lhs.repeatedCord == rhs.repeatedCord)
            fieldCheck = fieldCheck && (lhs.repeatedLazyMessage == rhs.repeatedLazyMessage)
            fieldCheck = fieldCheck && (lhs.hasDefaultInt32 == rhs.hasDefaultInt32) && (!lhs.hasDefaultInt32 || lhs.defaultInt32 == rhs.defaultInt32)
            fieldCheck = fieldCheck && (lhs.hasDefaultInt64 == rhs.hasDefaultInt64) && (!lhs.hasDefaultInt64 || lhs.defaultInt64 == rhs.defaultInt64)
            fieldCheck = fieldCheck && (lhs.hasDefaultUint32 == rhs.hasDefaultUint32) && (!lhs.hasDefaultUint32 || lhs.defaultUint32 == rhs.defaultUint32)
            fieldCheck = fieldCheck && (lhs.hasDefaultUint64 == rhs.hasDefaultUint64) && (!lhs.hasDefaultUint64 || lhs.defaultUint64 == rhs.defaultUint64)
            fieldCheck = fieldCheck && (lhs.hasDefaultSint32 == rhs.hasDefaultSint32) && (!lhs.hasDefaultSint32 || lhs.defaultSint32 == rhs.defaultSint32)
            fieldCheck = fieldCheck && (lhs.hasDefaultSint64 == rhs.hasDefaultSint64) && (!lhs.hasDefaultSint64 || lhs.defaultSint64 == rhs.defaultSint64)
            fieldCheck = fieldCheck && (lhs.hasDefaultFixed32 == rhs.hasDefaultFixed32) && (!lhs.hasDefaultFixed32 || lhs.defaultFixed32 == rhs.defaultFixed32)
            fieldCheck = fieldCheck && (lhs.hasDefaultFixed64 == rhs.hasDefaultFixed64) && (!lhs.hasDefaultFixed64 || lhs.defaultFixed64 == rhs.defaultFixed64)
            fieldCheck = fieldCheck && (lhs.hasDefaultSfixed32 == rhs.hasDefaultSfixed32) && (!lhs.hasDefaultSfixed32 || lhs.defaultSfixed32 == rhs.defaultSfixed32)
            fieldCheck = fieldCheck && (lhs.hasDefaultSfixed64 == rhs.hasDefaultSfixed64) && (!lhs.hasDefaultSfixed64 || lhs.defaultSfixed64 == rhs.defaultSfixed64)
            fieldCheck = fieldCheck && (lhs.hasDefaultFloat == rhs.hasDefaultFloat) && (!lhs.hasDefaultFloat || lhs.defaultFloat == rhs.defaultFloat)
            fieldCheck = fieldCheck && (lhs.hasDefaultDouble == rhs.hasDefaultDouble) && (!lhs.hasDefaultDouble || lhs.defaultDouble == rhs.defaultDouble)
            fieldCheck = fieldCheck && (lhs.hasDefaultBool == rhs.hasDefaultBool) && (!lhs.hasDefaultBool || lhs.defaultBool == rhs.defaultBool)
            fieldCheck = fieldCheck && (lhs.hasDefaultString == rhs.hasDefaultString) && (!lhs.hasDefaultString || lhs.defaultString == rhs.defaultString)
            fieldCheck = fieldCheck && (lhs.hasDefaultBytes == rhs.hasDefaultBytes) && (!lhs.hasDefaultBytes || lhs.defaultBytes == rhs.defaultBytes)
            fieldCheck = fieldCheck && (lhs.hasDefaultNestedEnum == rhs.hasDefaultNestedEnum) && (!lhs.hasDefaultNestedEnum || lhs.defaultNestedEnum == rhs.defaultNestedEnum)
            fieldCheck = fieldCheck && (lhs.hasDefaultForeignEnum == rhs.hasDefaultForeignEnum) && (!lhs.hasDefaultForeignEnum || lhs.defaultForeignEnum == rhs.defaultForeignEnum)
            fieldCheck = fieldCheck && (lhs.hasDefaultImportEnum == rhs.hasDefaultImportEnum) && (!lhs.hasDefaultImportEnum || lhs.defaultImportEnum == rhs.defaultImportEnum)
            fieldCheck = fieldCheck && (lhs.hasDefaultStringPiece == rhs.hasDefaultStringPiece) && (!lhs.hasDefaultStringPiece || lhs.defaultStringPiece == rhs.defaultStringPiece)
            fieldCheck = fieldCheck && (lhs.hasDefaultCord == rhs.hasDefaultCord) && (!lhs.hasDefaultCord || lhs.defaultCord == rhs.defaultCord)
            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 = ProtobufUnittest.TestAllTypes.NestedMessage.Builder

            public static func == (lhs: ProtobufUnittest.TestAllTypes.NestedMessage, rhs: ProtobufUnittest.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() -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                return ProtobufUnittest.TestAllTypes.NestedMessage.classBuilder() as! ProtobufUnittest.TestAllTypes.NestedMessage.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                return classBuilder() as! ProtobufUnittest.TestAllTypes.NestedMessage.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestAllTypes.NestedMessage.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestAllTypes.NestedMessage.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                return try ProtobufUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestAllTypes.NestedMessage) throws -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                return try ProtobufUnittest.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 -> ProtobufUnittest.TestAllTypes.NestedMessage {
                return try ProtobufUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestAllTypes.NestedMessage {
                return try ProtobufUnittest.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 "ProtobufUnittest.TestAllTypes.NestedMessage"
            }
            override public func className() -> String {
                return "ProtobufUnittest.TestAllTypes.NestedMessage"
            }
            //Meta information declaration end

            final public class Builder : GeneratedMessageBuilder {
                fileprivate var builderResult:ProtobufUnittest.TestAllTypes.NestedMessage = ProtobufUnittest.TestAllTypes.NestedMessage()
                public func getMessage() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                    self.bb = value
                    return self
                }
                @discardableResult
                public func clearBb() -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder{
                    builderResult.hasBb = false
                    builderResult.bb = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                    builderResult = ProtobufUnittest.TestAllTypes.NestedMessage()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                    return try ProtobufUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestAllTypes.NestedMessage {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestAllTypes.NestedMessage {
                    let returnMe:ProtobufUnittest.TestAllTypes.NestedMessage = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestAllTypes.NestedMessage) throws -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                    if other == ProtobufUnittest.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 -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.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 -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.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 -> ProtobufUnittest.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 ProtobufUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //Nested type declaration start

        final public class OptionalGroup : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestAllTypes.OptionalGroup.Builder

            public static func == (lhs: ProtobufUnittest.TestAllTypes.OptionalGroup, rhs: ProtobufUnittest.TestAllTypes.OptionalGroup) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var a:Int32! = nil
            public fileprivate(set) var hasA:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasA {
                    try codedOutputStream.writeInt32(fieldNumber: 17, value:a)
                }
                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 hasA {
                    serialize_size += a.computeInt32Size(fieldNumber: 17)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                return ProtobufUnittest.TestAllTypes.OptionalGroup.classBuilder() as! ProtobufUnittest.TestAllTypes.OptionalGroup.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                return classBuilder() as! ProtobufUnittest.TestAllTypes.OptionalGroup.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestAllTypes.OptionalGroup.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestAllTypes.OptionalGroup.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                return try ProtobufUnittest.TestAllTypes.OptionalGroup.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestAllTypes.OptionalGroup) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasA {
                    jsonMap["a"] = Int(a)
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup {
                return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup {
                return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasA {
                    output += "\(indent) a: \(String(describing: a)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasA {
                        hashCode = (hashCode &* 31) &+ a.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var a:Int32 {
                    get {
                        return builderResult.a
                    }
                    set (value) {
                        builderResult.hasA = true
                        builderResult.a = value
                    }
                }
                public var hasA:Bool {
                    get {
                        return builderResult.hasA
                    }
                }
                @discardableResult
                public func setA(_ value:Int32) -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                    self.a = value
                    return self
                }
                @discardableResult
                public func clearA() -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder{
                    builderResult.hasA = false
                    builderResult.a = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                    builderResult = ProtobufUnittest.TestAllTypes.OptionalGroup()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                    return try ProtobufUnittest.TestAllTypes.OptionalGroup.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestAllTypes.OptionalGroup {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestAllTypes.OptionalGroup {
                    let returnMe:ProtobufUnittest.TestAllTypes.OptionalGroup = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestAllTypes.OptionalGroup) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                    if other == ProtobufUnittest.TestAllTypes.OptionalGroup() {
                        return self
                    }
                    if other.hasA {
                        a = other.a
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup.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 136:
                            a = 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 -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestAllTypes.OptionalGroup.Builder()
                    if let jsonValueA = jsonMap["a"] as? Int {
                        resultDecodedBuilder.a = Int32(jsonValueA)
                    } else if let jsonValueA = jsonMap["a"] as? String {
                        resultDecodedBuilder.a = Int32(jsonValueA)!
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup.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 ProtobufUnittest.TestAllTypes.OptionalGroup.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //Nested type declaration start

        final public class RepeatedGroup : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder

            public static func == (lhs: ProtobufUnittest.TestAllTypes.RepeatedGroup, rhs: ProtobufUnittest.TestAllTypes.RepeatedGroup) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var a:Int32! = nil
            public fileprivate(set) var hasA:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasA {
                    try codedOutputStream.writeInt32(fieldNumber: 47, value:a)
                }
                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 hasA {
                    serialize_size += a.computeInt32Size(fieldNumber: 47)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                return ProtobufUnittest.TestAllTypes.RepeatedGroup.classBuilder() as! ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                return classBuilder() as! ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                return try ProtobufUnittest.TestAllTypes.RepeatedGroup.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestAllTypes.RepeatedGroup) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasA {
                    jsonMap["a"] = Int(a)
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
                return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
                return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasA {
                    output += "\(indent) a: \(String(describing: a)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasA {
                        hashCode = (hashCode &* 31) &+ a.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var a:Int32 {
                    get {
                        return builderResult.a
                    }
                    set (value) {
                        builderResult.hasA = true
                        builderResult.a = value
                    }
                }
                public var hasA:Bool {
                    get {
                        return builderResult.hasA
                    }
                }
                @discardableResult
                public func setA(_ value:Int32) -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                    self.a = value
                    return self
                }
                @discardableResult
                public func clearA() -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder{
                    builderResult.hasA = false
                    builderResult.a = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                    builderResult = ProtobufUnittest.TestAllTypes.RepeatedGroup()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                    return try ProtobufUnittest.TestAllTypes.RepeatedGroup.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
                    let returnMe:ProtobufUnittest.TestAllTypes.RepeatedGroup = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestAllTypes.RepeatedGroup) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                    if other == ProtobufUnittest.TestAllTypes.RepeatedGroup() {
                        return self
                    }
                    if other.hasA {
                        a = other.a
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup.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 376:
                            a = 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 -> ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder()
                    if let jsonValueA = jsonMap["a"] as? Int {
                        resultDecodedBuilder.a = Int32(jsonValueA)
                    } else if let jsonValueA = jsonMap["a"] as? String {
                        resultDecodedBuilder.a = Int32(jsonValueA)!
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup.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 ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //OneOf declaration start

        /// For oneof test
        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(ProtobufUnittest.TestAllTypes.NestedMessage)

            public static func getOneofNestedMessage(_ value:OneofField) -> ProtobufUnittest.TestAllTypes.NestedMessage? {
                switch value {
                case .oneofNestedMessage(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getOneofNestedMessage() -> ProtobufUnittest.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 foo = 1
                case bar = 2
                case baz = 3

                /// Intentionally negative.
                case neg = -1
                public func toString() -> String {
                    switch self {
                    case .foo: return "FOO"
                    case .bar: return "BAR"
                    case .baz: return "BAZ"
                    case .neg: return "NEG"
                    }
                }
                public static func fromString(_ str:String) throws -> ProtobufUnittest.TestAllTypes.NestedEnum {
                    switch str {
                    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 .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 optionalGroup:ProtobufUnittest.TestAllTypes.OptionalGroup!
        public fileprivate(set) var hasOptionalGroup:Bool = false
        public fileprivate(set) var optionalNestedMessage:ProtobufUnittest.TestAllTypes.NestedMessage!
        public fileprivate(set) var hasOptionalNestedMessage:Bool = false
        public fileprivate(set) var optionalForeignMessage:ProtobufUnittest.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:ProtobufUnittest.TestAllTypes.NestedEnum = ProtobufUnittest.TestAllTypes.NestedEnum.foo
        public fileprivate(set) var hasOptionalNestedEnum:Bool = false
        public fileprivate(set) var optionalForeignEnum:ProtobufUnittest.ForeignEnum = ProtobufUnittest.ForeignEnum.foreignFoo
        public fileprivate(set) var hasOptionalForeignEnum:Bool = false
        public fileprivate(set) var optionalImportEnum:ProtobufUnittestImport.ImportEnum = ProtobufUnittestImport.ImportEnum.importFoo
        public fileprivate(set) var hasOptionalImportEnum: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:ProtobufUnittest.TestAllTypes.NestedMessage!
        public fileprivate(set) var hasOptionalLazyMessage:Bool = false
        /// Repeated
        public fileprivate(set) var repeatedInt32:Array<Int32> = Array<Int32>()
        public fileprivate(set) var repeatedInt64:Array<Int64> = Array<Int64>()
        public fileprivate(set) var repeatedUint32:Array<UInt32> = Array<UInt32>()
        public fileprivate(set) var repeatedUint64:Array<UInt64> = Array<UInt64>()
        public fileprivate(set) var repeatedSint32:Array<Int32> = Array<Int32>()
        public fileprivate(set) var repeatedSint64:Array<Int64> = Array<Int64>()
        public fileprivate(set) var repeatedFixed32:Array<UInt32> = Array<UInt32>()
        public fileprivate(set) var repeatedFixed64:Array<UInt64> = Array<UInt64>()
        public fileprivate(set) var repeatedSfixed32:Array<Int32> = Array<Int32>()
        public fileprivate(set) var repeatedSfixed64:Array<Int64> = Array<Int64>()
        public fileprivate(set) var repeatedFloat:Array<Float> = Array<Float>()
        public fileprivate(set) var repeatedDouble:Array<Double> = Array<Double>()
        public fileprivate(set) var repeatedBool:Array<Bool> = Array<Bool>()
        public fileprivate(set) var repeatedString:Array<String> = Array<String>()
        public fileprivate(set) var repeatedBytes:Array<Data> = Array<Data>()
        public fileprivate(set) var repeatedGroup:Array<ProtobufUnittest.TestAllTypes.RepeatedGroup>  = Array<ProtobufUnittest.TestAllTypes.RepeatedGroup>()
        public fileprivate(set) var repeatedNestedMessage:Array<ProtobufUnittest.TestAllTypes.NestedMessage>  = Array<ProtobufUnittest.TestAllTypes.NestedMessage>()
        public fileprivate(set) var repeatedForeignMessage:Array<ProtobufUnittest.ForeignMessage>  = Array<ProtobufUnittest.ForeignMessage>()
        public fileprivate(set) var repeatedImportMessage:Array<ProtobufUnittestImport.ImportMessage>  = Array<ProtobufUnittestImport.ImportMessage>()
        private var repeatedNestedEnumMemoizedSerializedSize:Int32 = 0
        public fileprivate(set) var repeatedNestedEnum:Array<ProtobufUnittest.TestAllTypes.NestedEnum> = Array<ProtobufUnittest.TestAllTypes.NestedEnum>()
        private var repeatedForeignEnumMemoizedSerializedSize:Int32 = 0
        public fileprivate(set) var repeatedForeignEnum:Array<ProtobufUnittest.ForeignEnum> = Array<ProtobufUnittest.ForeignEnum>()
        private var repeatedImportEnumMemoizedSerializedSize:Int32 = 0
        public fileprivate(set) var repeatedImportEnum:Array<ProtobufUnittestImport.ImportEnum> = Array<ProtobufUnittestImport.ImportEnum>()
        public fileprivate(set) var repeatedStringPiece:Array<String> = Array<String>()
        public fileprivate(set) var repeatedCord:Array<String> = Array<String>()
        public fileprivate(set) var repeatedLazyMessage:Array<ProtobufUnittest.TestAllTypes.NestedMessage>  = Array<ProtobufUnittest.TestAllTypes.NestedMessage>()
        /// Singular with defaults
        public fileprivate(set) var defaultInt32:Int32! = Int32(41)
        public fileprivate(set) var hasDefaultInt32:Bool = false

        public fileprivate(set) var defaultInt64:Int64! = Int64(42)
        public fileprivate(set) var hasDefaultInt64:Bool = false

        public fileprivate(set) var defaultUint32:UInt32! = UInt32(43)
        public fileprivate(set) var hasDefaultUint32:Bool = false

        public fileprivate(set) var defaultUint64:UInt64! = UInt64(44)
        public fileprivate(set) var hasDefaultUint64:Bool = false

        public fileprivate(set) var defaultSint32:Int32! = Int32(-45)
        public fileprivate(set) var hasDefaultSint32:Bool = false

        public fileprivate(set) var defaultSint64:Int64! = Int64(46)
        public fileprivate(set) var hasDefaultSint64:Bool = false

        public fileprivate(set) var defaultFixed32:UInt32! = UInt32(47)
        public fileprivate(set) var hasDefaultFixed32:Bool = false

        public fileprivate(set) var defaultFixed64:UInt64! = UInt64(48)
        public fileprivate(set) var hasDefaultFixed64:Bool = false

        public fileprivate(set) var defaultSfixed32:Int32! = Int32(49)
        public fileprivate(set) var hasDefaultSfixed32:Bool = false

        public fileprivate(set) var defaultSfixed64:Int64! = Int64(-50)
        public fileprivate(set) var hasDefaultSfixed64:Bool = false

        public fileprivate(set) var defaultFloat:Float! = Float(51.5)
        public fileprivate(set) var hasDefaultFloat:Bool = false

        public fileprivate(set) var defaultDouble:Double! = Double(52000)
        public fileprivate(set) var hasDefaultDouble:Bool = false

        public fileprivate(set) var defaultBool:Bool! = true
        public fileprivate(set) var hasDefaultBool:Bool = false

        public fileprivate(set) var defaultString:String! = "hello"
        public fileprivate(set) var hasDefaultString:Bool = false

        public fileprivate(set) var defaultBytes:Data! = Data(bytes:([UInt8]() + "world".utf8), count:5)
        public fileprivate(set) var hasDefaultBytes:Bool = false

        public fileprivate(set) var defaultNestedEnum:ProtobufUnittest.TestAllTypes.NestedEnum = ProtobufUnittest.TestAllTypes.NestedEnum.bar
        public fileprivate(set) var hasDefaultNestedEnum:Bool = false
        public fileprivate(set) var defaultForeignEnum:ProtobufUnittest.ForeignEnum = ProtobufUnittest.ForeignEnum.foreignBar
        public fileprivate(set) var hasDefaultForeignEnum:Bool = false
        public fileprivate(set) var defaultImportEnum:ProtobufUnittestImport.ImportEnum = ProtobufUnittestImport.ImportEnum.importBar
        public fileprivate(set) var hasDefaultImportEnum:Bool = false
        public fileprivate(set) var defaultStringPiece:String! = "abc"
        public fileprivate(set) var hasDefaultStringPiece:Bool = false

        public fileprivate(set) var defaultCord:String! = "123"
        public fileprivate(set) var hasDefaultCord:Bool = false

        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:ProtobufUnittest.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 hasOptionalGroup {
                try codedOutputStream.writeGroup(fieldNumber: 16, value:optionalGroup)
            }
            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 hasOptionalImportEnum {
                try codedOutputStream.writeEnum(fieldNumber: 23, value:optionalImportEnum.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 {
                for oneValuerepeatedInt32 in repeatedInt32 {
                    try codedOutputStream.writeInt32(fieldNumber: 31, value:oneValuerepeatedInt32)
                }
            }
            if !repeatedInt64.isEmpty {
                for oneValuerepeatedInt64 in repeatedInt64 {
                    try codedOutputStream.writeInt64(fieldNumber: 32, value:oneValuerepeatedInt64)
                }
            }
            if !repeatedUint32.isEmpty {
                for oneValuerepeatedUint32 in repeatedUint32 {
                    try codedOutputStream.writeUInt32(fieldNumber: 33, value:oneValuerepeatedUint32)
                }
            }
            if !repeatedUint64.isEmpty {
                for oneValuerepeatedUint64 in repeatedUint64 {
                    try codedOutputStream.writeUInt64(fieldNumber: 34, value:oneValuerepeatedUint64)
                }
            }
            if !repeatedSint32.isEmpty {
                for oneValuerepeatedSint32 in repeatedSint32 {
                    try codedOutputStream.writeSInt32(fieldNumber: 35, value:oneValuerepeatedSint32)
                }
            }
            if !repeatedSint64.isEmpty {
                for oneValuerepeatedSint64 in repeatedSint64 {
                    try codedOutputStream.writeSInt64(fieldNumber: 36, value:oneValuerepeatedSint64)
                }
            }
            if !repeatedFixed32.isEmpty {
                for oneValuerepeatedFixed32 in repeatedFixed32 {
                    try codedOutputStream.writeFixed32(fieldNumber: 37, value:oneValuerepeatedFixed32)
                }
            }
            if !repeatedFixed64.isEmpty {
                for oneValuerepeatedFixed64 in repeatedFixed64 {
                    try codedOutputStream.writeFixed64(fieldNumber: 38, value:oneValuerepeatedFixed64)
                }
            }
            if !repeatedSfixed32.isEmpty {
                for oneValuerepeatedSfixed32 in repeatedSfixed32 {
                    try codedOutputStream.writeSFixed32(fieldNumber: 39, value:oneValuerepeatedSfixed32)
                }
            }
            if !repeatedSfixed64.isEmpty {
                for oneValuerepeatedSfixed64 in repeatedSfixed64 {
                    try codedOutputStream.writeSFixed64(fieldNumber: 40, value:oneValuerepeatedSfixed64)
                }
            }
            if !repeatedFloat.isEmpty {
                for oneValuerepeatedFloat in repeatedFloat {
                    try codedOutputStream.writeFloat(fieldNumber: 41, value:oneValuerepeatedFloat)
                }
            }
            if !repeatedDouble.isEmpty {
                for oneValuerepeatedDouble in repeatedDouble {
                    try codedOutputStream.writeDouble(fieldNumber: 42, value:oneValuerepeatedDouble)
                }
            }
            if !repeatedBool.isEmpty {
                for oneValuerepeatedBool in repeatedBool {
                    try codedOutputStream.writeBool(fieldNumber: 43, 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 oneElementRepeatedGroup in repeatedGroup {
                  try codedOutputStream.writeGroup(fieldNumber: 46, value:oneElementRepeatedGroup)
            }
            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)
            }
            for oneValueOfrepeatedNestedEnum in repeatedNestedEnum {
                  try codedOutputStream.writeEnum(fieldNumber: 51, value:oneValueOfrepeatedNestedEnum.rawValue)
            }
            for oneValueOfrepeatedForeignEnum in repeatedForeignEnum {
                  try codedOutputStream.writeEnum(fieldNumber: 52, value:oneValueOfrepeatedForeignEnum.rawValue)
            }
            for oneValueOfrepeatedImportEnum in repeatedImportEnum {
                  try codedOutputStream.writeEnum(fieldNumber: 53, value:oneValueOfrepeatedImportEnum.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 hasDefaultInt32 {
                try codedOutputStream.writeInt32(fieldNumber: 61, value:defaultInt32)
            }
            if hasDefaultInt64 {
                try codedOutputStream.writeInt64(fieldNumber: 62, value:defaultInt64)
            }
            if hasDefaultUint32 {
                try codedOutputStream.writeUInt32(fieldNumber: 63, value:defaultUint32)
            }
            if hasDefaultUint64 {
                try codedOutputStream.writeUInt64(fieldNumber: 64, value:defaultUint64)
            }
            if hasDefaultSint32 {
                try codedOutputStream.writeSInt32(fieldNumber: 65, value:defaultSint32)
            }
            if hasDefaultSint64 {
                try codedOutputStream.writeSInt64(fieldNumber: 66, value:defaultSint64)
            }
            if hasDefaultFixed32 {
                try codedOutputStream.writeFixed32(fieldNumber: 67, value:defaultFixed32)
            }
            if hasDefaultFixed64 {
                try codedOutputStream.writeFixed64(fieldNumber: 68, value:defaultFixed64)
            }
            if hasDefaultSfixed32 {
                try codedOutputStream.writeSFixed32(fieldNumber: 69, value:defaultSfixed32)
            }
            if hasDefaultSfixed64 {
                try codedOutputStream.writeSFixed64(fieldNumber: 70, value:defaultSfixed64)
            }
            if hasDefaultFloat {
                try codedOutputStream.writeFloat(fieldNumber: 71, value:defaultFloat)
            }
            if hasDefaultDouble {
                try codedOutputStream.writeDouble(fieldNumber: 72, value:defaultDouble)
            }
            if hasDefaultBool {
                try codedOutputStream.writeBool(fieldNumber: 73, value:defaultBool)
            }
            if hasDefaultString {
                try codedOutputStream.writeString(fieldNumber: 74, value:defaultString)
            }
            if hasDefaultBytes {
                try codedOutputStream.writeData(fieldNumber: 75, value:defaultBytes)
            }
            if hasDefaultNestedEnum {
                try codedOutputStream.writeEnum(fieldNumber: 81, value:defaultNestedEnum.rawValue)
            }
            if hasDefaultForeignEnum {
                try codedOutputStream.writeEnum(fieldNumber: 82, value:defaultForeignEnum.rawValue)
            }
            if hasDefaultImportEnum {
                try codedOutputStream.writeEnum(fieldNumber: 83, value:defaultImportEnum.rawValue)
            }
            if hasDefaultStringPiece {
                try codedOutputStream.writeString(fieldNumber: 84, value:defaultStringPiece)
            }
            if hasDefaultCord {
                try codedOutputStream.writeString(fieldNumber: 85, value:defaultCord)
            }
            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 hasOptionalGroup {
                if let varSizeoptionalGroup = optionalGroup?.computeGroupSize(fieldNumber: 16) {
                    serialize_size += varSizeoptionalGroup
                }
            }
            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 (hasOptionalImportEnum) {
                serialize_size += optionalImportEnum.rawValue.computeEnumSize(fieldNumber: 23)
            }
            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
            serialize_size += 2 * Int32(repeatedInt32.count)
            var dataSizeRepeatedInt64:Int32 = 0
            for oneValuerepeatedInt64 in repeatedInt64 {
                dataSizeRepeatedInt64 += oneValuerepeatedInt64.computeInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedInt64
            serialize_size += 2 * Int32(repeatedInt64.count)
            var dataSizeRepeatedUint32:Int32 = 0
            for oneValuerepeatedUint32 in repeatedUint32 {
                dataSizeRepeatedUint32 += oneValuerepeatedUint32.computeUInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedUint32
            serialize_size += 2 * Int32(repeatedUint32.count)
            var dataSizeRepeatedUint64:Int32 = 0
            for oneValuerepeatedUint64 in repeatedUint64 {
                dataSizeRepeatedUint64 += oneValuerepeatedUint64.computeUInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedUint64
            serialize_size += 2 * Int32(repeatedUint64.count)
            var dataSizeRepeatedSint32:Int32 = 0
            for oneValuerepeatedSint32 in repeatedSint32 {
                dataSizeRepeatedSint32 += oneValuerepeatedSint32.computeSInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedSint32
            serialize_size += 2 * Int32(repeatedSint32.count)
            var dataSizeRepeatedSint64:Int32 = 0
            for oneValuerepeatedSint64 in repeatedSint64 {
                dataSizeRepeatedSint64 += oneValuerepeatedSint64.computeSInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedSint64
            serialize_size += 2 * Int32(repeatedSint64.count)
            var dataSizeRepeatedFixed32:Int32 = 0
            dataSizeRepeatedFixed32 = 4 * Int32(repeatedFixed32.count)
            serialize_size += dataSizeRepeatedFixed32
            serialize_size += 2 * Int32(repeatedFixed32.count)
            var dataSizeRepeatedFixed64:Int32 = 0
            dataSizeRepeatedFixed64 = 8 * Int32(repeatedFixed64.count)
            serialize_size += dataSizeRepeatedFixed64
            serialize_size += 2 * Int32(repeatedFixed64.count)
            var dataSizeRepeatedSfixed32:Int32 = 0
            dataSizeRepeatedSfixed32 = 4 * Int32(repeatedSfixed32.count)
            serialize_size += dataSizeRepeatedSfixed32
            serialize_size += 2 * Int32(repeatedSfixed32.count)
            var dataSizeRepeatedSfixed64:Int32 = 0
            dataSizeRepeatedSfixed64 = 8 * Int32(repeatedSfixed64.count)
            serialize_size += dataSizeRepeatedSfixed64
            serialize_size += 2 * Int32(repeatedSfixed64.count)
            var dataSizeRepeatedFloat:Int32 = 0
            dataSizeRepeatedFloat = 4 * Int32(repeatedFloat.count)
            serialize_size += dataSizeRepeatedFloat
            serialize_size += 2 * Int32(repeatedFloat.count)
            var dataSizeRepeatedDouble:Int32 = 0
            dataSizeRepeatedDouble = 8 * Int32(repeatedDouble.count)
            serialize_size += dataSizeRepeatedDouble
            serialize_size += 2 * Int32(repeatedDouble.count)
            var dataSizeRepeatedBool:Int32 = 0
            dataSizeRepeatedBool = 1 * Int32(repeatedBool.count)
            serialize_size += dataSizeRepeatedBool
            serialize_size += 2 * Int32(repeatedBool.count)
            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 oneElementRepeatedGroup in repeatedGroup {
                serialize_size += oneElementRepeatedGroup.computeGroupSize(fieldNumber: 46)
            }
            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
            serialize_size += (2 * Int32(repeatedNestedEnum.count))
            var dataSizerepeatedForeignEnum:Int32 = 0
            for oneValueOfrepeatedForeignEnum in repeatedForeignEnum {
                dataSizerepeatedForeignEnum += oneValueOfrepeatedForeignEnum.rawValue.computeEnumSizeNoTag()
            }
            serialize_size += dataSizerepeatedForeignEnum
            serialize_size += (2 * Int32(repeatedForeignEnum.count))
            var dataSizerepeatedImportEnum:Int32 = 0
            for oneValueOfrepeatedImportEnum in repeatedImportEnum {
                dataSizerepeatedImportEnum += oneValueOfrepeatedImportEnum.rawValue.computeEnumSizeNoTag()
            }
            serialize_size += dataSizerepeatedImportEnum
            serialize_size += (2 * Int32(repeatedImportEnum.count))
            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 hasDefaultInt32 {
                serialize_size += defaultInt32.computeInt32Size(fieldNumber: 61)
            }
            if hasDefaultInt64 {
                serialize_size += defaultInt64.computeInt64Size(fieldNumber: 62)
            }
            if hasDefaultUint32 {
                serialize_size += defaultUint32.computeUInt32Size(fieldNumber: 63)
            }
            if hasDefaultUint64 {
                serialize_size += defaultUint64.computeUInt64Size(fieldNumber: 64)
            }
            if hasDefaultSint32 {
                serialize_size += defaultSint32.computeSInt32Size(fieldNumber: 65)
            }
            if hasDefaultSint64 {
                serialize_size += defaultSint64.computeSInt64Size(fieldNumber: 66)
            }
            if hasDefaultFixed32 {
                serialize_size += defaultFixed32.computeFixed32Size(fieldNumber: 67)
            }
            if hasDefaultFixed64 {
                serialize_size += defaultFixed64.computeFixed64Size(fieldNumber: 68)
            }
            if hasDefaultSfixed32 {
                serialize_size += defaultSfixed32.computeSFixed32Size(fieldNumber: 69)
            }
            if hasDefaultSfixed64 {
                serialize_size += defaultSfixed64.computeSFixed64Size(fieldNumber: 70)
            }
            if hasDefaultFloat {
                serialize_size += defaultFloat.computeFloatSize(fieldNumber: 71)
            }
            if hasDefaultDouble {
                serialize_size += defaultDouble.computeDoubleSize(fieldNumber: 72)
            }
            if hasDefaultBool {
                serialize_size += defaultBool.computeBoolSize(fieldNumber: 73)
            }
            if hasDefaultString {
                serialize_size += defaultString.computeStringSize(fieldNumber: 74)
            }
            if hasDefaultBytes {
                serialize_size += defaultBytes.computeDataSize(fieldNumber: 75)
            }
            if (hasDefaultNestedEnum) {
                serialize_size += defaultNestedEnum.rawValue.computeEnumSize(fieldNumber: 81)
            }
            if (hasDefaultForeignEnum) {
                serialize_size += defaultForeignEnum.rawValue.computeEnumSize(fieldNumber: 82)
            }
            if (hasDefaultImportEnum) {
                serialize_size += defaultImportEnum.rawValue.computeEnumSize(fieldNumber: 83)
            }
            if hasDefaultStringPiece {
                serialize_size += defaultStringPiece.computeStringSize(fieldNumber: 84)
            }
            if hasDefaultCord {
                serialize_size += defaultCord.computeStringSize(fieldNumber: 85)
            }
            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() -> ProtobufUnittest.TestAllTypes.Builder {
            return ProtobufUnittest.TestAllTypes.classBuilder() as! ProtobufUnittest.TestAllTypes.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
            return classBuilder() as! ProtobufUnittest.TestAllTypes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestAllTypes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestAllTypes.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestAllTypes.Builder {
            return try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestAllTypes.Builder {
            return try ProtobufUnittest.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 hasOptionalGroup {
                jsonMap["optionalgroup"] = try optionalGroup.encode()
            }
            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 hasOptionalImportEnum {
                jsonMap["optionalImportEnum"] = optionalImportEnum.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 !repeatedGroup.isEmpty {
                var jsonArrayRepeatedGroup:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedGroup in repeatedGroup {
                    let ecodedMessageRepeatedGroup = try oneValueRepeatedGroup.encode()
                    jsonArrayRepeatedGroup.append(ecodedMessageRepeatedGroup)
                }
                jsonMap["repeatedgroup"] = jsonArrayRepeatedGroup
            }
            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 !repeatedImportEnum.isEmpty {
                var jsonArrayRepeatedImportEnum:Array<String> = []
                for oneValueRepeatedImportEnum in repeatedImportEnum {
                    jsonArrayRepeatedImportEnum.append(oneValueRepeatedImportEnum.toString())
                }
                jsonMap["repeatedImportEnum"] = jsonArrayRepeatedImportEnum
            }
            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 hasDefaultInt32 {
                jsonMap["defaultInt32"] = Int(defaultInt32)
            }
            if hasDefaultInt64 {
                jsonMap["defaultInt64"] = "\(defaultInt64!)"
            }
            if hasDefaultUint32 {
                jsonMap["defaultUint32"] = UInt(defaultUint32)
            }
            if hasDefaultUint64 {
                jsonMap["defaultUint64"] = "\(defaultUint64!)"
            }
            if hasDefaultSint32 {
                jsonMap["defaultSint32"] = Int(defaultSint32)
            }
            if hasDefaultSint64 {
                jsonMap["defaultSint64"] = "\(defaultSint64!)"
            }
            if hasDefaultFixed32 {
                jsonMap["defaultFixed32"] = UInt(defaultFixed32)
            }
            if hasDefaultFixed64 {
                jsonMap["defaultFixed64"] = "\(defaultFixed64!)"
            }
            if hasDefaultSfixed32 {
                jsonMap["defaultSfixed32"] = Int(defaultSfixed32)
            }
            if hasDefaultSfixed64 {
                jsonMap["defaultSfixed64"] = "\(defaultSfixed64!)"
            }
            if hasDefaultFloat {
                jsonMap["defaultFloat"] = Float(defaultFloat)
            }
            if hasDefaultDouble {
                jsonMap["defaultDouble"] = Double(defaultDouble)
            }
            if hasDefaultBool {
                jsonMap["defaultBool"] = defaultBool
            }
            if hasDefaultString {
                jsonMap["defaultString"] = defaultString
            }
            if hasDefaultBytes {
                jsonMap["defaultBytes"] = defaultBytes.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
            }
            if hasDefaultNestedEnum {
                jsonMap["defaultNestedEnum"] = defaultNestedEnum.toString()
            }
            if hasDefaultForeignEnum {
                jsonMap["defaultForeignEnum"] = defaultForeignEnum.toString()
            }
            if hasDefaultImportEnum {
                jsonMap["defaultImportEnum"] = defaultImportEnum.toString()
            }
            if hasDefaultStringPiece {
                jsonMap["defaultStringPiece"] = defaultStringPiece
            }
            if hasDefaultCord {
                jsonMap["defaultCord"] = defaultCord
            }
            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 -> ProtobufUnittest.TestAllTypes {
            return try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestAllTypes {
            return try ProtobufUnittest.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 hasOptionalGroup {
                output += "\(indent) optionalGroup {\n"
                if let outDescOptionalGroup = optionalGroup {
                    output += try outDescOptionalGroup.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\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 (hasOptionalImportEnum) {
                output += "\(indent) optionalImportEnum: \(optionalImportEnum.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 repeatedGroupElementIndex:Int = 0
            for oneElementRepeatedGroup in repeatedGroup {
                output += "\(indent) repeatedGroup[\(repeatedGroupElementIndex)] {\n"
                output += try oneElementRepeatedGroup.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedGroupElementIndex += 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 repeatedImportEnumElementIndex:Int = 0
            for oneValueOfrepeatedImportEnum in repeatedImportEnum {
                output += "\(indent) repeatedImportEnum[\(repeatedImportEnumElementIndex)]: \(oneValueOfrepeatedImportEnum.description)\n"
                repeatedImportEnumElementIndex += 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 hasDefaultInt32 {
                output += "\(indent) defaultInt32: \(String(describing: defaultInt32)) \n"
            }
            if hasDefaultInt64 {
                output += "\(indent) defaultInt64: \(String(describing: defaultInt64)) \n"
            }
            if hasDefaultUint32 {
                output += "\(indent) defaultUint32: \(String(describing: defaultUint32)) \n"
            }
            if hasDefaultUint64 {
                output += "\(indent) defaultUint64: \(String(describing: defaultUint64)) \n"
            }
            if hasDefaultSint32 {
                output += "\(indent) defaultSint32: \(String(describing: defaultSint32)) \n"
            }
            if hasDefaultSint64 {
                output += "\(indent) defaultSint64: \(String(describing: defaultSint64)) \n"
            }
            if hasDefaultFixed32 {
                output += "\(indent) defaultFixed32: \(String(describing: defaultFixed32)) \n"
            }
            if hasDefaultFixed64 {
                output += "\(indent) defaultFixed64: \(String(describing: defaultFixed64)) \n"
            }
            if hasDefaultSfixed32 {
                output += "\(indent) defaultSfixed32: \(String(describing: defaultSfixed32)) \n"
            }
            if hasDefaultSfixed64 {
                output += "\(indent) defaultSfixed64: \(String(describing: defaultSfixed64)) \n"
            }
            if hasDefaultFloat {
                output += "\(indent) defaultFloat: \(String(describing: defaultFloat)) \n"
            }
            if hasDefaultDouble {
                output += "\(indent) defaultDouble: \(String(describing: defaultDouble)) \n"
            }
            if hasDefaultBool {
                output += "\(indent) defaultBool: \(String(describing: defaultBool)) \n"
            }
            if hasDefaultString {
                output += "\(indent) defaultString: \(String(describing: defaultString)) \n"
            }
            if hasDefaultBytes {
                output += "\(indent) defaultBytes: \(String(describing: defaultBytes)) \n"
            }
            if (hasDefaultNestedEnum) {
                output += "\(indent) defaultNestedEnum: \(defaultNestedEnum.description)\n"
            }
            if (hasDefaultForeignEnum) {
                output += "\(indent) defaultForeignEnum: \(defaultForeignEnum.description)\n"
            }
            if (hasDefaultImportEnum) {
                output += "\(indent) defaultImportEnum: \(defaultImportEnum.description)\n"
            }
            if hasDefaultStringPiece {
                output += "\(indent) defaultStringPiece: \(String(describing: defaultStringPiece)) \n"
            }
            if hasDefaultCord {
                output += "\(indent) defaultCord: \(String(describing: defaultCord)) \n"
            }
            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 hasOptionalGroup {
                    if let hashValueoptionalGroup = optionalGroup?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalGroup
                    }
                }
                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 hasOptionalImportEnum {
                     hashCode = (hashCode &* 31) &+ optionalImportEnum.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 oneElementRepeatedGroup in repeatedGroup {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedGroup.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 oneValueOfrepeatedImportEnum in repeatedImportEnum {
                    hashCode = (hashCode &* 31) &+ oneValueOfrepeatedImportEnum.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 hasDefaultInt32 {
                    hashCode = (hashCode &* 31) &+ defaultInt32.hashValue
                }
                if hasDefaultInt64 {
                    hashCode = (hashCode &* 31) &+ defaultInt64.hashValue
                }
                if hasDefaultUint32 {
                    hashCode = (hashCode &* 31) &+ defaultUint32.hashValue
                }
                if hasDefaultUint64 {
                    hashCode = (hashCode &* 31) &+ defaultUint64.hashValue
                }
                if hasDefaultSint32 {
                    hashCode = (hashCode &* 31) &+ defaultSint32.hashValue
                }
                if hasDefaultSint64 {
                    hashCode = (hashCode &* 31) &+ defaultSint64.hashValue
                }
                if hasDefaultFixed32 {
                    hashCode = (hashCode &* 31) &+ defaultFixed32.hashValue
                }
                if hasDefaultFixed64 {
                    hashCode = (hashCode &* 31) &+ defaultFixed64.hashValue
                }
                if hasDefaultSfixed32 {
                    hashCode = (hashCode &* 31) &+ defaultSfixed32.hashValue
                }
                if hasDefaultSfixed64 {
                    hashCode = (hashCode &* 31) &+ defaultSfixed64.hashValue
                }
                if hasDefaultFloat {
                    hashCode = (hashCode &* 31) &+ defaultFloat.hashValue
                }
                if hasDefaultDouble {
                    hashCode = (hashCode &* 31) &+ defaultDouble.hashValue
                }
                if hasDefaultBool {
                    hashCode = (hashCode &* 31) &+ defaultBool.hashValue
                }
                if hasDefaultString {
                    hashCode = (hashCode &* 31) &+ defaultString.hashValue
                }
                if hasDefaultBytes {
                    hashCode = (hashCode &* 31) &+ defaultBytes.hashValue
                }
                if hasDefaultNestedEnum {
                     hashCode = (hashCode &* 31) &+ defaultNestedEnum.hashValue
                }
                if hasDefaultForeignEnum {
                     hashCode = (hashCode &* 31) &+ defaultForeignEnum.hashValue
                }
                if hasDefaultImportEnum {
                     hashCode = (hashCode &* 31) &+ defaultImportEnum.hashValue
                }
                if hasDefaultStringPiece {
                    hashCode = (hashCode &* 31) &+ defaultStringPiece.hashValue
                }
                if hasDefaultCord {
                    hashCode = (hashCode &* 31) &+ defaultCord.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 "ProtobufUnittest.TestAllTypes"
        }
        override public func className() -> String {
            return "ProtobufUnittest.TestAllTypes"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            public func setOneofField(_ oneOf:TestAllTypes.OneofField) ->  ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalInt32 = value
                return self
            }
            @discardableResult
            public func clearOptionalInt32() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalInt64 = value
                return self
            }
            @discardableResult
            public func clearOptionalInt64() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalUint32 = value
                return self
            }
            @discardableResult
            public func clearOptionalUint32() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalUint64 = value
                return self
            }
            @discardableResult
            public func clearOptionalUint64() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalSint32 = value
                return self
            }
            @discardableResult
            public func clearOptionalSint32() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalSint64 = value
                return self
            }
            @discardableResult
            public func clearOptionalSint64() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalFixed32 = value
                return self
            }
            @discardableResult
            public func clearOptionalFixed32() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalFixed64 = value
                return self
            }
            @discardableResult
            public func clearOptionalFixed64() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalSfixed32 = value
                return self
            }
            @discardableResult
            public func clearOptionalSfixed32() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalSfixed64 = value
                return self
            }
            @discardableResult
            public func clearOptionalSfixed64() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalFloat = value
                return self
            }
            @discardableResult
            public func clearOptionalFloat() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalDouble = value
                return self
            }
            @discardableResult
            public func clearOptionalDouble() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalBool = value
                return self
            }
            @discardableResult
            public func clearOptionalBool() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalString = value
                return self
            }
            @discardableResult
            public func clearOptionalString() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalBytes = value
                return self
            }
            @discardableResult
            public func clearOptionalBytes() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasOptionalBytes = false
                builderResult.optionalBytes = nil
                return self
            }
            public var optionalGroup:ProtobufUnittest.TestAllTypes.OptionalGroup! {
                get {
                    if optionalGroupBuilder_ != nil {
                        builderResult.optionalGroup = optionalGroupBuilder_.getMessage()
                    }
                    return builderResult.optionalGroup
                }
                set (value) {
                    builderResult.hasOptionalGroup = value != nil
                    builderResult.optionalGroup = value
                }
            }
            public var hasOptionalGroup:Bool {
                get {
                    return builderResult.hasOptionalGroup
                }
            }
            fileprivate var optionalGroupBuilder_:ProtobufUnittest.TestAllTypes.OptionalGroup.Builder! {
                didSet {
                    builderResult.hasOptionalGroup = true
                }
            }
            public func getOptionalGroupBuilder() -> ProtobufUnittest.TestAllTypes.OptionalGroup.Builder {
                if optionalGroupBuilder_ == nil {
                    optionalGroupBuilder_ = ProtobufUnittest.TestAllTypes.OptionalGroup.Builder()
                    builderResult.optionalGroup = optionalGroupBuilder_.getMessage()
                    if optionalGroup != nil {
                        try! optionalGroupBuilder_.mergeFrom(other: optionalGroup)
                    }
                }
                return optionalGroupBuilder_
            }
            @discardableResult
            public func setOptionalGroup(_ value:ProtobufUnittest.TestAllTypes.OptionalGroup!) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalGroup = value
                return self
            }
            @discardableResult
            public func mergeOptionalGroup(value:ProtobufUnittest.TestAllTypes.OptionalGroup) throws -> ProtobufUnittest.TestAllTypes.Builder {
                if builderResult.hasOptionalGroup {
                    builderResult.optionalGroup = try ProtobufUnittest.TestAllTypes.OptionalGroup.builderWithPrototype(prototype:builderResult.optionalGroup).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalGroup = value
                }
                builderResult.hasOptionalGroup = true
                return self
            }
            @discardableResult
            public func clearOptionalGroup() -> ProtobufUnittest.TestAllTypes.Builder {
                optionalGroupBuilder_ = nil
                builderResult.hasOptionalGroup = false
                builderResult.optionalGroup = nil
                return self
            }
            public var optionalNestedMessage:ProtobufUnittest.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_:ProtobufUnittest.TestAllTypes.NestedMessage.Builder! {
                didSet {
                    builderResult.hasOptionalNestedMessage = true
                }
            }
            public func getOptionalNestedMessageBuilder() -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                if optionalNestedMessageBuilder_ == nil {
                    optionalNestedMessageBuilder_ = ProtobufUnittest.TestAllTypes.NestedMessage.Builder()
                    builderResult.optionalNestedMessage = optionalNestedMessageBuilder_.getMessage()
                    if optionalNestedMessage != nil {
                        try! optionalNestedMessageBuilder_.mergeFrom(other: optionalNestedMessage)
                    }
                }
                return optionalNestedMessageBuilder_
            }
            @discardableResult
            public func setOptionalNestedMessage(_ value:ProtobufUnittest.TestAllTypes.NestedMessage!) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalNestedMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalNestedMessage(value:ProtobufUnittest.TestAllTypes.NestedMessage) throws -> ProtobufUnittest.TestAllTypes.Builder {
                if builderResult.hasOptionalNestedMessage {
                    builderResult.optionalNestedMessage = try ProtobufUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:builderResult.optionalNestedMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalNestedMessage = value
                }
                builderResult.hasOptionalNestedMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalNestedMessage() -> ProtobufUnittest.TestAllTypes.Builder {
                optionalNestedMessageBuilder_ = nil
                builderResult.hasOptionalNestedMessage = false
                builderResult.optionalNestedMessage = nil
                return self
            }
            public var optionalForeignMessage:ProtobufUnittest.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_:ProtobufUnittest.ForeignMessage.Builder! {
                didSet {
                    builderResult.hasOptionalForeignMessage = true
                }
            }
            public func getOptionalForeignMessageBuilder() -> ProtobufUnittest.ForeignMessage.Builder {
                if optionalForeignMessageBuilder_ == nil {
                    optionalForeignMessageBuilder_ = ProtobufUnittest.ForeignMessage.Builder()
                    builderResult.optionalForeignMessage = optionalForeignMessageBuilder_.getMessage()
                    if optionalForeignMessage != nil {
                        try! optionalForeignMessageBuilder_.mergeFrom(other: optionalForeignMessage)
                    }
                }
                return optionalForeignMessageBuilder_
            }
            @discardableResult
            public func setOptionalForeignMessage(_ value:ProtobufUnittest.ForeignMessage!) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalForeignMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalForeignMessage(value:ProtobufUnittest.ForeignMessage) throws -> ProtobufUnittest.TestAllTypes.Builder {
                if builderResult.hasOptionalForeignMessage {
                    builderResult.optionalForeignMessage = try ProtobufUnittest.ForeignMessage.builderWithPrototype(prototype:builderResult.optionalForeignMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalForeignMessage = value
                }
                builderResult.hasOptionalForeignMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalForeignMessage() -> ProtobufUnittest.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!) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalImportMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalImportMessage(value:ProtobufUnittestImport.ImportMessage) throws -> ProtobufUnittest.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() -> ProtobufUnittest.TestAllTypes.Builder {
                optionalImportMessageBuilder_ = nil
                builderResult.hasOptionalImportMessage = false
                builderResult.optionalImportMessage = nil
                return self
            }
                public var optionalNestedEnum:ProtobufUnittest.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:ProtobufUnittest.TestAllTypes.NestedEnum) -> ProtobufUnittest.TestAllTypes.Builder {
                  self.optionalNestedEnum = value
                  return self
                }
            @discardableResult
                public func clearOptionalNestedEnum() -> ProtobufUnittest.TestAllTypes.Builder {
                   builderResult.hasOptionalNestedEnum = false
                   builderResult.optionalNestedEnum = .foo
                   return self
                }
                public var optionalForeignEnum:ProtobufUnittest.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:ProtobufUnittest.ForeignEnum) -> ProtobufUnittest.TestAllTypes.Builder {
                  self.optionalForeignEnum = value
                  return self
                }
            @discardableResult
                public func clearOptionalForeignEnum() -> ProtobufUnittest.TestAllTypes.Builder {
                   builderResult.hasOptionalForeignEnum = false
                   builderResult.optionalForeignEnum = .foreignFoo
                   return self
                }
                public var optionalImportEnum:ProtobufUnittestImport.ImportEnum {
                    get {
                        return builderResult.optionalImportEnum
                    }
                    set (value) {
                        builderResult.hasOptionalImportEnum = true
                        builderResult.optionalImportEnum = value
                    }
                }
                public var hasOptionalImportEnum:Bool{
                    get {
                        return builderResult.hasOptionalImportEnum
                    }
                }
            @discardableResult
                public func setOptionalImportEnum(_ value:ProtobufUnittestImport.ImportEnum) -> ProtobufUnittest.TestAllTypes.Builder {
                  self.optionalImportEnum = value
                  return self
                }
            @discardableResult
                public func clearOptionalImportEnum() -> ProtobufUnittest.TestAllTypes.Builder {
                   builderResult.hasOptionalImportEnum = false
                   builderResult.optionalImportEnum = .importFoo
                   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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalStringPiece = value
                return self
            }
            @discardableResult
            public func clearOptionalStringPiece() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalCord = value
                return self
            }
            @discardableResult
            public func clearOptionalCord() -> ProtobufUnittest.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!) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalPublicImportMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalPublicImportMessage(value:ProtobufUnittestImport.PublicImportMessage) throws -> ProtobufUnittest.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() -> ProtobufUnittest.TestAllTypes.Builder {
                optionalPublicImportMessageBuilder_ = nil
                builderResult.hasOptionalPublicImportMessage = false
                builderResult.optionalPublicImportMessage = nil
                return self
            }
            public var optionalLazyMessage:ProtobufUnittest.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_:ProtobufUnittest.TestAllTypes.NestedMessage.Builder! {
                didSet {
                    builderResult.hasOptionalLazyMessage = true
                }
            }
            public func getOptionalLazyMessageBuilder() -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                if optionalLazyMessageBuilder_ == nil {
                    optionalLazyMessageBuilder_ = ProtobufUnittest.TestAllTypes.NestedMessage.Builder()
                    builderResult.optionalLazyMessage = optionalLazyMessageBuilder_.getMessage()
                    if optionalLazyMessage != nil {
                        try! optionalLazyMessageBuilder_.mergeFrom(other: optionalLazyMessage)
                    }
                }
                return optionalLazyMessageBuilder_
            }
            @discardableResult
            public func setOptionalLazyMessage(_ value:ProtobufUnittest.TestAllTypes.NestedMessage!) -> ProtobufUnittest.TestAllTypes.Builder {
                self.optionalLazyMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalLazyMessage(value:ProtobufUnittest.TestAllTypes.NestedMessage) throws -> ProtobufUnittest.TestAllTypes.Builder {
                if builderResult.hasOptionalLazyMessage {
                    builderResult.optionalLazyMessage = try ProtobufUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:builderResult.optionalLazyMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalLazyMessage = value
                }
                builderResult.hasOptionalLazyMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalLazyMessage() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedInt32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedInt32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedInt64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedInt64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedUint32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedUint32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedUint64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedUint64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedSint32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSint32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedSint64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSint64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedFixed32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedFixed32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedFixed64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedFixed64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedSfixed32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSfixed32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedSfixed64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedSfixed64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedFloat = value
                return self
            }
            @discardableResult
            public func clearRepeatedFloat() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedDouble = value
                return self
            }
            @discardableResult
            public func clearRepeatedDouble() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedBool = value
                return self
            }
            @discardableResult
            public func clearRepeatedBool() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedString = value
                return self
            }
            @discardableResult
            public func clearRepeatedString() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedBytes = value
                return self
            }
            @discardableResult
            public func clearRepeatedBytes() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult.repeatedBytes.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedGroup:Array<ProtobufUnittest.TestAllTypes.RepeatedGroup> {
                get {
                    return builderResult.repeatedGroup
                }
                set (value) {
                    builderResult.repeatedGroup = value
                }
            }
            @discardableResult
            public func setRepeatedGroup(_ value:Array<ProtobufUnittest.TestAllTypes.RepeatedGroup>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedGroup = value
                return self
            }
            @discardableResult
            public func clearRepeatedGroup() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult.repeatedGroup.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedNestedMessage:Array<ProtobufUnittest.TestAllTypes.NestedMessage> {
                get {
                    return builderResult.repeatedNestedMessage
                }
                set (value) {
                    builderResult.repeatedNestedMessage = value
                }
            }
            @discardableResult
            public func setRepeatedNestedMessage(_ value:Array<ProtobufUnittest.TestAllTypes.NestedMessage>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedNestedMessage = value
                return self
            }
            @discardableResult
            public func clearRepeatedNestedMessage() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult.repeatedNestedMessage.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedForeignMessage:Array<ProtobufUnittest.ForeignMessage> {
                get {
                    return builderResult.repeatedForeignMessage
                }
                set (value) {
                    builderResult.repeatedForeignMessage = value
                }
            }
            @discardableResult
            public func setRepeatedForeignMessage(_ value:Array<ProtobufUnittest.ForeignMessage>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedForeignMessage = value
                return self
            }
            @discardableResult
            public func clearRepeatedForeignMessage() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedImportMessage = value
                return self
            }
            @discardableResult
            public func clearRepeatedImportMessage() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult.repeatedImportMessage.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedNestedEnum:Array<ProtobufUnittest.TestAllTypes.NestedEnum> {
                get {
                    return builderResult.repeatedNestedEnum
                }
                set (value) {
                    builderResult.repeatedNestedEnum = value
                }
            }
            @discardableResult
            public func setRepeatedNestedEnum(_ value:Array<ProtobufUnittest.TestAllTypes.NestedEnum>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedNestedEnum = value
                return self
            }
            @discardableResult
            public func clearRepeatedNestedEnum() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult.repeatedNestedEnum.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedForeignEnum:Array<ProtobufUnittest.ForeignEnum> {
                get {
                    return builderResult.repeatedForeignEnum
                }
                set (value) {
                    builderResult.repeatedForeignEnum = value
                }
            }
            @discardableResult
            public func setRepeatedForeignEnum(_ value:Array<ProtobufUnittest.ForeignEnum>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedForeignEnum = value
                return self
            }
            @discardableResult
            public func clearRepeatedForeignEnum() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult.repeatedForeignEnum.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedImportEnum:Array<ProtobufUnittestImport.ImportEnum> {
                get {
                    return builderResult.repeatedImportEnum
                }
                set (value) {
                    builderResult.repeatedImportEnum = value
                }
            }
            @discardableResult
            public func setRepeatedImportEnum(_ value:Array<ProtobufUnittestImport.ImportEnum>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedImportEnum = value
                return self
            }
            @discardableResult
            public func clearRepeatedImportEnum() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult.repeatedImportEnum.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedStringPiece = value
                return self
            }
            @discardableResult
            public func clearRepeatedStringPiece() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedCord = value
                return self
            }
            @discardableResult
            public func clearRepeatedCord() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult.repeatedCord.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedLazyMessage:Array<ProtobufUnittest.TestAllTypes.NestedMessage> {
                get {
                    return builderResult.repeatedLazyMessage
                }
                set (value) {
                    builderResult.repeatedLazyMessage = value
                }
            }
            @discardableResult
            public func setRepeatedLazyMessage(_ value:Array<ProtobufUnittest.TestAllTypes.NestedMessage>) -> ProtobufUnittest.TestAllTypes.Builder {
                self.repeatedLazyMessage = value
                return self
            }
            @discardableResult
            public func clearRepeatedLazyMessage() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult.repeatedLazyMessage.removeAll(keepingCapacity: false)
                return self
            }
            /// Singular with defaults
            public var defaultInt32:Int32 {
                get {
                    return builderResult.defaultInt32
                }
                set (value) {
                    builderResult.hasDefaultInt32 = true
                    builderResult.defaultInt32 = value
                }
            }
            public var hasDefaultInt32:Bool {
                get {
                    return builderResult.hasDefaultInt32
                }
            }
            @discardableResult
            public func setDefaultInt32(_ value:Int32) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultInt32 = value
                return self
            }
            @discardableResult
            public func clearDefaultInt32() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultInt32 = false
                builderResult.defaultInt32 = Int32(41)
                return self
            }
            public var defaultInt64:Int64 {
                get {
                    return builderResult.defaultInt64
                }
                set (value) {
                    builderResult.hasDefaultInt64 = true
                    builderResult.defaultInt64 = value
                }
            }
            public var hasDefaultInt64:Bool {
                get {
                    return builderResult.hasDefaultInt64
                }
            }
            @discardableResult
            public func setDefaultInt64(_ value:Int64) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultInt64 = value
                return self
            }
            @discardableResult
            public func clearDefaultInt64() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultInt64 = false
                builderResult.defaultInt64 = Int64(42)
                return self
            }
            public var defaultUint32:UInt32 {
                get {
                    return builderResult.defaultUint32
                }
                set (value) {
                    builderResult.hasDefaultUint32 = true
                    builderResult.defaultUint32 = value
                }
            }
            public var hasDefaultUint32:Bool {
                get {
                    return builderResult.hasDefaultUint32
                }
            }
            @discardableResult
            public func setDefaultUint32(_ value:UInt32) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultUint32 = value
                return self
            }
            @discardableResult
            public func clearDefaultUint32() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultUint32 = false
                builderResult.defaultUint32 = UInt32(43)
                return self
            }
            public var defaultUint64:UInt64 {
                get {
                    return builderResult.defaultUint64
                }
                set (value) {
                    builderResult.hasDefaultUint64 = true
                    builderResult.defaultUint64 = value
                }
            }
            public var hasDefaultUint64:Bool {
                get {
                    return builderResult.hasDefaultUint64
                }
            }
            @discardableResult
            public func setDefaultUint64(_ value:UInt64) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultUint64 = value
                return self
            }
            @discardableResult
            public func clearDefaultUint64() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultUint64 = false
                builderResult.defaultUint64 = UInt64(44)
                return self
            }
            public var defaultSint32:Int32 {
                get {
                    return builderResult.defaultSint32
                }
                set (value) {
                    builderResult.hasDefaultSint32 = true
                    builderResult.defaultSint32 = value
                }
            }
            public var hasDefaultSint32:Bool {
                get {
                    return builderResult.hasDefaultSint32
                }
            }
            @discardableResult
            public func setDefaultSint32(_ value:Int32) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultSint32 = value
                return self
            }
            @discardableResult
            public func clearDefaultSint32() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultSint32 = false
                builderResult.defaultSint32 = Int32(-45)
                return self
            }
            public var defaultSint64:Int64 {
                get {
                    return builderResult.defaultSint64
                }
                set (value) {
                    builderResult.hasDefaultSint64 = true
                    builderResult.defaultSint64 = value
                }
            }
            public var hasDefaultSint64:Bool {
                get {
                    return builderResult.hasDefaultSint64
                }
            }
            @discardableResult
            public func setDefaultSint64(_ value:Int64) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultSint64 = value
                return self
            }
            @discardableResult
            public func clearDefaultSint64() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultSint64 = false
                builderResult.defaultSint64 = Int64(46)
                return self
            }
            public var defaultFixed32:UInt32 {
                get {
                    return builderResult.defaultFixed32
                }
                set (value) {
                    builderResult.hasDefaultFixed32 = true
                    builderResult.defaultFixed32 = value
                }
            }
            public var hasDefaultFixed32:Bool {
                get {
                    return builderResult.hasDefaultFixed32
                }
            }
            @discardableResult
            public func setDefaultFixed32(_ value:UInt32) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultFixed32 = value
                return self
            }
            @discardableResult
            public func clearDefaultFixed32() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultFixed32 = false
                builderResult.defaultFixed32 = UInt32(47)
                return self
            }
            public var defaultFixed64:UInt64 {
                get {
                    return builderResult.defaultFixed64
                }
                set (value) {
                    builderResult.hasDefaultFixed64 = true
                    builderResult.defaultFixed64 = value
                }
            }
            public var hasDefaultFixed64:Bool {
                get {
                    return builderResult.hasDefaultFixed64
                }
            }
            @discardableResult
            public func setDefaultFixed64(_ value:UInt64) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultFixed64 = value
                return self
            }
            @discardableResult
            public func clearDefaultFixed64() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultFixed64 = false
                builderResult.defaultFixed64 = UInt64(48)
                return self
            }
            public var defaultSfixed32:Int32 {
                get {
                    return builderResult.defaultSfixed32
                }
                set (value) {
                    builderResult.hasDefaultSfixed32 = true
                    builderResult.defaultSfixed32 = value
                }
            }
            public var hasDefaultSfixed32:Bool {
                get {
                    return builderResult.hasDefaultSfixed32
                }
            }
            @discardableResult
            public func setDefaultSfixed32(_ value:Int32) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultSfixed32 = value
                return self
            }
            @discardableResult
            public func clearDefaultSfixed32() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultSfixed32 = false
                builderResult.defaultSfixed32 = Int32(49)
                return self
            }
            public var defaultSfixed64:Int64 {
                get {
                    return builderResult.defaultSfixed64
                }
                set (value) {
                    builderResult.hasDefaultSfixed64 = true
                    builderResult.defaultSfixed64 = value
                }
            }
            public var hasDefaultSfixed64:Bool {
                get {
                    return builderResult.hasDefaultSfixed64
                }
            }
            @discardableResult
            public func setDefaultSfixed64(_ value:Int64) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultSfixed64 = value
                return self
            }
            @discardableResult
            public func clearDefaultSfixed64() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultSfixed64 = false
                builderResult.defaultSfixed64 = Int64(-50)
                return self
            }
            public var defaultFloat:Float {
                get {
                    return builderResult.defaultFloat
                }
                set (value) {
                    builderResult.hasDefaultFloat = true
                    builderResult.defaultFloat = value
                }
            }
            public var hasDefaultFloat:Bool {
                get {
                    return builderResult.hasDefaultFloat
                }
            }
            @discardableResult
            public func setDefaultFloat(_ value:Float) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultFloat = value
                return self
            }
            @discardableResult
            public func clearDefaultFloat() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultFloat = false
                builderResult.defaultFloat = Float(51.5)
                return self
            }
            public var defaultDouble:Double {
                get {
                    return builderResult.defaultDouble
                }
                set (value) {
                    builderResult.hasDefaultDouble = true
                    builderResult.defaultDouble = value
                }
            }
            public var hasDefaultDouble:Bool {
                get {
                    return builderResult.hasDefaultDouble
                }
            }
            @discardableResult
            public func setDefaultDouble(_ value:Double) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultDouble = value
                return self
            }
            @discardableResult
            public func clearDefaultDouble() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultDouble = false
                builderResult.defaultDouble = Double(52000)
                return self
            }
            public var defaultBool:Bool {
                get {
                    return builderResult.defaultBool
                }
                set (value) {
                    builderResult.hasDefaultBool = true
                    builderResult.defaultBool = value
                }
            }
            public var hasDefaultBool:Bool {
                get {
                    return builderResult.hasDefaultBool
                }
            }
            @discardableResult
            public func setDefaultBool(_ value:Bool) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultBool = value
                return self
            }
            @discardableResult
            public func clearDefaultBool() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultBool = false
                builderResult.defaultBool = true
                return self
            }
            public var defaultString:String {
                get {
                    return builderResult.defaultString
                }
                set (value) {
                    builderResult.hasDefaultString = true
                    builderResult.defaultString = value
                }
            }
            public var hasDefaultString:Bool {
                get {
                    return builderResult.hasDefaultString
                }
            }
            @discardableResult
            public func setDefaultString(_ value:String) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultString = value
                return self
            }
            @discardableResult
            public func clearDefaultString() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultString = false
                builderResult.defaultString = "hello"
                return self
            }
            public var defaultBytes:Data {
                get {
                    return builderResult.defaultBytes
                }
                set (value) {
                    builderResult.hasDefaultBytes = true
                    builderResult.defaultBytes = value
                }
            }
            public var hasDefaultBytes:Bool {
                get {
                    return builderResult.hasDefaultBytes
                }
            }
            @discardableResult
            public func setDefaultBytes(_ value:Data) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultBytes = value
                return self
            }
            @discardableResult
            public func clearDefaultBytes() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultBytes = false
                builderResult.defaultBytes = Data(bytes:([UInt8]() + "world".utf8), count:5)
                return self
            }
                public var defaultNestedEnum:ProtobufUnittest.TestAllTypes.NestedEnum {
                    get {
                        return builderResult.defaultNestedEnum
                    }
                    set (value) {
                        builderResult.hasDefaultNestedEnum = true
                        builderResult.defaultNestedEnum = value
                    }
                }
                public var hasDefaultNestedEnum:Bool{
                    get {
                        return builderResult.hasDefaultNestedEnum
                    }
                }
            @discardableResult
                public func setDefaultNestedEnum(_ value:ProtobufUnittest.TestAllTypes.NestedEnum) -> ProtobufUnittest.TestAllTypes.Builder {
                  self.defaultNestedEnum = value
                  return self
                }
            @discardableResult
                public func clearDefaultNestedEnum() -> ProtobufUnittest.TestAllTypes.Builder {
                   builderResult.hasDefaultNestedEnum = false
                   builderResult.defaultNestedEnum = .bar
                   return self
                }
                public var defaultForeignEnum:ProtobufUnittest.ForeignEnum {
                    get {
                        return builderResult.defaultForeignEnum
                    }
                    set (value) {
                        builderResult.hasDefaultForeignEnum = true
                        builderResult.defaultForeignEnum = value
                    }
                }
                public var hasDefaultForeignEnum:Bool{
                    get {
                        return builderResult.hasDefaultForeignEnum
                    }
                }
            @discardableResult
                public func setDefaultForeignEnum(_ value:ProtobufUnittest.ForeignEnum) -> ProtobufUnittest.TestAllTypes.Builder {
                  self.defaultForeignEnum = value
                  return self
                }
            @discardableResult
                public func clearDefaultForeignEnum() -> ProtobufUnittest.TestAllTypes.Builder {
                   builderResult.hasDefaultForeignEnum = false
                   builderResult.defaultForeignEnum = .foreignBar
                   return self
                }
                public var defaultImportEnum:ProtobufUnittestImport.ImportEnum {
                    get {
                        return builderResult.defaultImportEnum
                    }
                    set (value) {
                        builderResult.hasDefaultImportEnum = true
                        builderResult.defaultImportEnum = value
                    }
                }
                public var hasDefaultImportEnum:Bool{
                    get {
                        return builderResult.hasDefaultImportEnum
                    }
                }
            @discardableResult
                public func setDefaultImportEnum(_ value:ProtobufUnittestImport.ImportEnum) -> ProtobufUnittest.TestAllTypes.Builder {
                  self.defaultImportEnum = value
                  return self
                }
            @discardableResult
                public func clearDefaultImportEnum() -> ProtobufUnittest.TestAllTypes.Builder {
                   builderResult.hasDefaultImportEnum = false
                   builderResult.defaultImportEnum = .importBar
                   return self
                }
            public var defaultStringPiece:String {
                get {
                    return builderResult.defaultStringPiece
                }
                set (value) {
                    builderResult.hasDefaultStringPiece = true
                    builderResult.defaultStringPiece = value
                }
            }
            public var hasDefaultStringPiece:Bool {
                get {
                    return builderResult.hasDefaultStringPiece
                }
            }
            @discardableResult
            public func setDefaultStringPiece(_ value:String) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultStringPiece = value
                return self
            }
            @discardableResult
            public func clearDefaultStringPiece() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultStringPiece = false
                builderResult.defaultStringPiece = "abc"
                return self
            }
            public var defaultCord:String {
                get {
                    return builderResult.defaultCord
                }
                set (value) {
                    builderResult.hasDefaultCord = true
                    builderResult.defaultCord = value
                }
            }
            public var hasDefaultCord:Bool {
                get {
                    return builderResult.hasDefaultCord
                }
            }
            @discardableResult
            public func setDefaultCord(_ value:String) -> ProtobufUnittest.TestAllTypes.Builder {
                self.defaultCord = value
                return self
            }
            @discardableResult
            public func clearDefaultCord() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasDefaultCord = false
                builderResult.defaultCord = "123"
                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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.oneofUint32 = value
                return self
            }
            @discardableResult
            public func clearOneofUint32() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasOneofUint32 = false
                builderResult.oneofUint32 = nil
                return self
            }
            public var oneofNestedMessage:ProtobufUnittest.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_:ProtobufUnittest.TestAllTypes.NestedMessage.Builder! {
                didSet {
                    builderResult.hasOneofNestedMessage = true
                }
            }
            public func getOneofNestedMessageBuilder() -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                if oneofNestedMessageBuilder_ == nil {
                    oneofNestedMessageBuilder_ = ProtobufUnittest.TestAllTypes.NestedMessage.Builder()
                    builderResult.oneofNestedMessage = oneofNestedMessageBuilder_.getMessage()
                    if oneofNestedMessage != nil {
                        try! oneofNestedMessageBuilder_.mergeFrom(other: oneofNestedMessage)
                    }
                }
                return oneofNestedMessageBuilder_
            }
            @discardableResult
            public func setOneofNestedMessage(_ value:ProtobufUnittest.TestAllTypes.NestedMessage!) -> ProtobufUnittest.TestAllTypes.Builder {
                self.oneofNestedMessage = value
                return self
            }
            @discardableResult
            public func mergeOneofNestedMessage(value:ProtobufUnittest.TestAllTypes.NestedMessage) throws -> ProtobufUnittest.TestAllTypes.Builder {
                if builderResult.hasOneofNestedMessage {
                    builderResult.oneofNestedMessage = try ProtobufUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:builderResult.oneofNestedMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.oneofNestedMessage = value
                }
                builderResult.hasOneofNestedMessage = true
                return self
            }
            @discardableResult
            public func clearOneofNestedMessage() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.oneofString = value
                return self
            }
            @discardableResult
            public func clearOneofString() -> ProtobufUnittest.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) -> ProtobufUnittest.TestAllTypes.Builder {
                self.oneofBytes = value
                return self
            }
            @discardableResult
            public func clearOneofBytes() -> ProtobufUnittest.TestAllTypes.Builder{
                builderResult.hasOneofBytes = false
                builderResult.oneofBytes = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestAllTypes.Builder {
                builderResult = ProtobufUnittest.TestAllTypes()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestAllTypes.Builder {
                return try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestAllTypes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestAllTypes {
                let returnMe:ProtobufUnittest.TestAllTypes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestAllTypes.Builder {
                if other == ProtobufUnittest.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.hasOptionalGroup) {
                    try mergeOptionalGroup(value: other.optionalGroup)
                }
                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.hasOptionalImportEnum {
                    optionalImportEnum = other.optionalImportEnum
                }
                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.repeatedGroup.isEmpty  {
                     builderResult.repeatedGroup += other.repeatedGroup
                }
                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.repeatedImportEnum.isEmpty {
                     builderResult.repeatedImportEnum += other.repeatedImportEnum
                }
                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.hasDefaultInt32 {
                    defaultInt32 = other.defaultInt32
                }
                if other.hasDefaultInt64 {
                    defaultInt64 = other.defaultInt64
                }
                if other.hasDefaultUint32 {
                    defaultUint32 = other.defaultUint32
                }
                if other.hasDefaultUint64 {
                    defaultUint64 = other.defaultUint64
                }
                if other.hasDefaultSint32 {
                    defaultSint32 = other.defaultSint32
                }
                if other.hasDefaultSint64 {
                    defaultSint64 = other.defaultSint64
                }
                if other.hasDefaultFixed32 {
                    defaultFixed32 = other.defaultFixed32
                }
                if other.hasDefaultFixed64 {
                    defaultFixed64 = other.defaultFixed64
                }
                if other.hasDefaultSfixed32 {
                    defaultSfixed32 = other.defaultSfixed32
                }
                if other.hasDefaultSfixed64 {
                    defaultSfixed64 = other.defaultSfixed64
                }
                if other.hasDefaultFloat {
                    defaultFloat = other.defaultFloat
                }
                if other.hasDefaultDouble {
                    defaultDouble = other.defaultDouble
                }
                if other.hasDefaultBool {
                    defaultBool = other.defaultBool
                }
                if other.hasDefaultString {
                    defaultString = other.defaultString
                }
                if other.hasDefaultBytes {
                    defaultBytes = other.defaultBytes
                }
                if other.hasDefaultNestedEnum {
                    defaultNestedEnum = other.defaultNestedEnum
                }
                if other.hasDefaultForeignEnum {
                    defaultForeignEnum = other.defaultForeignEnum
                }
                if other.hasDefaultImportEnum {
                    defaultImportEnum = other.defaultImportEnum
                }
                if other.hasDefaultStringPiece {
                    defaultStringPiece = other.defaultStringPiece
                }
                if other.hasDefaultCord {
                    defaultCord = other.defaultCord
                }
                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 -> ProtobufUnittest.TestAllTypes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.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 131:
                        let subBuilder:ProtobufUnittest.TestAllTypes.OptionalGroup.Builder = ProtobufUnittest.TestAllTypes.OptionalGroup.Builder()
                        if hasOptionalGroup {
                            try subBuilder.mergeFrom(other: optionalGroup)
                        }
                        try codedInputStream.readGroup(fieldNumber: 16, builder:subBuilder, extensionRegistry:extensionRegistry)
                        optionalGroup = subBuilder.buildPartial()

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

                    case 154:
                        let subBuilder:ProtobufUnittest.ForeignMessage.Builder = ProtobufUnittest.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 = ProtobufUnittest.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 = ProtobufUnittest.ForeignEnum(rawValue:valueIntoptionalForeignEnum){
                            optionalForeignEnum = enumsoptionalForeignEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 22, value:Int64(valueIntoptionalForeignEnum))
                        }

                    case 184:
                        let valueIntoptionalImportEnum = try codedInputStream.readEnum()
                        if let enumsoptionalImportEnum = ProtobufUnittestImport.ImportEnum(rawValue:valueIntoptionalImportEnum){
                            optionalImportEnum = enumsoptionalImportEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 23, value:Int64(valueIntoptionalImportEnum))
                        }

                    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:ProtobufUnittest.TestAllTypes.NestedMessage.Builder = ProtobufUnittest.TestAllTypes.NestedMessage.Builder()
                        if hasOptionalLazyMessage {
                            try subBuilder.mergeFrom(other: optionalLazyMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalLazyMessage = subBuilder.buildPartial()

                    case 248:
                        repeatedInt32 += [try codedInputStream.readInt32()]

                    case 256:
                        repeatedInt64 += [try codedInputStream.readInt64()]

                    case 264:
                        repeatedUint32 += [try codedInputStream.readUInt32()]

                    case 272:
                        repeatedUint64 += [try codedInputStream.readUInt64()]

                    case 280:
                        repeatedSint32 += [try codedInputStream.readSInt32()]

                    case 288:
                        repeatedSint64 += [try codedInputStream.readSInt64()]

                    case 301:
                        repeatedFixed32 += [try codedInputStream.readFixed32()]

                    case 305:
                        repeatedFixed64 += [try codedInputStream.readFixed64()]

                    case 317:
                        repeatedSfixed32 += [try codedInputStream.readSFixed32()]

                    case 321:
                        repeatedSfixed64 += [try codedInputStream.readSFixed64()]

                    case 333:
                        repeatedFloat += [try codedInputStream.readFloat()]

                    case 337:
                        repeatedDouble += [try codedInputStream.readDouble()]

                    case 344:
                        repeatedBool += [try codedInputStream.readBool()]

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

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

                    case 371:
                        let subBuilder = ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder()
                        try codedInputStream.readGroup(fieldNumber:46, builder:subBuilder,extensionRegistry:extensionRegistry)
                        repeatedGroup.append(subBuilder.buildPartial())

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

                    case 394:
                        let subBuilder = ProtobufUnittest.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 408:
                        let valueIntrepeatedNestedEnum = try codedInputStream.readEnum()
                        if let enumsrepeatedNestedEnum = ProtobufUnittest.TestAllTypes.NestedEnum(rawValue:valueIntrepeatedNestedEnum) {
                            builderResult.repeatedNestedEnum.append(enumsrepeatedNestedEnum)
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 51, value:Int64(valueIntrepeatedNestedEnum))
                        }

                    case 416:
                        let valueIntrepeatedForeignEnum = try codedInputStream.readEnum()
                        if let enumsrepeatedForeignEnum = ProtobufUnittest.ForeignEnum(rawValue:valueIntrepeatedForeignEnum) {
                            builderResult.repeatedForeignEnum.append(enumsrepeatedForeignEnum)
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 52, value:Int64(valueIntrepeatedForeignEnum))
                        }

                    case 424:
                        let valueIntrepeatedImportEnum = try codedInputStream.readEnum()
                        if let enumsrepeatedImportEnum = ProtobufUnittestImport.ImportEnum(rawValue:valueIntrepeatedImportEnum) {
                            builderResult.repeatedImportEnum.append(enumsrepeatedImportEnum)
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 53, value:Int64(valueIntrepeatedImportEnum))
                        }

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

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

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

                    case 488:
                        defaultInt32 = try codedInputStream.readInt32()

                    case 496:
                        defaultInt64 = try codedInputStream.readInt64()

                    case 504:
                        defaultUint32 = try codedInputStream.readUInt32()

                    case 512:
                        defaultUint64 = try codedInputStream.readUInt64()

                    case 520:
                        defaultSint32 = try codedInputStream.readSInt32()

                    case 528:
                        defaultSint64 = try codedInputStream.readSInt64()

                    case 541:
                        defaultFixed32 = try codedInputStream.readFixed32()

                    case 545:
                        defaultFixed64 = try codedInputStream.readFixed64()

                    case 557:
                        defaultSfixed32 = try codedInputStream.readSFixed32()

                    case 561:
                        defaultSfixed64 = try codedInputStream.readSFixed64()

                    case 573:
                        defaultFloat = try codedInputStream.readFloat()

                    case 577:
                        defaultDouble = try codedInputStream.readDouble()

                    case 584:
                        defaultBool = try codedInputStream.readBool()

                    case 594:
                        defaultString = try codedInputStream.readString()

                    case 602:
                        defaultBytes = try codedInputStream.readData()

                    case 648:
                        let valueIntdefaultNestedEnum = try codedInputStream.readEnum()
                        if let enumsdefaultNestedEnum = ProtobufUnittest.TestAllTypes.NestedEnum(rawValue:valueIntdefaultNestedEnum){
                            defaultNestedEnum = enumsdefaultNestedEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 81, value:Int64(valueIntdefaultNestedEnum))
                        }

                    case 656:
                        let valueIntdefaultForeignEnum = try codedInputStream.readEnum()
                        if let enumsdefaultForeignEnum = ProtobufUnittest.ForeignEnum(rawValue:valueIntdefaultForeignEnum){
                            defaultForeignEnum = enumsdefaultForeignEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 82, value:Int64(valueIntdefaultForeignEnum))
                        }

                    case 664:
                        let valueIntdefaultImportEnum = try codedInputStream.readEnum()
                        if let enumsdefaultImportEnum = ProtobufUnittestImport.ImportEnum(rawValue:valueIntdefaultImportEnum){
                            defaultImportEnum = enumsdefaultImportEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 83, value:Int64(valueIntdefaultImportEnum))
                        }

                    case 674:
                        defaultStringPiece = try codedInputStream.readString()

                    case 682:
                        defaultCord = try codedInputStream.readString()

                    case 888:
                        oneofUint32 = try codedInputStream.readUInt32()

                    case 898:
                        let subBuilder:ProtobufUnittest.TestAllTypes.NestedMessage.Builder = ProtobufUnittest.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 -> ProtobufUnittest.TestAllTypes.Builder {
                let resultDecodedBuilder = ProtobufUnittest.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 jsonValueOptionalGroup = jsonMap["optionalgroup"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalGroup = try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder.decodeToBuilder(jsonMap:jsonValueOptionalGroup).build()

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

                }
                if let jsonValueOptionalForeignMessage = jsonMap["optionalForeignMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalForeignMessage = try ProtobufUnittest.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 ProtobufUnittest.TestAllTypes.NestedEnum.fromString(jsonValueOptionalNestedEnum)
                }
                if let jsonValueOptionalForeignEnum = jsonMap["optionalForeignEnum"] as? String {
                    resultDecodedBuilder.optionalForeignEnum = try ProtobufUnittest.ForeignEnum.fromString(jsonValueOptionalForeignEnum)
                }
                if let jsonValueOptionalImportEnum = jsonMap["optionalImportEnum"] as? String {
                    resultDecodedBuilder.optionalImportEnum = try ProtobufUnittestImport.ImportEnum.fromString(jsonValueOptionalImportEnum)
                }
                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 ProtobufUnittest.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 jsonValueRepeatedGroup = jsonMap["repeatedgroup"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedGroup:Array<ProtobufUnittest.TestAllTypes.RepeatedGroup> = []
                    for oneValueRepeatedGroup in jsonValueRepeatedGroup {
                        let messageFromStringRepeatedGroup = try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder.decodeToBuilder(jsonMap:oneValueRepeatedGroup).build()

                        jsonArrayRepeatedGroup.append(messageFromStringRepeatedGroup)
                    }
                    resultDecodedBuilder.repeatedGroup = jsonArrayRepeatedGroup
                }
                if let jsonValueRepeatedNestedMessage = jsonMap["repeatedNestedMessage"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedNestedMessage:Array<ProtobufUnittest.TestAllTypes.NestedMessage> = []
                    for oneValueRepeatedNestedMessage in jsonValueRepeatedNestedMessage {
                        let messageFromStringRepeatedNestedMessage = try ProtobufUnittest.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<ProtobufUnittest.ForeignMessage> = []
                    for oneValueRepeatedForeignMessage in jsonValueRepeatedForeignMessage {
                        let messageFromStringRepeatedForeignMessage = try ProtobufUnittest.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<ProtobufUnittest.TestAllTypes.NestedEnum> = []
                    for oneValueRepeatedNestedEnum in jsonValueRepeatedNestedEnum {
                        let enumFromStringRepeatedNestedEnum = try ProtobufUnittest.TestAllTypes.NestedEnum.fromString(oneValueRepeatedNestedEnum)
                        jsonArrayRepeatedNestedEnum.append(enumFromStringRepeatedNestedEnum)
                    }
                    resultDecodedBuilder.repeatedNestedEnum = jsonArrayRepeatedNestedEnum
                }
                if let jsonValueRepeatedForeignEnum = jsonMap["repeatedForeignEnum"] as? Array<String> {
                    var jsonArrayRepeatedForeignEnum:Array<ProtobufUnittest.ForeignEnum> = []
                    for oneValueRepeatedForeignEnum in jsonValueRepeatedForeignEnum {
                        let enumFromStringRepeatedForeignEnum = try ProtobufUnittest.ForeignEnum.fromString(oneValueRepeatedForeignEnum)
                        jsonArrayRepeatedForeignEnum.append(enumFromStringRepeatedForeignEnum)
                    }
                    resultDecodedBuilder.repeatedForeignEnum = jsonArrayRepeatedForeignEnum
                }
                if let jsonValueRepeatedImportEnum = jsonMap["repeatedImportEnum"] as? Array<String> {
                    var jsonArrayRepeatedImportEnum:Array<ProtobufUnittestImport.ImportEnum> = []
                    for oneValueRepeatedImportEnum in jsonValueRepeatedImportEnum {
                        let enumFromStringRepeatedImportEnum = try ProtobufUnittestImport.ImportEnum.fromString(oneValueRepeatedImportEnum)
                        jsonArrayRepeatedImportEnum.append(enumFromStringRepeatedImportEnum)
                    }
                    resultDecodedBuilder.repeatedImportEnum = jsonArrayRepeatedImportEnum
                }
                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<ProtobufUnittest.TestAllTypes.NestedMessage> = []
                    for oneValueRepeatedLazyMessage in jsonValueRepeatedLazyMessage {
                        let messageFromStringRepeatedLazyMessage = try ProtobufUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:oneValueRepeatedLazyMessage).build()

                        jsonArrayRepeatedLazyMessage.append(messageFromStringRepeatedLazyMessage)
                    }
                    resultDecodedBuilder.repeatedLazyMessage = jsonArrayRepeatedLazyMessage
                }
                if let jsonValueDefaultInt32 = jsonMap["defaultInt32"] as? Int {
                    resultDecodedBuilder.defaultInt32 = Int32(jsonValueDefaultInt32)
                } else if let jsonValueDefaultInt32 = jsonMap["defaultInt32"] as? String {
                    resultDecodedBuilder.defaultInt32 = Int32(jsonValueDefaultInt32)!
                }
                if let jsonValueDefaultInt64 = jsonMap["defaultInt64"] as? String {
                    resultDecodedBuilder.defaultInt64 = Int64(jsonValueDefaultInt64)!
                } else if let jsonValueDefaultInt64 = jsonMap["defaultInt64"] as? Int {
                    resultDecodedBuilder.defaultInt64 = Int64(jsonValueDefaultInt64)
                }
                if let jsonValueDefaultUint32 = jsonMap["defaultUint32"] as? UInt {
                    resultDecodedBuilder.defaultUint32 = UInt32(jsonValueDefaultUint32)
                } else if let jsonValueDefaultUint32 = jsonMap["defaultUint32"] as? String {
                    resultDecodedBuilder.defaultUint32 = UInt32(jsonValueDefaultUint32)!
                }
                if let jsonValueDefaultUint64 = jsonMap["defaultUint64"] as? String {
                    resultDecodedBuilder.defaultUint64 = UInt64(jsonValueDefaultUint64)!
                } else if let jsonValueDefaultUint64 = jsonMap["defaultUint64"] as? UInt {
                    resultDecodedBuilder.defaultUint64 = UInt64(jsonValueDefaultUint64)
                }
                if let jsonValueDefaultSint32 = jsonMap["defaultSint32"] as? Int {
                    resultDecodedBuilder.defaultSint32 = Int32(jsonValueDefaultSint32)
                } else if let jsonValueDefaultSint32 = jsonMap["defaultSint32"] as? String {
                    resultDecodedBuilder.defaultSint32 = Int32(jsonValueDefaultSint32)!
                }
                if let jsonValueDefaultSint64 = jsonMap["defaultSint64"] as? String {
                    resultDecodedBuilder.defaultSint64 = Int64(jsonValueDefaultSint64)!
                } else if let jsonValueDefaultSint64 = jsonMap["defaultSint64"] as? Int {
                    resultDecodedBuilder.defaultSint64 = Int64(jsonValueDefaultSint64)
                }
                if let jsonValueDefaultFixed32 = jsonMap["defaultFixed32"] as? UInt {
                    resultDecodedBuilder.defaultFixed32 = UInt32(jsonValueDefaultFixed32)
                } else if let jsonValueDefaultFixed32 = jsonMap["defaultFixed32"] as? String {
                    resultDecodedBuilder.defaultFixed32 = UInt32(jsonValueDefaultFixed32)!
                }
                if let jsonValueDefaultFixed64 = jsonMap["defaultFixed64"] as? String {
                    resultDecodedBuilder.defaultFixed64 = UInt64(jsonValueDefaultFixed64)!
                } else if let jsonValueDefaultFixed64 = jsonMap["defaultFixed64"] as? UInt {
                    resultDecodedBuilder.defaultFixed64 = UInt64(jsonValueDefaultFixed64)
                }
                if let jsonValueDefaultSfixed32 = jsonMap["defaultSfixed32"] as? Int {
                    resultDecodedBuilder.defaultSfixed32 = Int32(jsonValueDefaultSfixed32)
                } else if let jsonValueDefaultSfixed32 = jsonMap["defaultSfixed32"] as? String {
                    resultDecodedBuilder.defaultSfixed32 = Int32(jsonValueDefaultSfixed32)!
                }
                if let jsonValueDefaultSfixed64 = jsonMap["defaultSfixed64"] as? String {
                    resultDecodedBuilder.defaultSfixed64 = Int64(jsonValueDefaultSfixed64)!
                } else if let jsonValueDefaultSfixed64 = jsonMap["defaultSfixed64"] as? Int {
                    resultDecodedBuilder.defaultSfixed64 = Int64(jsonValueDefaultSfixed64)
                }
                if let jsonValueDefaultFloat = jsonMap["defaultFloat"] as? Float {
                    resultDecodedBuilder.defaultFloat = Float(jsonValueDefaultFloat)
                } else if let jsonValueDefaultFloat = jsonMap["defaultFloat"] as? String {
                    resultDecodedBuilder.defaultFloat = Float(jsonValueDefaultFloat)!
                }
                if let jsonValueDefaultDouble = jsonMap["defaultDouble"] as? Double {
                    resultDecodedBuilder.defaultDouble = Double(jsonValueDefaultDouble)
                } else if let jsonValueDefaultDouble = jsonMap["defaultDouble"] as? String {
                    resultDecodedBuilder.defaultDouble = Double(jsonValueDefaultDouble)!
                }
                if let jsonValueDefaultBool = jsonMap["defaultBool"] as? Bool {
                    resultDecodedBuilder.defaultBool = jsonValueDefaultBool
                }
                if let jsonValueDefaultString = jsonMap["defaultString"] as? String {
                    resultDecodedBuilder.defaultString = jsonValueDefaultString
                }
                if let jsonValueDefaultBytes = jsonMap["defaultBytes"] as? String {
                    resultDecodedBuilder.defaultBytes = Data(base64Encoded:jsonValueDefaultBytes, options: Data.Base64DecodingOptions(rawValue:0))!
                }
                if let jsonValueDefaultNestedEnum = jsonMap["defaultNestedEnum"] as? String {
                    resultDecodedBuilder.defaultNestedEnum = try ProtobufUnittest.TestAllTypes.NestedEnum.fromString(jsonValueDefaultNestedEnum)
                }
                if let jsonValueDefaultForeignEnum = jsonMap["defaultForeignEnum"] as? String {
                    resultDecodedBuilder.defaultForeignEnum = try ProtobufUnittest.ForeignEnum.fromString(jsonValueDefaultForeignEnum)
                }
                if let jsonValueDefaultImportEnum = jsonMap["defaultImportEnum"] as? String {
                    resultDecodedBuilder.defaultImportEnum = try ProtobufUnittestImport.ImportEnum.fromString(jsonValueDefaultImportEnum)
                }
                if let jsonValueDefaultStringPiece = jsonMap["defaultStringPiece"] as? String {
                    resultDecodedBuilder.defaultStringPiece = jsonValueDefaultStringPiece
                }
                if let jsonValueDefaultCord = jsonMap["defaultCord"] as? String {
                    resultDecodedBuilder.defaultCord = jsonValueDefaultCord
                }
                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 ProtobufUnittest.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 -> ProtobufUnittest.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 ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

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

        public static func == (lhs: ProtobufUnittest.NestedTestAllTypes, rhs: ProtobufUnittest.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.repeatedChild == rhs.repeatedChild)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var child:ProtobufUnittest.NestedTestAllTypes!
        public fileprivate(set) var hasChild:Bool = false
        public fileprivate(set) var payload:ProtobufUnittest.TestAllTypes!
        public fileprivate(set) var hasPayload:Bool = false
        public fileprivate(set) var repeatedChild:Array<ProtobufUnittest.NestedTestAllTypes>  = Array<ProtobufUnittest.NestedTestAllTypes>()
        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)
            }
            for oneElementRepeatedChild in repeatedChild {
                  try codedOutputStream.writeMessage(fieldNumber: 3, value:oneElementRepeatedChild)
            }
            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
                }
            }
            for oneElementRepeatedChild in repeatedChild {
                serialize_size += oneElementRepeatedChild.computeMessageSize(fieldNumber: 3)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.NestedTestAllTypes.Builder {
            return ProtobufUnittest.NestedTestAllTypes.classBuilder() as! ProtobufUnittest.NestedTestAllTypes.Builder
        }
        public func getBuilder() -> ProtobufUnittest.NestedTestAllTypes.Builder {
            return classBuilder() as! ProtobufUnittest.NestedTestAllTypes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.NestedTestAllTypes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.NestedTestAllTypes.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.NestedTestAllTypes.Builder {
            return try ProtobufUnittest.NestedTestAllTypes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.NestedTestAllTypes) throws -> ProtobufUnittest.NestedTestAllTypes.Builder {
            return try ProtobufUnittest.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()
            }
            if !repeatedChild.isEmpty {
                var jsonArrayRepeatedChild:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedChild in repeatedChild {
                    let ecodedMessageRepeatedChild = try oneValueRepeatedChild.encode()
                    jsonArrayRepeatedChild.append(ecodedMessageRepeatedChild)
                }
                jsonMap["repeatedChild"] = jsonArrayRepeatedChild
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.NestedTestAllTypes {
            return try ProtobufUnittest.NestedTestAllTypes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.NestedTestAllTypes {
            return try ProtobufUnittest.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"
            }
            var repeatedChildElementIndex:Int = 0
            for oneElementRepeatedChild in repeatedChild {
                output += "\(indent) repeatedChild[\(repeatedChildElementIndex)] {\n"
                output += try oneElementRepeatedChild.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedChildElementIndex += 1
            }
            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
                    }
                }
                for oneElementRepeatedChild in repeatedChild {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedChild.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var child:ProtobufUnittest.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_:ProtobufUnittest.NestedTestAllTypes.Builder! {
                didSet {
                    builderResult.hasChild = true
                }
            }
            public func getChildBuilder() -> ProtobufUnittest.NestedTestAllTypes.Builder {
                if childBuilder_ == nil {
                    childBuilder_ = ProtobufUnittest.NestedTestAllTypes.Builder()
                    builderResult.child = childBuilder_.getMessage()
                    if child != nil {
                        try! childBuilder_.mergeFrom(other: child)
                    }
                }
                return childBuilder_
            }
            @discardableResult
            public func setChild(_ value:ProtobufUnittest.NestedTestAllTypes!) -> ProtobufUnittest.NestedTestAllTypes.Builder {
                self.child = value
                return self
            }
            @discardableResult
            public func mergeChild(value:ProtobufUnittest.NestedTestAllTypes) throws -> ProtobufUnittest.NestedTestAllTypes.Builder {
                if builderResult.hasChild {
                    builderResult.child = try ProtobufUnittest.NestedTestAllTypes.builderWithPrototype(prototype:builderResult.child).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.child = value
                }
                builderResult.hasChild = true
                return self
            }
            @discardableResult
            public func clearChild() -> ProtobufUnittest.NestedTestAllTypes.Builder {
                childBuilder_ = nil
                builderResult.hasChild = false
                builderResult.child = nil
                return self
            }
            public var payload:ProtobufUnittest.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_:ProtobufUnittest.TestAllTypes.Builder! {
                didSet {
                    builderResult.hasPayload = true
                }
            }
            public func getPayloadBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
                if payloadBuilder_ == nil {
                    payloadBuilder_ = ProtobufUnittest.TestAllTypes.Builder()
                    builderResult.payload = payloadBuilder_.getMessage()
                    if payload != nil {
                        try! payloadBuilder_.mergeFrom(other: payload)
                    }
                }
                return payloadBuilder_
            }
            @discardableResult
            public func setPayload(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.NestedTestAllTypes.Builder {
                self.payload = value
                return self
            }
            @discardableResult
            public func mergePayload(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.NestedTestAllTypes.Builder {
                if builderResult.hasPayload {
                    builderResult.payload = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.payload).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.payload = value
                }
                builderResult.hasPayload = true
                return self
            }
            @discardableResult
            public func clearPayload() -> ProtobufUnittest.NestedTestAllTypes.Builder {
                payloadBuilder_ = nil
                builderResult.hasPayload = false
                builderResult.payload = nil
                return self
            }
            public var repeatedChild:Array<ProtobufUnittest.NestedTestAllTypes> {
                get {
                    return builderResult.repeatedChild
                }
                set (value) {
                    builderResult.repeatedChild = value
                }
            }
            @discardableResult
            public func setRepeatedChild(_ value:Array<ProtobufUnittest.NestedTestAllTypes>) -> ProtobufUnittest.NestedTestAllTypes.Builder {
                self.repeatedChild = value
                return self
            }
            @discardableResult
            public func clearRepeatedChild() -> ProtobufUnittest.NestedTestAllTypes.Builder {
                builderResult.repeatedChild.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.NestedTestAllTypes.Builder {
                builderResult = ProtobufUnittest.NestedTestAllTypes()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.NestedTestAllTypes.Builder {
                return try ProtobufUnittest.NestedTestAllTypes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.NestedTestAllTypes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.NestedTestAllTypes {
                let returnMe:ProtobufUnittest.NestedTestAllTypes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.NestedTestAllTypes) throws -> ProtobufUnittest.NestedTestAllTypes.Builder {
                if other == ProtobufUnittest.NestedTestAllTypes() {
                    return self
                }
                if (other.hasChild) {
                    try mergeChild(value: other.child)
                }
                if (other.hasPayload) {
                    try mergePayload(value: other.payload)
                }
                if !other.repeatedChild.isEmpty  {
                     builderResult.repeatedChild += other.repeatedChild
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.NestedTestAllTypes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.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:ProtobufUnittest.NestedTestAllTypes.Builder = ProtobufUnittest.NestedTestAllTypes.Builder()
                        if hasChild {
                            try subBuilder.mergeFrom(other: child)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        child = subBuilder.buildPartial()

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

                    case 26:
                        let subBuilder = ProtobufUnittest.NestedTestAllTypes.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        repeatedChild.append(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 -> ProtobufUnittest.NestedTestAllTypes.Builder {
                let resultDecodedBuilder = ProtobufUnittest.NestedTestAllTypes.Builder()
                if let jsonValueChild = jsonMap["child"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.child = try ProtobufUnittest.NestedTestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueChild).build()

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

                }
                if let jsonValueRepeatedChild = jsonMap["repeatedChild"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedChild:Array<ProtobufUnittest.NestedTestAllTypes> = []
                    for oneValueRepeatedChild in jsonValueRepeatedChild {
                        let messageFromStringRepeatedChild = try ProtobufUnittest.NestedTestAllTypes.Builder.decodeToBuilder(jsonMap:oneValueRepeatedChild).build()

                        jsonArrayRepeatedChild.append(messageFromStringRepeatedChild)
                    }
                    resultDecodedBuilder.repeatedChild = jsonArrayRepeatedChild
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.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 ProtobufUnittest.NestedTestAllTypes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestDeprecatedFields : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestDeprecatedFields.Builder

        public static func == (lhs: ProtobufUnittest.TestDeprecatedFields, rhs: ProtobufUnittest.TestDeprecatedFields) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasDeprecatedInt32 == rhs.hasDeprecatedInt32) && (!lhs.hasDeprecatedInt32 || lhs.deprecatedInt32 == rhs.deprecatedInt32)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        @available(*, deprecated:0.1, message:"deprecatedInt32 is marked as \"Deprecated\"")
        public fileprivate(set) var deprecatedInt32:Int32! = nil
        public fileprivate(set) var hasDeprecatedInt32:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasDeprecatedInt32 {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:deprecatedInt32)
            }
            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 hasDeprecatedInt32 {
                serialize_size += deprecatedInt32.computeInt32Size(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestDeprecatedFields.Builder {
            return ProtobufUnittest.TestDeprecatedFields.classBuilder() as! ProtobufUnittest.TestDeprecatedFields.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestDeprecatedFields.Builder {
            return classBuilder() as! ProtobufUnittest.TestDeprecatedFields.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestDeprecatedFields.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestDeprecatedFields.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestDeprecatedFields.Builder {
            return try ProtobufUnittest.TestDeprecatedFields.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestDeprecatedFields) throws -> ProtobufUnittest.TestDeprecatedFields.Builder {
            return try ProtobufUnittest.TestDeprecatedFields.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasDeprecatedInt32 {
                jsonMap["deprecatedInt32"] = Int(deprecatedInt32)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestDeprecatedFields {
            return try ProtobufUnittest.TestDeprecatedFields.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDeprecatedFields {
            return try ProtobufUnittest.TestDeprecatedFields.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasDeprecatedInt32 {
                output += "\(indent) deprecatedInt32: \(String(describing: deprecatedInt32)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasDeprecatedInt32 {
                    hashCode = (hashCode &* 31) &+ deprecatedInt32.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var deprecatedInt32:Int32 {
                get {
                    return builderResult.deprecatedInt32
                }
                set (value) {
                    builderResult.hasDeprecatedInt32 = true
                    builderResult.deprecatedInt32 = value
                }
            }
            public var hasDeprecatedInt32:Bool {
                get {
                    return builderResult.hasDeprecatedInt32
                }
            }
            @discardableResult
            public func setDeprecatedInt32(_ value:Int32) -> ProtobufUnittest.TestDeprecatedFields.Builder {
                self.deprecatedInt32 = value
                return self
            }
            @discardableResult
            public func clearDeprecatedInt32() -> ProtobufUnittest.TestDeprecatedFields.Builder{
                builderResult.hasDeprecatedInt32 = false
                builderResult.deprecatedInt32 = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestDeprecatedFields.Builder {
                builderResult = ProtobufUnittest.TestDeprecatedFields()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestDeprecatedFields.Builder {
                return try ProtobufUnittest.TestDeprecatedFields.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestDeprecatedFields {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestDeprecatedFields {
                let returnMe:ProtobufUnittest.TestDeprecatedFields = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestDeprecatedFields) throws -> ProtobufUnittest.TestDeprecatedFields.Builder {
                if other == ProtobufUnittest.TestDeprecatedFields() {
                    return self
                }
                if other.hasDeprecatedInt32 {
                    deprecatedInt32 = other.deprecatedInt32
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDeprecatedFields.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDeprecatedFields.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:
                        deprecatedInt32 = 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 -> ProtobufUnittest.TestDeprecatedFields.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestDeprecatedFields.Builder()
                if let jsonValueDeprecatedInt32 = jsonMap["deprecatedInt32"] as? Int {
                    resultDecodedBuilder.deprecatedInt32 = Int32(jsonValueDeprecatedInt32)
                } else if let jsonValueDeprecatedInt32 = jsonMap["deprecatedInt32"] as? String {
                    resultDecodedBuilder.deprecatedInt32 = Int32(jsonValueDeprecatedInt32)!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDeprecatedFields.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 ProtobufUnittest.TestDeprecatedFields.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

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

        public static func == (lhs: ProtobufUnittest.ForeignMessage, rhs: ProtobufUnittest.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() -> ProtobufUnittest.ForeignMessage.Builder {
            return ProtobufUnittest.ForeignMessage.classBuilder() as! ProtobufUnittest.ForeignMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.ForeignMessage.Builder {
            return classBuilder() as! ProtobufUnittest.ForeignMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.ForeignMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.ForeignMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.ForeignMessage.Builder {
            return try ProtobufUnittest.ForeignMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.ForeignMessage) throws -> ProtobufUnittest.ForeignMessage.Builder {
            return try ProtobufUnittest.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 -> ProtobufUnittest.ForeignMessage {
            return try ProtobufUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.ForeignMessage {
            return try ProtobufUnittest.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 "ProtobufUnittest.ForeignMessage"
        }
        override public func className() -> String {
            return "ProtobufUnittest.ForeignMessage"
        }
        //Meta information declaration end

        final public class Builder : GeneratedMessageBuilder {
            fileprivate var builderResult:ProtobufUnittest.ForeignMessage = ProtobufUnittest.ForeignMessage()
            public func getMessage() -> ProtobufUnittest.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) -> ProtobufUnittest.ForeignMessage.Builder {
                self.c = value
                return self
            }
            @discardableResult
            public func clearC() -> ProtobufUnittest.ForeignMessage.Builder{
                builderResult.hasC = false
                builderResult.c = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.ForeignMessage.Builder {
                builderResult = ProtobufUnittest.ForeignMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.ForeignMessage.Builder {
                return try ProtobufUnittest.ForeignMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.ForeignMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.ForeignMessage {
                let returnMe:ProtobufUnittest.ForeignMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.ForeignMessage) throws -> ProtobufUnittest.ForeignMessage.Builder {
                if other == ProtobufUnittest.ForeignMessage() {
                    return self
                }
                if other.hasC {
                    c = other.c
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ForeignMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.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 -> ProtobufUnittest.ForeignMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.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 -> ProtobufUnittest.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 ProtobufUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestReservedFields : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestReservedFields.Builder

        public static func == (lhs: ProtobufUnittest.TestReservedFields, rhs: ProtobufUnittest.TestReservedFields) -> 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() -> ProtobufUnittest.TestReservedFields.Builder {
            return ProtobufUnittest.TestReservedFields.classBuilder() as! ProtobufUnittest.TestReservedFields.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestReservedFields.Builder {
            return classBuilder() as! ProtobufUnittest.TestReservedFields.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestReservedFields.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestReservedFields.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestReservedFields.Builder {
            return try ProtobufUnittest.TestReservedFields.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestReservedFields) throws -> ProtobufUnittest.TestReservedFields.Builder {
            return try ProtobufUnittest.TestReservedFields.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 -> ProtobufUnittest.TestReservedFields {
            return try ProtobufUnittest.TestReservedFields.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestReservedFields {
            return try ProtobufUnittest.TestReservedFields.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 "ProtobufUnittest.TestReservedFields"
        }
        override public func className() -> String {
            return "ProtobufUnittest.TestReservedFields"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestReservedFields.Builder {
                builderResult = ProtobufUnittest.TestReservedFields()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestReservedFields.Builder {
                return try ProtobufUnittest.TestReservedFields.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestReservedFields {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestReservedFields {
                let returnMe:ProtobufUnittest.TestReservedFields = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestReservedFields) throws -> ProtobufUnittest.TestReservedFields.Builder {
                if other == ProtobufUnittest.TestReservedFields() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestReservedFields.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestReservedFields.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 -> ProtobufUnittest.TestReservedFields.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestReservedFields.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestReservedFields.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 ProtobufUnittest.TestReservedFields.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestAllExtensions : ExtendableMessage {
        public typealias BuilderType = ProtobufUnittest.TestAllExtensions.Builder

        public static func == (lhs: ProtobufUnittest.TestAllExtensions, rhs: ProtobufUnittest.TestAllExtensions) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:1, endExclusive:536870912)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            try extensionsAreInitialized()}
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:1, endExclusive:536870912)
            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 += extensionsSerializedSize()
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestAllExtensions.Builder {
            return ProtobufUnittest.TestAllExtensions.classBuilder() as! ProtobufUnittest.TestAllExtensions.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestAllExtensions.Builder {
            return classBuilder() as! ProtobufUnittest.TestAllExtensions.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestAllExtensions.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestAllExtensions.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestAllExtensions.Builder {
            return try ProtobufUnittest.TestAllExtensions.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestAllExtensions) throws -> ProtobufUnittest.TestAllExtensions.Builder {
            return try ProtobufUnittest.TestAllExtensions.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 -> ProtobufUnittest.TestAllExtensions {
            return try ProtobufUnittest.TestAllExtensions.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestAllExtensions {
            return try ProtobufUnittest.TestAllExtensions.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            output += try getExtensionDescription(startInclusive:1, endExclusive:536870912, indent:indent)
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 1, endExclusive:536870912))
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

        final public class Builder : ExtendableMessageBuilder {
            fileprivate var builderResult:ProtobufUnittest.TestAllExtensions = ProtobufUnittest.TestAllExtensions()
            public func getMessage() -> ProtobufUnittest.TestAllExtensions {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            override public var internalGetResult:ExtendableMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestAllExtensions.Builder {
                builderResult = ProtobufUnittest.TestAllExtensions()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestAllExtensions.Builder {
                return try ProtobufUnittest.TestAllExtensions.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestAllExtensions {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestAllExtensions {
                let returnMe:ProtobufUnittest.TestAllExtensions = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestAllExtensions) throws -> ProtobufUnittest.TestAllExtensions.Builder {
                if other == ProtobufUnittest.TestAllExtensions() {
                    return self
                }
                try mergeExtensionFields(other: other)
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestAllExtensions.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllExtensions.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 -> ProtobufUnittest.TestAllExtensions.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestAllExtensions.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestAllExtensions.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 ProtobufUnittest.TestAllExtensions.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class OptionalGroupExtension : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.OptionalGroupExtension.Builder

        public static func == (lhs: ProtobufUnittest.OptionalGroupExtension, rhs: ProtobufUnittest.OptionalGroupExtension) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var a:Int32! = nil
        public fileprivate(set) var hasA:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasA {
                try codedOutputStream.writeInt32(fieldNumber: 17, value:a)
            }
            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 hasA {
                serialize_size += a.computeInt32Size(fieldNumber: 17)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.OptionalGroupExtension.Builder {
            return ProtobufUnittest.OptionalGroupExtension.classBuilder() as! ProtobufUnittest.OptionalGroupExtension.Builder
        }
        public func getBuilder() -> ProtobufUnittest.OptionalGroupExtension.Builder {
            return classBuilder() as! ProtobufUnittest.OptionalGroupExtension.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.OptionalGroupExtension.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.OptionalGroupExtension.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.OptionalGroupExtension.Builder {
            return try ProtobufUnittest.OptionalGroupExtension.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.OptionalGroupExtension) throws -> ProtobufUnittest.OptionalGroupExtension.Builder {
            return try ProtobufUnittest.OptionalGroupExtension.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasA {
                jsonMap["a"] = Int(a)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.OptionalGroupExtension {
            return try ProtobufUnittest.OptionalGroupExtension.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.OptionalGroupExtension {
            return try ProtobufUnittest.OptionalGroupExtension.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasA {
                output += "\(indent) a: \(String(describing: a)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasA {
                    hashCode = (hashCode &* 31) &+ a.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var a:Int32 {
                get {
                    return builderResult.a
                }
                set (value) {
                    builderResult.hasA = true
                    builderResult.a = value
                }
            }
            public var hasA:Bool {
                get {
                    return builderResult.hasA
                }
            }
            @discardableResult
            public func setA(_ value:Int32) -> ProtobufUnittest.OptionalGroupExtension.Builder {
                self.a = value
                return self
            }
            @discardableResult
            public func clearA() -> ProtobufUnittest.OptionalGroupExtension.Builder{
                builderResult.hasA = false
                builderResult.a = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.OptionalGroupExtension.Builder {
                builderResult = ProtobufUnittest.OptionalGroupExtension()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.OptionalGroupExtension.Builder {
                return try ProtobufUnittest.OptionalGroupExtension.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.OptionalGroupExtension {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.OptionalGroupExtension {
                let returnMe:ProtobufUnittest.OptionalGroupExtension = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.OptionalGroupExtension) throws -> ProtobufUnittest.OptionalGroupExtension.Builder {
                if other == ProtobufUnittest.OptionalGroupExtension() {
                    return self
                }
                if other.hasA {
                    a = other.a
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.OptionalGroupExtension.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OptionalGroupExtension.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 136:
                        a = 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 -> ProtobufUnittest.OptionalGroupExtension.Builder {
                let resultDecodedBuilder = ProtobufUnittest.OptionalGroupExtension.Builder()
                if let jsonValueA = jsonMap["a"] as? Int {
                    resultDecodedBuilder.a = Int32(jsonValueA)
                } else if let jsonValueA = jsonMap["a"] as? String {
                    resultDecodedBuilder.a = Int32(jsonValueA)!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.OptionalGroupExtension.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 ProtobufUnittest.OptionalGroupExtension.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class RepeatedGroupExtension : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.RepeatedGroupExtension.Builder

        public static func == (lhs: ProtobufUnittest.RepeatedGroupExtension, rhs: ProtobufUnittest.RepeatedGroupExtension) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var a:Int32! = nil
        public fileprivate(set) var hasA:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasA {
                try codedOutputStream.writeInt32(fieldNumber: 47, value:a)
            }
            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 hasA {
                serialize_size += a.computeInt32Size(fieldNumber: 47)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.RepeatedGroupExtension.Builder {
            return ProtobufUnittest.RepeatedGroupExtension.classBuilder() as! ProtobufUnittest.RepeatedGroupExtension.Builder
        }
        public func getBuilder() -> ProtobufUnittest.RepeatedGroupExtension.Builder {
            return classBuilder() as! ProtobufUnittest.RepeatedGroupExtension.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.RepeatedGroupExtension.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.RepeatedGroupExtension.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.RepeatedGroupExtension.Builder {
            return try ProtobufUnittest.RepeatedGroupExtension.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.RepeatedGroupExtension) throws -> ProtobufUnittest.RepeatedGroupExtension.Builder {
            return try ProtobufUnittest.RepeatedGroupExtension.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasA {
                jsonMap["a"] = Int(a)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.RepeatedGroupExtension {
            return try ProtobufUnittest.RepeatedGroupExtension.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.RepeatedGroupExtension {
            return try ProtobufUnittest.RepeatedGroupExtension.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasA {
                output += "\(indent) a: \(String(describing: a)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasA {
                    hashCode = (hashCode &* 31) &+ a.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var a:Int32 {
                get {
                    return builderResult.a
                }
                set (value) {
                    builderResult.hasA = true
                    builderResult.a = value
                }
            }
            public var hasA:Bool {
                get {
                    return builderResult.hasA
                }
            }
            @discardableResult
            public func setA(_ value:Int32) -> ProtobufUnittest.RepeatedGroupExtension.Builder {
                self.a = value
                return self
            }
            @discardableResult
            public func clearA() -> ProtobufUnittest.RepeatedGroupExtension.Builder{
                builderResult.hasA = false
                builderResult.a = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.RepeatedGroupExtension.Builder {
                builderResult = ProtobufUnittest.RepeatedGroupExtension()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.RepeatedGroupExtension.Builder {
                return try ProtobufUnittest.RepeatedGroupExtension.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.RepeatedGroupExtension {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.RepeatedGroupExtension {
                let returnMe:ProtobufUnittest.RepeatedGroupExtension = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.RepeatedGroupExtension) throws -> ProtobufUnittest.RepeatedGroupExtension.Builder {
                if other == ProtobufUnittest.RepeatedGroupExtension() {
                    return self
                }
                if other.hasA {
                    a = other.a
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.RepeatedGroupExtension.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.RepeatedGroupExtension.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 376:
                        a = 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 -> ProtobufUnittest.RepeatedGroupExtension.Builder {
                let resultDecodedBuilder = ProtobufUnittest.RepeatedGroupExtension.Builder()
                if let jsonValueA = jsonMap["a"] as? Int {
                    resultDecodedBuilder.a = Int32(jsonValueA)
                } else if let jsonValueA = jsonMap["a"] as? String {
                    resultDecodedBuilder.a = Int32(jsonValueA)!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.RepeatedGroupExtension.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 ProtobufUnittest.RepeatedGroupExtension.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestNestedExtension : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestNestedExtension.Builder

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

        public class func test() -> ConcreateExtensionField {
               return TestNestedExtensiontest
        }
        public class func nestedStringExtension() -> ConcreateExtensionField {
               return TestNestedExtensionnestedStringExtension
        }
        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() -> ProtobufUnittest.TestNestedExtension.Builder {
            return ProtobufUnittest.TestNestedExtension.classBuilder() as! ProtobufUnittest.TestNestedExtension.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestNestedExtension.Builder {
            return classBuilder() as! ProtobufUnittest.TestNestedExtension.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestNestedExtension.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestNestedExtension.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestNestedExtension.Builder {
            return try ProtobufUnittest.TestNestedExtension.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestNestedExtension) throws -> ProtobufUnittest.TestNestedExtension.Builder {
            return try ProtobufUnittest.TestNestedExtension.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 -> ProtobufUnittest.TestNestedExtension {
            return try ProtobufUnittest.TestNestedExtension.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestNestedExtension {
            return try ProtobufUnittest.TestNestedExtension.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 "ProtobufUnittest.TestNestedExtension"
        }
        override public func className() -> String {
            return "ProtobufUnittest.TestNestedExtension"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestNestedExtension.Builder {
                builderResult = ProtobufUnittest.TestNestedExtension()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestNestedExtension.Builder {
                return try ProtobufUnittest.TestNestedExtension.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestNestedExtension {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestNestedExtension {
                let returnMe:ProtobufUnittest.TestNestedExtension = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestNestedExtension) throws -> ProtobufUnittest.TestNestedExtension.Builder {
                if other == ProtobufUnittest.TestNestedExtension() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestNestedExtension.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedExtension.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 -> ProtobufUnittest.TestNestedExtension.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestNestedExtension.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestNestedExtension.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 ProtobufUnittest.TestNestedExtension.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// We have separate messages for testing required fields because it's
    /// annoying to have to fill in required fields in TestProto in order to
    /// do anything with it.  Note that we don't need to test every type of
    /// required filed because the code output is basically identical to
    /// optional fields for all types.
    final public class TestRequired : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestRequired.Builder

        public static func == (lhs: ProtobufUnittest.TestRequired, rhs: ProtobufUnittest.TestRequired) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
            fieldCheck = fieldCheck && (lhs.hasDummy2 == rhs.hasDummy2) && (!lhs.hasDummy2 || lhs.dummy2 == rhs.dummy2)
            fieldCheck = fieldCheck && (lhs.hasB == rhs.hasB) && (!lhs.hasB || lhs.b == rhs.b)
            fieldCheck = fieldCheck && (lhs.hasDummy4 == rhs.hasDummy4) && (!lhs.hasDummy4 || lhs.dummy4 == rhs.dummy4)
            fieldCheck = fieldCheck && (lhs.hasDummy5 == rhs.hasDummy5) && (!lhs.hasDummy5 || lhs.dummy5 == rhs.dummy5)
            fieldCheck = fieldCheck && (lhs.hasDummy6 == rhs.hasDummy6) && (!lhs.hasDummy6 || lhs.dummy6 == rhs.dummy6)
            fieldCheck = fieldCheck && (lhs.hasDummy7 == rhs.hasDummy7) && (!lhs.hasDummy7 || lhs.dummy7 == rhs.dummy7)
            fieldCheck = fieldCheck && (lhs.hasDummy8 == rhs.hasDummy8) && (!lhs.hasDummy8 || lhs.dummy8 == rhs.dummy8)
            fieldCheck = fieldCheck && (lhs.hasDummy9 == rhs.hasDummy9) && (!lhs.hasDummy9 || lhs.dummy9 == rhs.dummy9)
            fieldCheck = fieldCheck && (lhs.hasDummy10 == rhs.hasDummy10) && (!lhs.hasDummy10 || lhs.dummy10 == rhs.dummy10)
            fieldCheck = fieldCheck && (lhs.hasDummy11 == rhs.hasDummy11) && (!lhs.hasDummy11 || lhs.dummy11 == rhs.dummy11)
            fieldCheck = fieldCheck && (lhs.hasDummy12 == rhs.hasDummy12) && (!lhs.hasDummy12 || lhs.dummy12 == rhs.dummy12)
            fieldCheck = fieldCheck && (lhs.hasDummy13 == rhs.hasDummy13) && (!lhs.hasDummy13 || lhs.dummy13 == rhs.dummy13)
            fieldCheck = fieldCheck && (lhs.hasDummy14 == rhs.hasDummy14) && (!lhs.hasDummy14 || lhs.dummy14 == rhs.dummy14)
            fieldCheck = fieldCheck && (lhs.hasDummy15 == rhs.hasDummy15) && (!lhs.hasDummy15 || lhs.dummy15 == rhs.dummy15)
            fieldCheck = fieldCheck && (lhs.hasDummy16 == rhs.hasDummy16) && (!lhs.hasDummy16 || lhs.dummy16 == rhs.dummy16)
            fieldCheck = fieldCheck && (lhs.hasDummy17 == rhs.hasDummy17) && (!lhs.hasDummy17 || lhs.dummy17 == rhs.dummy17)
            fieldCheck = fieldCheck && (lhs.hasDummy18 == rhs.hasDummy18) && (!lhs.hasDummy18 || lhs.dummy18 == rhs.dummy18)
            fieldCheck = fieldCheck && (lhs.hasDummy19 == rhs.hasDummy19) && (!lhs.hasDummy19 || lhs.dummy19 == rhs.dummy19)
            fieldCheck = fieldCheck && (lhs.hasDummy20 == rhs.hasDummy20) && (!lhs.hasDummy20 || lhs.dummy20 == rhs.dummy20)
            fieldCheck = fieldCheck && (lhs.hasDummy21 == rhs.hasDummy21) && (!lhs.hasDummy21 || lhs.dummy21 == rhs.dummy21)
            fieldCheck = fieldCheck && (lhs.hasDummy22 == rhs.hasDummy22) && (!lhs.hasDummy22 || lhs.dummy22 == rhs.dummy22)
            fieldCheck = fieldCheck && (lhs.hasDummy23 == rhs.hasDummy23) && (!lhs.hasDummy23 || lhs.dummy23 == rhs.dummy23)
            fieldCheck = fieldCheck && (lhs.hasDummy24 == rhs.hasDummy24) && (!lhs.hasDummy24 || lhs.dummy24 == rhs.dummy24)
            fieldCheck = fieldCheck && (lhs.hasDummy25 == rhs.hasDummy25) && (!lhs.hasDummy25 || lhs.dummy25 == rhs.dummy25)
            fieldCheck = fieldCheck && (lhs.hasDummy26 == rhs.hasDummy26) && (!lhs.hasDummy26 || lhs.dummy26 == rhs.dummy26)
            fieldCheck = fieldCheck && (lhs.hasDummy27 == rhs.hasDummy27) && (!lhs.hasDummy27 || lhs.dummy27 == rhs.dummy27)
            fieldCheck = fieldCheck && (lhs.hasDummy28 == rhs.hasDummy28) && (!lhs.hasDummy28 || lhs.dummy28 == rhs.dummy28)
            fieldCheck = fieldCheck && (lhs.hasDummy29 == rhs.hasDummy29) && (!lhs.hasDummy29 || lhs.dummy29 == rhs.dummy29)
            fieldCheck = fieldCheck && (lhs.hasDummy30 == rhs.hasDummy30) && (!lhs.hasDummy30 || lhs.dummy30 == rhs.dummy30)
            fieldCheck = fieldCheck && (lhs.hasDummy31 == rhs.hasDummy31) && (!lhs.hasDummy31 || lhs.dummy31 == rhs.dummy31)
            fieldCheck = fieldCheck && (lhs.hasDummy32 == rhs.hasDummy32) && (!lhs.hasDummy32 || lhs.dummy32 == rhs.dummy32)
            fieldCheck = fieldCheck && (lhs.hasC == rhs.hasC) && (!lhs.hasC || lhs.c == rhs.c)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var a:Int32! = nil
        public fileprivate(set) var hasA:Bool = false

        public fileprivate(set) var dummy2:Int32! = nil
        public fileprivate(set) var hasDummy2:Bool = false

        public fileprivate(set) var b:Int32! = nil
        public fileprivate(set) var hasB:Bool = false

        /// Pad the field count to 32 so that we can test that IsInitialized()
        /// properly checks multiple elements of has_bits_.
        public fileprivate(set) var dummy4:Int32! = nil
        public fileprivate(set) var hasDummy4:Bool = false

        public fileprivate(set) var dummy5:Int32! = nil
        public fileprivate(set) var hasDummy5:Bool = false

        public fileprivate(set) var dummy6:Int32! = nil
        public fileprivate(set) var hasDummy6:Bool = false

        public fileprivate(set) var dummy7:Int32! = nil
        public fileprivate(set) var hasDummy7:Bool = false

        public fileprivate(set) var dummy8:Int32! = nil
        public fileprivate(set) var hasDummy8:Bool = false

        public fileprivate(set) var dummy9:Int32! = nil
        public fileprivate(set) var hasDummy9:Bool = false

        public fileprivate(set) var dummy10:Int32! = nil
        public fileprivate(set) var hasDummy10:Bool = false

        public fileprivate(set) var dummy11:Int32! = nil
        public fileprivate(set) var hasDummy11:Bool = false

        public fileprivate(set) var dummy12:Int32! = nil
        public fileprivate(set) var hasDummy12:Bool = false

        public fileprivate(set) var dummy13:Int32! = nil
        public fileprivate(set) var hasDummy13:Bool = false

        public fileprivate(set) var dummy14:Int32! = nil
        public fileprivate(set) var hasDummy14:Bool = false

        public fileprivate(set) var dummy15:Int32! = nil
        public fileprivate(set) var hasDummy15:Bool = false

        public fileprivate(set) var dummy16:Int32! = nil
        public fileprivate(set) var hasDummy16:Bool = false

        public fileprivate(set) var dummy17:Int32! = nil
        public fileprivate(set) var hasDummy17:Bool = false

        public fileprivate(set) var dummy18:Int32! = nil
        public fileprivate(set) var hasDummy18:Bool = false

        public fileprivate(set) var dummy19:Int32! = nil
        public fileprivate(set) var hasDummy19:Bool = false

        public fileprivate(set) var dummy20:Int32! = nil
        public fileprivate(set) var hasDummy20:Bool = false

        public fileprivate(set) var dummy21:Int32! = nil
        public fileprivate(set) var hasDummy21:Bool = false

        public fileprivate(set) var dummy22:Int32! = nil
        public fileprivate(set) var hasDummy22:Bool = false

        public fileprivate(set) var dummy23:Int32! = nil
        public fileprivate(set) var hasDummy23:Bool = false

        public fileprivate(set) var dummy24:Int32! = nil
        public fileprivate(set) var hasDummy24:Bool = false

        public fileprivate(set) var dummy25:Int32! = nil
        public fileprivate(set) var hasDummy25:Bool = false

        public fileprivate(set) var dummy26:Int32! = nil
        public fileprivate(set) var hasDummy26:Bool = false

        public fileprivate(set) var dummy27:Int32! = nil
        public fileprivate(set) var hasDummy27:Bool = false

        public fileprivate(set) var dummy28:Int32! = nil
        public fileprivate(set) var hasDummy28:Bool = false

        public fileprivate(set) var dummy29:Int32! = nil
        public fileprivate(set) var hasDummy29:Bool = false

        public fileprivate(set) var dummy30:Int32! = nil
        public fileprivate(set) var hasDummy30:Bool = false

        public fileprivate(set) var dummy31:Int32! = nil
        public fileprivate(set) var hasDummy31:Bool = false

        public fileprivate(set) var dummy32:Int32! = nil
        public fileprivate(set) var hasDummy32:Bool = false

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

        public class func single() -> ConcreateExtensionField {
               return TestRequiredsingle
        }
        public class func multi() -> ConcreateExtensionField {
               return TestRequiredmulti
        }
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            if !hasA {
                throw ProtocolBuffersError.invalidProtocolBuffer("Uninitialized Message \(ProtobufUnittest.TestRequired.self): field \"a\" mark required")
            }
            if !hasB {
                throw ProtocolBuffersError.invalidProtocolBuffer("Uninitialized Message \(ProtobufUnittest.TestRequired.self): field \"b\" mark required")
            }
            if !hasC {
                throw ProtocolBuffersError.invalidProtocolBuffer("Uninitialized Message \(ProtobufUnittest.TestRequired.self): field \"c\" mark required")
            }
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasA {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:a)
            }
            if hasDummy2 {
                try codedOutputStream.writeInt32(fieldNumber: 2, value:dummy2)
            }
            if hasB {
                try codedOutputStream.writeInt32(fieldNumber: 3, value:b)
            }
            if hasDummy4 {
                try codedOutputStream.writeInt32(fieldNumber: 4, value:dummy4)
            }
            if hasDummy5 {
                try codedOutputStream.writeInt32(fieldNumber: 5, value:dummy5)
            }
            if hasDummy6 {
                try codedOutputStream.writeInt32(fieldNumber: 6, value:dummy6)
            }
            if hasDummy7 {
                try codedOutputStream.writeInt32(fieldNumber: 7, value:dummy7)
            }
            if hasDummy8 {
                try codedOutputStream.writeInt32(fieldNumber: 8, value:dummy8)
            }
            if hasDummy9 {
                try codedOutputStream.writeInt32(fieldNumber: 9, value:dummy9)
            }
            if hasDummy10 {
                try codedOutputStream.writeInt32(fieldNumber: 10, value:dummy10)
            }
            if hasDummy11 {
                try codedOutputStream.writeInt32(fieldNumber: 11, value:dummy11)
            }
            if hasDummy12 {
                try codedOutputStream.writeInt32(fieldNumber: 12, value:dummy12)
            }
            if hasDummy13 {
                try codedOutputStream.writeInt32(fieldNumber: 13, value:dummy13)
            }
            if hasDummy14 {
                try codedOutputStream.writeInt32(fieldNumber: 14, value:dummy14)
            }
            if hasDummy15 {
                try codedOutputStream.writeInt32(fieldNumber: 15, value:dummy15)
            }
            if hasDummy16 {
                try codedOutputStream.writeInt32(fieldNumber: 16, value:dummy16)
            }
            if hasDummy17 {
                try codedOutputStream.writeInt32(fieldNumber: 17, value:dummy17)
            }
            if hasDummy18 {
                try codedOutputStream.writeInt32(fieldNumber: 18, value:dummy18)
            }
            if hasDummy19 {
                try codedOutputStream.writeInt32(fieldNumber: 19, value:dummy19)
            }
            if hasDummy20 {
                try codedOutputStream.writeInt32(fieldNumber: 20, value:dummy20)
            }
            if hasDummy21 {
                try codedOutputStream.writeInt32(fieldNumber: 21, value:dummy21)
            }
            if hasDummy22 {
                try codedOutputStream.writeInt32(fieldNumber: 22, value:dummy22)
            }
            if hasDummy23 {
                try codedOutputStream.writeInt32(fieldNumber: 23, value:dummy23)
            }
            if hasDummy24 {
                try codedOutputStream.writeInt32(fieldNumber: 24, value:dummy24)
            }
            if hasDummy25 {
                try codedOutputStream.writeInt32(fieldNumber: 25, value:dummy25)
            }
            if hasDummy26 {
                try codedOutputStream.writeInt32(fieldNumber: 26, value:dummy26)
            }
            if hasDummy27 {
                try codedOutputStream.writeInt32(fieldNumber: 27, value:dummy27)
            }
            if hasDummy28 {
                try codedOutputStream.writeInt32(fieldNumber: 28, value:dummy28)
            }
            if hasDummy29 {
                try codedOutputStream.writeInt32(fieldNumber: 29, value:dummy29)
            }
            if hasDummy30 {
                try codedOutputStream.writeInt32(fieldNumber: 30, value:dummy30)
            }
            if hasDummy31 {
                try codedOutputStream.writeInt32(fieldNumber: 31, value:dummy31)
            }
            if hasDummy32 {
                try codedOutputStream.writeInt32(fieldNumber: 32, value:dummy32)
            }
            if hasC {
                try codedOutputStream.writeInt32(fieldNumber: 33, 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 hasA {
                serialize_size += a.computeInt32Size(fieldNumber: 1)
            }
            if hasDummy2 {
                serialize_size += dummy2.computeInt32Size(fieldNumber: 2)
            }
            if hasB {
                serialize_size += b.computeInt32Size(fieldNumber: 3)
            }
            if hasDummy4 {
                serialize_size += dummy4.computeInt32Size(fieldNumber: 4)
            }
            if hasDummy5 {
                serialize_size += dummy5.computeInt32Size(fieldNumber: 5)
            }
            if hasDummy6 {
                serialize_size += dummy6.computeInt32Size(fieldNumber: 6)
            }
            if hasDummy7 {
                serialize_size += dummy7.computeInt32Size(fieldNumber: 7)
            }
            if hasDummy8 {
                serialize_size += dummy8.computeInt32Size(fieldNumber: 8)
            }
            if hasDummy9 {
                serialize_size += dummy9.computeInt32Size(fieldNumber: 9)
            }
            if hasDummy10 {
                serialize_size += dummy10.computeInt32Size(fieldNumber: 10)
            }
            if hasDummy11 {
                serialize_size += dummy11.computeInt32Size(fieldNumber: 11)
            }
            if hasDummy12 {
                serialize_size += dummy12.computeInt32Size(fieldNumber: 12)
            }
            if hasDummy13 {
                serialize_size += dummy13.computeInt32Size(fieldNumber: 13)
            }
            if hasDummy14 {
                serialize_size += dummy14.computeInt32Size(fieldNumber: 14)
            }
            if hasDummy15 {
                serialize_size += dummy15.computeInt32Size(fieldNumber: 15)
            }
            if hasDummy16 {
                serialize_size += dummy16.computeInt32Size(fieldNumber: 16)
            }
            if hasDummy17 {
                serialize_size += dummy17.computeInt32Size(fieldNumber: 17)
            }
            if hasDummy18 {
                serialize_size += dummy18.computeInt32Size(fieldNumber: 18)
            }
            if hasDummy19 {
                serialize_size += dummy19.computeInt32Size(fieldNumber: 19)
            }
            if hasDummy20 {
                serialize_size += dummy20.computeInt32Size(fieldNumber: 20)
            }
            if hasDummy21 {
                serialize_size += dummy21.computeInt32Size(fieldNumber: 21)
            }
            if hasDummy22 {
                serialize_size += dummy22.computeInt32Size(fieldNumber: 22)
            }
            if hasDummy23 {
                serialize_size += dummy23.computeInt32Size(fieldNumber: 23)
            }
            if hasDummy24 {
                serialize_size += dummy24.computeInt32Size(fieldNumber: 24)
            }
            if hasDummy25 {
                serialize_size += dummy25.computeInt32Size(fieldNumber: 25)
            }
            if hasDummy26 {
                serialize_size += dummy26.computeInt32Size(fieldNumber: 26)
            }
            if hasDummy27 {
                serialize_size += dummy27.computeInt32Size(fieldNumber: 27)
            }
            if hasDummy28 {
                serialize_size += dummy28.computeInt32Size(fieldNumber: 28)
            }
            if hasDummy29 {
                serialize_size += dummy29.computeInt32Size(fieldNumber: 29)
            }
            if hasDummy30 {
                serialize_size += dummy30.computeInt32Size(fieldNumber: 30)
            }
            if hasDummy31 {
                serialize_size += dummy31.computeInt32Size(fieldNumber: 31)
            }
            if hasDummy32 {
                serialize_size += dummy32.computeInt32Size(fieldNumber: 32)
            }
            if hasC {
                serialize_size += c.computeInt32Size(fieldNumber: 33)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestRequired.Builder {
            return ProtobufUnittest.TestRequired.classBuilder() as! ProtobufUnittest.TestRequired.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestRequired.Builder {
            return classBuilder() as! ProtobufUnittest.TestRequired.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRequired.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRequired.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestRequired.Builder {
            return try ProtobufUnittest.TestRequired.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestRequired) throws -> ProtobufUnittest.TestRequired.Builder {
            return try ProtobufUnittest.TestRequired.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasA {
                jsonMap["a"] = Int(a)
            }
            if hasDummy2 {
                jsonMap["dummy2"] = Int(dummy2)
            }
            if hasB {
                jsonMap["b"] = Int(b)
            }
            if hasDummy4 {
                jsonMap["dummy4"] = Int(dummy4)
            }
            if hasDummy5 {
                jsonMap["dummy5"] = Int(dummy5)
            }
            if hasDummy6 {
                jsonMap["dummy6"] = Int(dummy6)
            }
            if hasDummy7 {
                jsonMap["dummy7"] = Int(dummy7)
            }
            if hasDummy8 {
                jsonMap["dummy8"] = Int(dummy8)
            }
            if hasDummy9 {
                jsonMap["dummy9"] = Int(dummy9)
            }
            if hasDummy10 {
                jsonMap["dummy10"] = Int(dummy10)
            }
            if hasDummy11 {
                jsonMap["dummy11"] = Int(dummy11)
            }
            if hasDummy12 {
                jsonMap["dummy12"] = Int(dummy12)
            }
            if hasDummy13 {
                jsonMap["dummy13"] = Int(dummy13)
            }
            if hasDummy14 {
                jsonMap["dummy14"] = Int(dummy14)
            }
            if hasDummy15 {
                jsonMap["dummy15"] = Int(dummy15)
            }
            if hasDummy16 {
                jsonMap["dummy16"] = Int(dummy16)
            }
            if hasDummy17 {
                jsonMap["dummy17"] = Int(dummy17)
            }
            if hasDummy18 {
                jsonMap["dummy18"] = Int(dummy18)
            }
            if hasDummy19 {
                jsonMap["dummy19"] = Int(dummy19)
            }
            if hasDummy20 {
                jsonMap["dummy20"] = Int(dummy20)
            }
            if hasDummy21 {
                jsonMap["dummy21"] = Int(dummy21)
            }
            if hasDummy22 {
                jsonMap["dummy22"] = Int(dummy22)
            }
            if hasDummy23 {
                jsonMap["dummy23"] = Int(dummy23)
            }
            if hasDummy24 {
                jsonMap["dummy24"] = Int(dummy24)
            }
            if hasDummy25 {
                jsonMap["dummy25"] = Int(dummy25)
            }
            if hasDummy26 {
                jsonMap["dummy26"] = Int(dummy26)
            }
            if hasDummy27 {
                jsonMap["dummy27"] = Int(dummy27)
            }
            if hasDummy28 {
                jsonMap["dummy28"] = Int(dummy28)
            }
            if hasDummy29 {
                jsonMap["dummy29"] = Int(dummy29)
            }
            if hasDummy30 {
                jsonMap["dummy30"] = Int(dummy30)
            }
            if hasDummy31 {
                jsonMap["dummy31"] = Int(dummy31)
            }
            if hasDummy32 {
                jsonMap["dummy32"] = Int(dummy32)
            }
            if hasC {
                jsonMap["c"] = Int(c)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestRequired {
            return try ProtobufUnittest.TestRequired.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRequired {
            return try ProtobufUnittest.TestRequired.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasA {
                output += "\(indent) a: \(String(describing: a)) \n"
            }
            if hasDummy2 {
                output += "\(indent) dummy2: \(String(describing: dummy2)) \n"
            }
            if hasB {
                output += "\(indent) b: \(String(describing: b)) \n"
            }
            if hasDummy4 {
                output += "\(indent) dummy4: \(String(describing: dummy4)) \n"
            }
            if hasDummy5 {
                output += "\(indent) dummy5: \(String(describing: dummy5)) \n"
            }
            if hasDummy6 {
                output += "\(indent) dummy6: \(String(describing: dummy6)) \n"
            }
            if hasDummy7 {
                output += "\(indent) dummy7: \(String(describing: dummy7)) \n"
            }
            if hasDummy8 {
                output += "\(indent) dummy8: \(String(describing: dummy8)) \n"
            }
            if hasDummy9 {
                output += "\(indent) dummy9: \(String(describing: dummy9)) \n"
            }
            if hasDummy10 {
                output += "\(indent) dummy10: \(String(describing: dummy10)) \n"
            }
            if hasDummy11 {
                output += "\(indent) dummy11: \(String(describing: dummy11)) \n"
            }
            if hasDummy12 {
                output += "\(indent) dummy12: \(String(describing: dummy12)) \n"
            }
            if hasDummy13 {
                output += "\(indent) dummy13: \(String(describing: dummy13)) \n"
            }
            if hasDummy14 {
                output += "\(indent) dummy14: \(String(describing: dummy14)) \n"
            }
            if hasDummy15 {
                output += "\(indent) dummy15: \(String(describing: dummy15)) \n"
            }
            if hasDummy16 {
                output += "\(indent) dummy16: \(String(describing: dummy16)) \n"
            }
            if hasDummy17 {
                output += "\(indent) dummy17: \(String(describing: dummy17)) \n"
            }
            if hasDummy18 {
                output += "\(indent) dummy18: \(String(describing: dummy18)) \n"
            }
            if hasDummy19 {
                output += "\(indent) dummy19: \(String(describing: dummy19)) \n"
            }
            if hasDummy20 {
                output += "\(indent) dummy20: \(String(describing: dummy20)) \n"
            }
            if hasDummy21 {
                output += "\(indent) dummy21: \(String(describing: dummy21)) \n"
            }
            if hasDummy22 {
                output += "\(indent) dummy22: \(String(describing: dummy22)) \n"
            }
            if hasDummy23 {
                output += "\(indent) dummy23: \(String(describing: dummy23)) \n"
            }
            if hasDummy24 {
                output += "\(indent) dummy24: \(String(describing: dummy24)) \n"
            }
            if hasDummy25 {
                output += "\(indent) dummy25: \(String(describing: dummy25)) \n"
            }
            if hasDummy26 {
                output += "\(indent) dummy26: \(String(describing: dummy26)) \n"
            }
            if hasDummy27 {
                output += "\(indent) dummy27: \(String(describing: dummy27)) \n"
            }
            if hasDummy28 {
                output += "\(indent) dummy28: \(String(describing: dummy28)) \n"
            }
            if hasDummy29 {
                output += "\(indent) dummy29: \(String(describing: dummy29)) \n"
            }
            if hasDummy30 {
                output += "\(indent) dummy30: \(String(describing: dummy30)) \n"
            }
            if hasDummy31 {
                output += "\(indent) dummy31: \(String(describing: dummy31)) \n"
            }
            if hasDummy32 {
                output += "\(indent) dummy32: \(String(describing: dummy32)) \n"
            }
            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 hasA {
                    hashCode = (hashCode &* 31) &+ a.hashValue
                }
                if hasDummy2 {
                    hashCode = (hashCode &* 31) &+ dummy2.hashValue
                }
                if hasB {
                    hashCode = (hashCode &* 31) &+ b.hashValue
                }
                if hasDummy4 {
                    hashCode = (hashCode &* 31) &+ dummy4.hashValue
                }
                if hasDummy5 {
                    hashCode = (hashCode &* 31) &+ dummy5.hashValue
                }
                if hasDummy6 {
                    hashCode = (hashCode &* 31) &+ dummy6.hashValue
                }
                if hasDummy7 {
                    hashCode = (hashCode &* 31) &+ dummy7.hashValue
                }
                if hasDummy8 {
                    hashCode = (hashCode &* 31) &+ dummy8.hashValue
                }
                if hasDummy9 {
                    hashCode = (hashCode &* 31) &+ dummy9.hashValue
                }
                if hasDummy10 {
                    hashCode = (hashCode &* 31) &+ dummy10.hashValue
                }
                if hasDummy11 {
                    hashCode = (hashCode &* 31) &+ dummy11.hashValue
                }
                if hasDummy12 {
                    hashCode = (hashCode &* 31) &+ dummy12.hashValue
                }
                if hasDummy13 {
                    hashCode = (hashCode &* 31) &+ dummy13.hashValue
                }
                if hasDummy14 {
                    hashCode = (hashCode &* 31) &+ dummy14.hashValue
                }
                if hasDummy15 {
                    hashCode = (hashCode &* 31) &+ dummy15.hashValue
                }
                if hasDummy16 {
                    hashCode = (hashCode &* 31) &+ dummy16.hashValue
                }
                if hasDummy17 {
                    hashCode = (hashCode &* 31) &+ dummy17.hashValue
                }
                if hasDummy18 {
                    hashCode = (hashCode &* 31) &+ dummy18.hashValue
                }
                if hasDummy19 {
                    hashCode = (hashCode &* 31) &+ dummy19.hashValue
                }
                if hasDummy20 {
                    hashCode = (hashCode &* 31) &+ dummy20.hashValue
                }
                if hasDummy21 {
                    hashCode = (hashCode &* 31) &+ dummy21.hashValue
                }
                if hasDummy22 {
                    hashCode = (hashCode &* 31) &+ dummy22.hashValue
                }
                if hasDummy23 {
                    hashCode = (hashCode &* 31) &+ dummy23.hashValue
                }
                if hasDummy24 {
                    hashCode = (hashCode &* 31) &+ dummy24.hashValue
                }
                if hasDummy25 {
                    hashCode = (hashCode &* 31) &+ dummy25.hashValue
                }
                if hasDummy26 {
                    hashCode = (hashCode &* 31) &+ dummy26.hashValue
                }
                if hasDummy27 {
                    hashCode = (hashCode &* 31) &+ dummy27.hashValue
                }
                if hasDummy28 {
                    hashCode = (hashCode &* 31) &+ dummy28.hashValue
                }
                if hasDummy29 {
                    hashCode = (hashCode &* 31) &+ dummy29.hashValue
                }
                if hasDummy30 {
                    hashCode = (hashCode &* 31) &+ dummy30.hashValue
                }
                if hasDummy31 {
                    hashCode = (hashCode &* 31) &+ dummy31.hashValue
                }
                if hasDummy32 {
                    hashCode = (hashCode &* 31) &+ dummy32.hashValue
                }
                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 "ProtobufUnittest.TestRequired"
        }
        override public func className() -> String {
            return "ProtobufUnittest.TestRequired"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            public var a:Int32 {
                get {
                    return builderResult.a
                }
                set (value) {
                    builderResult.hasA = true
                    builderResult.a = value
                }
            }
            public var hasA:Bool {
                get {
                    return builderResult.hasA
                }
            }
            @discardableResult
            public func setA(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.a = value
                return self
            }
            @discardableResult
            public func clearA() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasA = false
                builderResult.a = nil
                return self
            }
            public var dummy2:Int32 {
                get {
                    return builderResult.dummy2
                }
                set (value) {
                    builderResult.hasDummy2 = true
                    builderResult.dummy2 = value
                }
            }
            public var hasDummy2:Bool {
                get {
                    return builderResult.hasDummy2
                }
            }
            @discardableResult
            public func setDummy2(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy2 = value
                return self
            }
            @discardableResult
            public func clearDummy2() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy2 = false
                builderResult.dummy2 = nil
                return self
            }
            public var b:Int32 {
                get {
                    return builderResult.b
                }
                set (value) {
                    builderResult.hasB = true
                    builderResult.b = value
                }
            }
            public var hasB:Bool {
                get {
                    return builderResult.hasB
                }
            }
            @discardableResult
            public func setB(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.b = value
                return self
            }
            @discardableResult
            public func clearB() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasB = false
                builderResult.b = nil
                return self
            }
            /// Pad the field count to 32 so that we can test that IsInitialized()
            /// properly checks multiple elements of has_bits_.
            public var dummy4:Int32 {
                get {
                    return builderResult.dummy4
                }
                set (value) {
                    builderResult.hasDummy4 = true
                    builderResult.dummy4 = value
                }
            }
            public var hasDummy4:Bool {
                get {
                    return builderResult.hasDummy4
                }
            }
            @discardableResult
            public func setDummy4(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy4 = value
                return self
            }
            @discardableResult
            public func clearDummy4() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy4 = false
                builderResult.dummy4 = nil
                return self
            }
            public var dummy5:Int32 {
                get {
                    return builderResult.dummy5
                }
                set (value) {
                    builderResult.hasDummy5 = true
                    builderResult.dummy5 = value
                }
            }
            public var hasDummy5:Bool {
                get {
                    return builderResult.hasDummy5
                }
            }
            @discardableResult
            public func setDummy5(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy5 = value
                return self
            }
            @discardableResult
            public func clearDummy5() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy5 = false
                builderResult.dummy5 = nil
                return self
            }
            public var dummy6:Int32 {
                get {
                    return builderResult.dummy6
                }
                set (value) {
                    builderResult.hasDummy6 = true
                    builderResult.dummy6 = value
                }
            }
            public var hasDummy6:Bool {
                get {
                    return builderResult.hasDummy6
                }
            }
            @discardableResult
            public func setDummy6(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy6 = value
                return self
            }
            @discardableResult
            public func clearDummy6() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy6 = false
                builderResult.dummy6 = nil
                return self
            }
            public var dummy7:Int32 {
                get {
                    return builderResult.dummy7
                }
                set (value) {
                    builderResult.hasDummy7 = true
                    builderResult.dummy7 = value
                }
            }
            public var hasDummy7:Bool {
                get {
                    return builderResult.hasDummy7
                }
            }
            @discardableResult
            public func setDummy7(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy7 = value
                return self
            }
            @discardableResult
            public func clearDummy7() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy7 = false
                builderResult.dummy7 = nil
                return self
            }
            public var dummy8:Int32 {
                get {
                    return builderResult.dummy8
                }
                set (value) {
                    builderResult.hasDummy8 = true
                    builderResult.dummy8 = value
                }
            }
            public var hasDummy8:Bool {
                get {
                    return builderResult.hasDummy8
                }
            }
            @discardableResult
            public func setDummy8(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy8 = value
                return self
            }
            @discardableResult
            public func clearDummy8() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy8 = false
                builderResult.dummy8 = nil
                return self
            }
            public var dummy9:Int32 {
                get {
                    return builderResult.dummy9
                }
                set (value) {
                    builderResult.hasDummy9 = true
                    builderResult.dummy9 = value
                }
            }
            public var hasDummy9:Bool {
                get {
                    return builderResult.hasDummy9
                }
            }
            @discardableResult
            public func setDummy9(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy9 = value
                return self
            }
            @discardableResult
            public func clearDummy9() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy9 = false
                builderResult.dummy9 = nil
                return self
            }
            public var dummy10:Int32 {
                get {
                    return builderResult.dummy10
                }
                set (value) {
                    builderResult.hasDummy10 = true
                    builderResult.dummy10 = value
                }
            }
            public var hasDummy10:Bool {
                get {
                    return builderResult.hasDummy10
                }
            }
            @discardableResult
            public func setDummy10(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy10 = value
                return self
            }
            @discardableResult
            public func clearDummy10() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy10 = false
                builderResult.dummy10 = nil
                return self
            }
            public var dummy11:Int32 {
                get {
                    return builderResult.dummy11
                }
                set (value) {
                    builderResult.hasDummy11 = true
                    builderResult.dummy11 = value
                }
            }
            public var hasDummy11:Bool {
                get {
                    return builderResult.hasDummy11
                }
            }
            @discardableResult
            public func setDummy11(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy11 = value
                return self
            }
            @discardableResult
            public func clearDummy11() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy11 = false
                builderResult.dummy11 = nil
                return self
            }
            public var dummy12:Int32 {
                get {
                    return builderResult.dummy12
                }
                set (value) {
                    builderResult.hasDummy12 = true
                    builderResult.dummy12 = value
                }
            }
            public var hasDummy12:Bool {
                get {
                    return builderResult.hasDummy12
                }
            }
            @discardableResult
            public func setDummy12(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy12 = value
                return self
            }
            @discardableResult
            public func clearDummy12() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy12 = false
                builderResult.dummy12 = nil
                return self
            }
            public var dummy13:Int32 {
                get {
                    return builderResult.dummy13
                }
                set (value) {
                    builderResult.hasDummy13 = true
                    builderResult.dummy13 = value
                }
            }
            public var hasDummy13:Bool {
                get {
                    return builderResult.hasDummy13
                }
            }
            @discardableResult
            public func setDummy13(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy13 = value
                return self
            }
            @discardableResult
            public func clearDummy13() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy13 = false
                builderResult.dummy13 = nil
                return self
            }
            public var dummy14:Int32 {
                get {
                    return builderResult.dummy14
                }
                set (value) {
                    builderResult.hasDummy14 = true
                    builderResult.dummy14 = value
                }
            }
            public var hasDummy14:Bool {
                get {
                    return builderResult.hasDummy14
                }
            }
            @discardableResult
            public func setDummy14(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy14 = value
                return self
            }
            @discardableResult
            public func clearDummy14() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy14 = false
                builderResult.dummy14 = nil
                return self
            }
            public var dummy15:Int32 {
                get {
                    return builderResult.dummy15
                }
                set (value) {
                    builderResult.hasDummy15 = true
                    builderResult.dummy15 = value
                }
            }
            public var hasDummy15:Bool {
                get {
                    return builderResult.hasDummy15
                }
            }
            @discardableResult
            public func setDummy15(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy15 = value
                return self
            }
            @discardableResult
            public func clearDummy15() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy15 = false
                builderResult.dummy15 = nil
                return self
            }
            public var dummy16:Int32 {
                get {
                    return builderResult.dummy16
                }
                set (value) {
                    builderResult.hasDummy16 = true
                    builderResult.dummy16 = value
                }
            }
            public var hasDummy16:Bool {
                get {
                    return builderResult.hasDummy16
                }
            }
            @discardableResult
            public func setDummy16(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy16 = value
                return self
            }
            @discardableResult
            public func clearDummy16() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy16 = false
                builderResult.dummy16 = nil
                return self
            }
            public var dummy17:Int32 {
                get {
                    return builderResult.dummy17
                }
                set (value) {
                    builderResult.hasDummy17 = true
                    builderResult.dummy17 = value
                }
            }
            public var hasDummy17:Bool {
                get {
                    return builderResult.hasDummy17
                }
            }
            @discardableResult
            public func setDummy17(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy17 = value
                return self
            }
            @discardableResult
            public func clearDummy17() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy17 = false
                builderResult.dummy17 = nil
                return self
            }
            public var dummy18:Int32 {
                get {
                    return builderResult.dummy18
                }
                set (value) {
                    builderResult.hasDummy18 = true
                    builderResult.dummy18 = value
                }
            }
            public var hasDummy18:Bool {
                get {
                    return builderResult.hasDummy18
                }
            }
            @discardableResult
            public func setDummy18(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy18 = value
                return self
            }
            @discardableResult
            public func clearDummy18() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy18 = false
                builderResult.dummy18 = nil
                return self
            }
            public var dummy19:Int32 {
                get {
                    return builderResult.dummy19
                }
                set (value) {
                    builderResult.hasDummy19 = true
                    builderResult.dummy19 = value
                }
            }
            public var hasDummy19:Bool {
                get {
                    return builderResult.hasDummy19
                }
            }
            @discardableResult
            public func setDummy19(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy19 = value
                return self
            }
            @discardableResult
            public func clearDummy19() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy19 = false
                builderResult.dummy19 = nil
                return self
            }
            public var dummy20:Int32 {
                get {
                    return builderResult.dummy20
                }
                set (value) {
                    builderResult.hasDummy20 = true
                    builderResult.dummy20 = value
                }
            }
            public var hasDummy20:Bool {
                get {
                    return builderResult.hasDummy20
                }
            }
            @discardableResult
            public func setDummy20(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy20 = value
                return self
            }
            @discardableResult
            public func clearDummy20() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy20 = false
                builderResult.dummy20 = nil
                return self
            }
            public var dummy21:Int32 {
                get {
                    return builderResult.dummy21
                }
                set (value) {
                    builderResult.hasDummy21 = true
                    builderResult.dummy21 = value
                }
            }
            public var hasDummy21:Bool {
                get {
                    return builderResult.hasDummy21
                }
            }
            @discardableResult
            public func setDummy21(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy21 = value
                return self
            }
            @discardableResult
            public func clearDummy21() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy21 = false
                builderResult.dummy21 = nil
                return self
            }
            public var dummy22:Int32 {
                get {
                    return builderResult.dummy22
                }
                set (value) {
                    builderResult.hasDummy22 = true
                    builderResult.dummy22 = value
                }
            }
            public var hasDummy22:Bool {
                get {
                    return builderResult.hasDummy22
                }
            }
            @discardableResult
            public func setDummy22(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy22 = value
                return self
            }
            @discardableResult
            public func clearDummy22() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy22 = false
                builderResult.dummy22 = nil
                return self
            }
            public var dummy23:Int32 {
                get {
                    return builderResult.dummy23
                }
                set (value) {
                    builderResult.hasDummy23 = true
                    builderResult.dummy23 = value
                }
            }
            public var hasDummy23:Bool {
                get {
                    return builderResult.hasDummy23
                }
            }
            @discardableResult
            public func setDummy23(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy23 = value
                return self
            }
            @discardableResult
            public func clearDummy23() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy23 = false
                builderResult.dummy23 = nil
                return self
            }
            public var dummy24:Int32 {
                get {
                    return builderResult.dummy24
                }
                set (value) {
                    builderResult.hasDummy24 = true
                    builderResult.dummy24 = value
                }
            }
            public var hasDummy24:Bool {
                get {
                    return builderResult.hasDummy24
                }
            }
            @discardableResult
            public func setDummy24(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy24 = value
                return self
            }
            @discardableResult
            public func clearDummy24() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy24 = false
                builderResult.dummy24 = nil
                return self
            }
            public var dummy25:Int32 {
                get {
                    return builderResult.dummy25
                }
                set (value) {
                    builderResult.hasDummy25 = true
                    builderResult.dummy25 = value
                }
            }
            public var hasDummy25:Bool {
                get {
                    return builderResult.hasDummy25
                }
            }
            @discardableResult
            public func setDummy25(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy25 = value
                return self
            }
            @discardableResult
            public func clearDummy25() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy25 = false
                builderResult.dummy25 = nil
                return self
            }
            public var dummy26:Int32 {
                get {
                    return builderResult.dummy26
                }
                set (value) {
                    builderResult.hasDummy26 = true
                    builderResult.dummy26 = value
                }
            }
            public var hasDummy26:Bool {
                get {
                    return builderResult.hasDummy26
                }
            }
            @discardableResult
            public func setDummy26(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy26 = value
                return self
            }
            @discardableResult
            public func clearDummy26() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy26 = false
                builderResult.dummy26 = nil
                return self
            }
            public var dummy27:Int32 {
                get {
                    return builderResult.dummy27
                }
                set (value) {
                    builderResult.hasDummy27 = true
                    builderResult.dummy27 = value
                }
            }
            public var hasDummy27:Bool {
                get {
                    return builderResult.hasDummy27
                }
            }
            @discardableResult
            public func setDummy27(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy27 = value
                return self
            }
            @discardableResult
            public func clearDummy27() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy27 = false
                builderResult.dummy27 = nil
                return self
            }
            public var dummy28:Int32 {
                get {
                    return builderResult.dummy28
                }
                set (value) {
                    builderResult.hasDummy28 = true
                    builderResult.dummy28 = value
                }
            }
            public var hasDummy28:Bool {
                get {
                    return builderResult.hasDummy28
                }
            }
            @discardableResult
            public func setDummy28(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy28 = value
                return self
            }
            @discardableResult
            public func clearDummy28() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy28 = false
                builderResult.dummy28 = nil
                return self
            }
            public var dummy29:Int32 {
                get {
                    return builderResult.dummy29
                }
                set (value) {
                    builderResult.hasDummy29 = true
                    builderResult.dummy29 = value
                }
            }
            public var hasDummy29:Bool {
                get {
                    return builderResult.hasDummy29
                }
            }
            @discardableResult
            public func setDummy29(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy29 = value
                return self
            }
            @discardableResult
            public func clearDummy29() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy29 = false
                builderResult.dummy29 = nil
                return self
            }
            public var dummy30:Int32 {
                get {
                    return builderResult.dummy30
                }
                set (value) {
                    builderResult.hasDummy30 = true
                    builderResult.dummy30 = value
                }
            }
            public var hasDummy30:Bool {
                get {
                    return builderResult.hasDummy30
                }
            }
            @discardableResult
            public func setDummy30(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy30 = value
                return self
            }
            @discardableResult
            public func clearDummy30() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy30 = false
                builderResult.dummy30 = nil
                return self
            }
            public var dummy31:Int32 {
                get {
                    return builderResult.dummy31
                }
                set (value) {
                    builderResult.hasDummy31 = true
                    builderResult.dummy31 = value
                }
            }
            public var hasDummy31:Bool {
                get {
                    return builderResult.hasDummy31
                }
            }
            @discardableResult
            public func setDummy31(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy31 = value
                return self
            }
            @discardableResult
            public func clearDummy31() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy31 = false
                builderResult.dummy31 = nil
                return self
            }
            public var dummy32:Int32 {
                get {
                    return builderResult.dummy32
                }
                set (value) {
                    builderResult.hasDummy32 = true
                    builderResult.dummy32 = value
                }
            }
            public var hasDummy32:Bool {
                get {
                    return builderResult.hasDummy32
                }
            }
            @discardableResult
            public func setDummy32(_ value:Int32) -> ProtobufUnittest.TestRequired.Builder {
                self.dummy32 = value
                return self
            }
            @discardableResult
            public func clearDummy32() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasDummy32 = false
                builderResult.dummy32 = nil
                return self
            }
            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) -> ProtobufUnittest.TestRequired.Builder {
                self.c = value
                return self
            }
            @discardableResult
            public func clearC() -> ProtobufUnittest.TestRequired.Builder{
                builderResult.hasC = false
                builderResult.c = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestRequired.Builder {
                builderResult = ProtobufUnittest.TestRequired()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestRequired.Builder {
                return try ProtobufUnittest.TestRequired.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestRequired {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestRequired {
                let returnMe:ProtobufUnittest.TestRequired = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestRequired) throws -> ProtobufUnittest.TestRequired.Builder {
                if other == ProtobufUnittest.TestRequired() {
                    return self
                }
                if other.hasA {
                    a = other.a
                }
                if other.hasDummy2 {
                    dummy2 = other.dummy2
                }
                if other.hasB {
                    b = other.b
                }
                if other.hasDummy4 {
                    dummy4 = other.dummy4
                }
                if other.hasDummy5 {
                    dummy5 = other.dummy5
                }
                if other.hasDummy6 {
                    dummy6 = other.dummy6
                }
                if other.hasDummy7 {
                    dummy7 = other.dummy7
                }
                if other.hasDummy8 {
                    dummy8 = other.dummy8
                }
                if other.hasDummy9 {
                    dummy9 = other.dummy9
                }
                if other.hasDummy10 {
                    dummy10 = other.dummy10
                }
                if other.hasDummy11 {
                    dummy11 = other.dummy11
                }
                if other.hasDummy12 {
                    dummy12 = other.dummy12
                }
                if other.hasDummy13 {
                    dummy13 = other.dummy13
                }
                if other.hasDummy14 {
                    dummy14 = other.dummy14
                }
                if other.hasDummy15 {
                    dummy15 = other.dummy15
                }
                if other.hasDummy16 {
                    dummy16 = other.dummy16
                }
                if other.hasDummy17 {
                    dummy17 = other.dummy17
                }
                if other.hasDummy18 {
                    dummy18 = other.dummy18
                }
                if other.hasDummy19 {
                    dummy19 = other.dummy19
                }
                if other.hasDummy20 {
                    dummy20 = other.dummy20
                }
                if other.hasDummy21 {
                    dummy21 = other.dummy21
                }
                if other.hasDummy22 {
                    dummy22 = other.dummy22
                }
                if other.hasDummy23 {
                    dummy23 = other.dummy23
                }
                if other.hasDummy24 {
                    dummy24 = other.dummy24
                }
                if other.hasDummy25 {
                    dummy25 = other.dummy25
                }
                if other.hasDummy26 {
                    dummy26 = other.dummy26
                }
                if other.hasDummy27 {
                    dummy27 = other.dummy27
                }
                if other.hasDummy28 {
                    dummy28 = other.dummy28
                }
                if other.hasDummy29 {
                    dummy29 = other.dummy29
                }
                if other.hasDummy30 {
                    dummy30 = other.dummy30
                }
                if other.hasDummy31 {
                    dummy31 = other.dummy31
                }
                if other.hasDummy32 {
                    dummy32 = other.dummy32
                }
                if other.hasC {
                    c = other.c
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRequired.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequired.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:
                        a = try codedInputStream.readInt32()

                    case 16:
                        dummy2 = try codedInputStream.readInt32()

                    case 24:
                        b = try codedInputStream.readInt32()

                    case 32:
                        dummy4 = try codedInputStream.readInt32()

                    case 40:
                        dummy5 = try codedInputStream.readInt32()

                    case 48:
                        dummy6 = try codedInputStream.readInt32()

                    case 56:
                        dummy7 = try codedInputStream.readInt32()

                    case 64:
                        dummy8 = try codedInputStream.readInt32()

                    case 72:
                        dummy9 = try codedInputStream.readInt32()

                    case 80:
                        dummy10 = try codedInputStream.readInt32()

                    case 88:
                        dummy11 = try codedInputStream.readInt32()

                    case 96:
                        dummy12 = try codedInputStream.readInt32()

                    case 104:
                        dummy13 = try codedInputStream.readInt32()

                    case 112:
                        dummy14 = try codedInputStream.readInt32()

                    case 120:
                        dummy15 = try codedInputStream.readInt32()

                    case 128:
                        dummy16 = try codedInputStream.readInt32()

                    case 136:
                        dummy17 = try codedInputStream.readInt32()

                    case 144:
                        dummy18 = try codedInputStream.readInt32()

                    case 152:
                        dummy19 = try codedInputStream.readInt32()

                    case 160:
                        dummy20 = try codedInputStream.readInt32()

                    case 168:
                        dummy21 = try codedInputStream.readInt32()

                    case 176:
                        dummy22 = try codedInputStream.readInt32()

                    case 184:
                        dummy23 = try codedInputStream.readInt32()

                    case 192:
                        dummy24 = try codedInputStream.readInt32()

                    case 200:
                        dummy25 = try codedInputStream.readInt32()

                    case 208:
                        dummy26 = try codedInputStream.readInt32()

                    case 216:
                        dummy27 = try codedInputStream.readInt32()

                    case 224:
                        dummy28 = try codedInputStream.readInt32()

                    case 232:
                        dummy29 = try codedInputStream.readInt32()

                    case 240:
                        dummy30 = try codedInputStream.readInt32()

                    case 248:
                        dummy31 = try codedInputStream.readInt32()

                    case 256:
                        dummy32 = try codedInputStream.readInt32()

                    case 264:
                        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 -> ProtobufUnittest.TestRequired.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestRequired.Builder()
                if let jsonValueA = jsonMap["a"] as? Int {
                    resultDecodedBuilder.a = Int32(jsonValueA)
                } else if let jsonValueA = jsonMap["a"] as? String {
                    resultDecodedBuilder.a = Int32(jsonValueA)!
                }
                if let jsonValueDummy2 = jsonMap["dummy2"] as? Int {
                    resultDecodedBuilder.dummy2 = Int32(jsonValueDummy2)
                } else if let jsonValueDummy2 = jsonMap["dummy2"] as? String {
                    resultDecodedBuilder.dummy2 = Int32(jsonValueDummy2)!
                }
                if let jsonValueB = jsonMap["b"] as? Int {
                    resultDecodedBuilder.b = Int32(jsonValueB)
                } else if let jsonValueB = jsonMap["b"] as? String {
                    resultDecodedBuilder.b = Int32(jsonValueB)!
                }
                if let jsonValueDummy4 = jsonMap["dummy4"] as? Int {
                    resultDecodedBuilder.dummy4 = Int32(jsonValueDummy4)
                } else if let jsonValueDummy4 = jsonMap["dummy4"] as? String {
                    resultDecodedBuilder.dummy4 = Int32(jsonValueDummy4)!
                }
                if let jsonValueDummy5 = jsonMap["dummy5"] as? Int {
                    resultDecodedBuilder.dummy5 = Int32(jsonValueDummy5)
                } else if let jsonValueDummy5 = jsonMap["dummy5"] as? String {
                    resultDecodedBuilder.dummy5 = Int32(jsonValueDummy5)!
                }
                if let jsonValueDummy6 = jsonMap["dummy6"] as? Int {
                    resultDecodedBuilder.dummy6 = Int32(jsonValueDummy6)
                } else if let jsonValueDummy6 = jsonMap["dummy6"] as? String {
                    resultDecodedBuilder.dummy6 = Int32(jsonValueDummy6)!
                }
                if let jsonValueDummy7 = jsonMap["dummy7"] as? Int {
                    resultDecodedBuilder.dummy7 = Int32(jsonValueDummy7)
                } else if let jsonValueDummy7 = jsonMap["dummy7"] as? String {
                    resultDecodedBuilder.dummy7 = Int32(jsonValueDummy7)!
                }
                if let jsonValueDummy8 = jsonMap["dummy8"] as? Int {
                    resultDecodedBuilder.dummy8 = Int32(jsonValueDummy8)
                } else if let jsonValueDummy8 = jsonMap["dummy8"] as? String {
                    resultDecodedBuilder.dummy8 = Int32(jsonValueDummy8)!
                }
                if let jsonValueDummy9 = jsonMap["dummy9"] as? Int {
                    resultDecodedBuilder.dummy9 = Int32(jsonValueDummy9)
                } else if let jsonValueDummy9 = jsonMap["dummy9"] as? String {
                    resultDecodedBuilder.dummy9 = Int32(jsonValueDummy9)!
                }
                if let jsonValueDummy10 = jsonMap["dummy10"] as? Int {
                    resultDecodedBuilder.dummy10 = Int32(jsonValueDummy10)
                } else if let jsonValueDummy10 = jsonMap["dummy10"] as? String {
                    resultDecodedBuilder.dummy10 = Int32(jsonValueDummy10)!
                }
                if let jsonValueDummy11 = jsonMap["dummy11"] as? Int {
                    resultDecodedBuilder.dummy11 = Int32(jsonValueDummy11)
                } else if let jsonValueDummy11 = jsonMap["dummy11"] as? String {
                    resultDecodedBuilder.dummy11 = Int32(jsonValueDummy11)!
                }
                if let jsonValueDummy12 = jsonMap["dummy12"] as? Int {
                    resultDecodedBuilder.dummy12 = Int32(jsonValueDummy12)
                } else if let jsonValueDummy12 = jsonMap["dummy12"] as? String {
                    resultDecodedBuilder.dummy12 = Int32(jsonValueDummy12)!
                }
                if let jsonValueDummy13 = jsonMap["dummy13"] as? Int {
                    resultDecodedBuilder.dummy13 = Int32(jsonValueDummy13)
                } else if let jsonValueDummy13 = jsonMap["dummy13"] as? String {
                    resultDecodedBuilder.dummy13 = Int32(jsonValueDummy13)!
                }
                if let jsonValueDummy14 = jsonMap["dummy14"] as? Int {
                    resultDecodedBuilder.dummy14 = Int32(jsonValueDummy14)
                } else if let jsonValueDummy14 = jsonMap["dummy14"] as? String {
                    resultDecodedBuilder.dummy14 = Int32(jsonValueDummy14)!
                }
                if let jsonValueDummy15 = jsonMap["dummy15"] as? Int {
                    resultDecodedBuilder.dummy15 = Int32(jsonValueDummy15)
                } else if let jsonValueDummy15 = jsonMap["dummy15"] as? String {
                    resultDecodedBuilder.dummy15 = Int32(jsonValueDummy15)!
                }
                if let jsonValueDummy16 = jsonMap["dummy16"] as? Int {
                    resultDecodedBuilder.dummy16 = Int32(jsonValueDummy16)
                } else if let jsonValueDummy16 = jsonMap["dummy16"] as? String {
                    resultDecodedBuilder.dummy16 = Int32(jsonValueDummy16)!
                }
                if let jsonValueDummy17 = jsonMap["dummy17"] as? Int {
                    resultDecodedBuilder.dummy17 = Int32(jsonValueDummy17)
                } else if let jsonValueDummy17 = jsonMap["dummy17"] as? String {
                    resultDecodedBuilder.dummy17 = Int32(jsonValueDummy17)!
                }
                if let jsonValueDummy18 = jsonMap["dummy18"] as? Int {
                    resultDecodedBuilder.dummy18 = Int32(jsonValueDummy18)
                } else if let jsonValueDummy18 = jsonMap["dummy18"] as? String {
                    resultDecodedBuilder.dummy18 = Int32(jsonValueDummy18)!
                }
                if let jsonValueDummy19 = jsonMap["dummy19"] as? Int {
                    resultDecodedBuilder.dummy19 = Int32(jsonValueDummy19)
                } else if let jsonValueDummy19 = jsonMap["dummy19"] as? String {
                    resultDecodedBuilder.dummy19 = Int32(jsonValueDummy19)!
                }
                if let jsonValueDummy20 = jsonMap["dummy20"] as? Int {
                    resultDecodedBuilder.dummy20 = Int32(jsonValueDummy20)
                } else if let jsonValueDummy20 = jsonMap["dummy20"] as? String {
                    resultDecodedBuilder.dummy20 = Int32(jsonValueDummy20)!
                }
                if let jsonValueDummy21 = jsonMap["dummy21"] as? Int {
                    resultDecodedBuilder.dummy21 = Int32(jsonValueDummy21)
                } else if let jsonValueDummy21 = jsonMap["dummy21"] as? String {
                    resultDecodedBuilder.dummy21 = Int32(jsonValueDummy21)!
                }
                if let jsonValueDummy22 = jsonMap["dummy22"] as? Int {
                    resultDecodedBuilder.dummy22 = Int32(jsonValueDummy22)
                } else if let jsonValueDummy22 = jsonMap["dummy22"] as? String {
                    resultDecodedBuilder.dummy22 = Int32(jsonValueDummy22)!
                }
                if let jsonValueDummy23 = jsonMap["dummy23"] as? Int {
                    resultDecodedBuilder.dummy23 = Int32(jsonValueDummy23)
                } else if let jsonValueDummy23 = jsonMap["dummy23"] as? String {
                    resultDecodedBuilder.dummy23 = Int32(jsonValueDummy23)!
                }
                if let jsonValueDummy24 = jsonMap["dummy24"] as? Int {
                    resultDecodedBuilder.dummy24 = Int32(jsonValueDummy24)
                } else if let jsonValueDummy24 = jsonMap["dummy24"] as? String {
                    resultDecodedBuilder.dummy24 = Int32(jsonValueDummy24)!
                }
                if let jsonValueDummy25 = jsonMap["dummy25"] as? Int {
                    resultDecodedBuilder.dummy25 = Int32(jsonValueDummy25)
                } else if let jsonValueDummy25 = jsonMap["dummy25"] as? String {
                    resultDecodedBuilder.dummy25 = Int32(jsonValueDummy25)!
                }
                if let jsonValueDummy26 = jsonMap["dummy26"] as? Int {
                    resultDecodedBuilder.dummy26 = Int32(jsonValueDummy26)
                } else if let jsonValueDummy26 = jsonMap["dummy26"] as? String {
                    resultDecodedBuilder.dummy26 = Int32(jsonValueDummy26)!
                }
                if let jsonValueDummy27 = jsonMap["dummy27"] as? Int {
                    resultDecodedBuilder.dummy27 = Int32(jsonValueDummy27)
                } else if let jsonValueDummy27 = jsonMap["dummy27"] as? String {
                    resultDecodedBuilder.dummy27 = Int32(jsonValueDummy27)!
                }
                if let jsonValueDummy28 = jsonMap["dummy28"] as? Int {
                    resultDecodedBuilder.dummy28 = Int32(jsonValueDummy28)
                } else if let jsonValueDummy28 = jsonMap["dummy28"] as? String {
                    resultDecodedBuilder.dummy28 = Int32(jsonValueDummy28)!
                }
                if let jsonValueDummy29 = jsonMap["dummy29"] as? Int {
                    resultDecodedBuilder.dummy29 = Int32(jsonValueDummy29)
                } else if let jsonValueDummy29 = jsonMap["dummy29"] as? String {
                    resultDecodedBuilder.dummy29 = Int32(jsonValueDummy29)!
                }
                if let jsonValueDummy30 = jsonMap["dummy30"] as? Int {
                    resultDecodedBuilder.dummy30 = Int32(jsonValueDummy30)
                } else if let jsonValueDummy30 = jsonMap["dummy30"] as? String {
                    resultDecodedBuilder.dummy30 = Int32(jsonValueDummy30)!
                }
                if let jsonValueDummy31 = jsonMap["dummy31"] as? Int {
                    resultDecodedBuilder.dummy31 = Int32(jsonValueDummy31)
                } else if let jsonValueDummy31 = jsonMap["dummy31"] as? String {
                    resultDecodedBuilder.dummy31 = Int32(jsonValueDummy31)!
                }
                if let jsonValueDummy32 = jsonMap["dummy32"] as? Int {
                    resultDecodedBuilder.dummy32 = Int32(jsonValueDummy32)
                } else if let jsonValueDummy32 = jsonMap["dummy32"] as? String {
                    resultDecodedBuilder.dummy32 = Int32(jsonValueDummy32)!
                }
                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 -> ProtobufUnittest.TestRequired.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 ProtobufUnittest.TestRequired.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestRequiredForeign : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestRequiredForeign.Builder

        public static func == (lhs: ProtobufUnittest.TestRequiredForeign, rhs: ProtobufUnittest.TestRequiredForeign) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasOptionalMessage == rhs.hasOptionalMessage) && (!lhs.hasOptionalMessage || lhs.optionalMessage == rhs.optionalMessage)
            fieldCheck = fieldCheck && (lhs.repeatedMessage == rhs.repeatedMessage)
            fieldCheck = fieldCheck && (lhs.hasDummy == rhs.hasDummy) && (!lhs.hasDummy || lhs.dummy == rhs.dummy)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var optionalMessage:ProtobufUnittest.TestRequired!
        public fileprivate(set) var hasOptionalMessage:Bool = false
        public fileprivate(set) var repeatedMessage:Array<ProtobufUnittest.TestRequired>  = Array<ProtobufUnittest.TestRequired>()
        public fileprivate(set) var dummy:Int32! = nil
        public fileprivate(set) var hasDummy:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            if hasOptionalMessage {
                try optionalMessage.isInitialized()
            }
            for oneElementRepeatedMessage in repeatedMessage {
                try oneElementRepeatedMessage.isInitialized()
            }
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasOptionalMessage {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:optionalMessage)
            }
            for oneElementRepeatedMessage in repeatedMessage {
                  try codedOutputStream.writeMessage(fieldNumber: 2, value:oneElementRepeatedMessage)
            }
            if hasDummy {
                try codedOutputStream.writeInt32(fieldNumber: 3, value:dummy)
            }
            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 hasOptionalMessage {
                if let varSizeoptionalMessage = optionalMessage?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizeoptionalMessage
                }
            }
            for oneElementRepeatedMessage in repeatedMessage {
                serialize_size += oneElementRepeatedMessage.computeMessageSize(fieldNumber: 2)
            }
            if hasDummy {
                serialize_size += dummy.computeInt32Size(fieldNumber: 3)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestRequiredForeign.Builder {
            return ProtobufUnittest.TestRequiredForeign.classBuilder() as! ProtobufUnittest.TestRequiredForeign.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestRequiredForeign.Builder {
            return classBuilder() as! ProtobufUnittest.TestRequiredForeign.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRequiredForeign.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRequiredForeign.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestRequiredForeign.Builder {
            return try ProtobufUnittest.TestRequiredForeign.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestRequiredForeign) throws -> ProtobufUnittest.TestRequiredForeign.Builder {
            return try ProtobufUnittest.TestRequiredForeign.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasOptionalMessage {
                jsonMap["optionalMessage"] = try optionalMessage.encode()
            }
            if !repeatedMessage.isEmpty {
                var jsonArrayRepeatedMessage:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedMessage in repeatedMessage {
                    let ecodedMessageRepeatedMessage = try oneValueRepeatedMessage.encode()
                    jsonArrayRepeatedMessage.append(ecodedMessageRepeatedMessage)
                }
                jsonMap["repeatedMessage"] = jsonArrayRepeatedMessage
            }
            if hasDummy {
                jsonMap["dummy"] = Int(dummy)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestRequiredForeign {
            return try ProtobufUnittest.TestRequiredForeign.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRequiredForeign {
            return try ProtobufUnittest.TestRequiredForeign.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasOptionalMessage {
                output += "\(indent) optionalMessage {\n"
                if let outDescOptionalMessage = optionalMessage {
                    output += try outDescOptionalMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            var repeatedMessageElementIndex:Int = 0
            for oneElementRepeatedMessage in repeatedMessage {
                output += "\(indent) repeatedMessage[\(repeatedMessageElementIndex)] {\n"
                output += try oneElementRepeatedMessage.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedMessageElementIndex += 1
            }
            if hasDummy {
                output += "\(indent) dummy: \(String(describing: dummy)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasOptionalMessage {
                    if let hashValueoptionalMessage = optionalMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalMessage
                    }
                }
                for oneElementRepeatedMessage in repeatedMessage {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedMessage.hashValue
                }
                if hasDummy {
                    hashCode = (hashCode &* 31) &+ dummy.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var optionalMessage:ProtobufUnittest.TestRequired! {
                get {
                    if optionalMessageBuilder_ != nil {
                        builderResult.optionalMessage = optionalMessageBuilder_.getMessage()
                    }
                    return builderResult.optionalMessage
                }
                set (value) {
                    builderResult.hasOptionalMessage = value != nil
                    builderResult.optionalMessage = value
                }
            }
            public var hasOptionalMessage:Bool {
                get {
                    return builderResult.hasOptionalMessage
                }
            }
            fileprivate var optionalMessageBuilder_:ProtobufUnittest.TestRequired.Builder! {
                didSet {
                    builderResult.hasOptionalMessage = true
                }
            }
            public func getOptionalMessageBuilder() -> ProtobufUnittest.TestRequired.Builder {
                if optionalMessageBuilder_ == nil {
                    optionalMessageBuilder_ = ProtobufUnittest.TestRequired.Builder()
                    builderResult.optionalMessage = optionalMessageBuilder_.getMessage()
                    if optionalMessage != nil {
                        try! optionalMessageBuilder_.mergeFrom(other: optionalMessage)
                    }
                }
                return optionalMessageBuilder_
            }
            @discardableResult
            public func setOptionalMessage(_ value:ProtobufUnittest.TestRequired!) -> ProtobufUnittest.TestRequiredForeign.Builder {
                self.optionalMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalMessage(value:ProtobufUnittest.TestRequired) throws -> ProtobufUnittest.TestRequiredForeign.Builder {
                if builderResult.hasOptionalMessage {
                    builderResult.optionalMessage = try ProtobufUnittest.TestRequired.builderWithPrototype(prototype:builderResult.optionalMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalMessage = value
                }
                builderResult.hasOptionalMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalMessage() -> ProtobufUnittest.TestRequiredForeign.Builder {
                optionalMessageBuilder_ = nil
                builderResult.hasOptionalMessage = false
                builderResult.optionalMessage = nil
                return self
            }
            public var repeatedMessage:Array<ProtobufUnittest.TestRequired> {
                get {
                    return builderResult.repeatedMessage
                }
                set (value) {
                    builderResult.repeatedMessage = value
                }
            }
            @discardableResult
            public func setRepeatedMessage(_ value:Array<ProtobufUnittest.TestRequired>) -> ProtobufUnittest.TestRequiredForeign.Builder {
                self.repeatedMessage = value
                return self
            }
            @discardableResult
            public func clearRepeatedMessage() -> ProtobufUnittest.TestRequiredForeign.Builder {
                builderResult.repeatedMessage.removeAll(keepingCapacity: false)
                return self
            }
            public var dummy:Int32 {
                get {
                    return builderResult.dummy
                }
                set (value) {
                    builderResult.hasDummy = true
                    builderResult.dummy = value
                }
            }
            public var hasDummy:Bool {
                get {
                    return builderResult.hasDummy
                }
            }
            @discardableResult
            public func setDummy(_ value:Int32) -> ProtobufUnittest.TestRequiredForeign.Builder {
                self.dummy = value
                return self
            }
            @discardableResult
            public func clearDummy() -> ProtobufUnittest.TestRequiredForeign.Builder{
                builderResult.hasDummy = false
                builderResult.dummy = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestRequiredForeign.Builder {
                builderResult = ProtobufUnittest.TestRequiredForeign()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestRequiredForeign.Builder {
                return try ProtobufUnittest.TestRequiredForeign.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestRequiredForeign {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestRequiredForeign {
                let returnMe:ProtobufUnittest.TestRequiredForeign = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestRequiredForeign) throws -> ProtobufUnittest.TestRequiredForeign.Builder {
                if other == ProtobufUnittest.TestRequiredForeign() {
                    return self
                }
                if (other.hasOptionalMessage) {
                    try mergeOptionalMessage(value: other.optionalMessage)
                }
                if !other.repeatedMessage.isEmpty  {
                     builderResult.repeatedMessage += other.repeatedMessage
                }
                if other.hasDummy {
                    dummy = other.dummy
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRequiredForeign.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredForeign.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:ProtobufUnittest.TestRequired.Builder = ProtobufUnittest.TestRequired.Builder()
                        if hasOptionalMessage {
                            try subBuilder.mergeFrom(other: optionalMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalMessage = subBuilder.buildPartial()

                    case 18:
                        let subBuilder = ProtobufUnittest.TestRequired.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        repeatedMessage.append(subBuilder.buildPartial())

                    case 24:
                        dummy = 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 -> ProtobufUnittest.TestRequiredForeign.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestRequiredForeign.Builder()
                if let jsonValueOptionalMessage = jsonMap["optionalMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalMessage = try ProtobufUnittest.TestRequired.Builder.decodeToBuilder(jsonMap:jsonValueOptionalMessage).build()

                }
                if let jsonValueRepeatedMessage = jsonMap["repeatedMessage"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedMessage:Array<ProtobufUnittest.TestRequired> = []
                    for oneValueRepeatedMessage in jsonValueRepeatedMessage {
                        let messageFromStringRepeatedMessage = try ProtobufUnittest.TestRequired.Builder.decodeToBuilder(jsonMap:oneValueRepeatedMessage).build()

                        jsonArrayRepeatedMessage.append(messageFromStringRepeatedMessage)
                    }
                    resultDecodedBuilder.repeatedMessage = jsonArrayRepeatedMessage
                }
                if let jsonValueDummy = jsonMap["dummy"] as? Int {
                    resultDecodedBuilder.dummy = Int32(jsonValueDummy)
                } else if let jsonValueDummy = jsonMap["dummy"] as? String {
                    resultDecodedBuilder.dummy = Int32(jsonValueDummy)!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRequiredForeign.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 ProtobufUnittest.TestRequiredForeign.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test that we can use NestedMessage from outside TestAllTypes.
    final public class TestForeignNested : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestForeignNested.Builder

        public static func == (lhs: ProtobufUnittest.TestForeignNested, rhs: ProtobufUnittest.TestForeignNested) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasForeignNested == rhs.hasForeignNested) && (!lhs.hasForeignNested || lhs.foreignNested == rhs.foreignNested)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var foreignNested:ProtobufUnittest.TestAllTypes.NestedMessage!
        public fileprivate(set) var hasForeignNested:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasForeignNested {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:foreignNested)
            }
            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 hasForeignNested {
                if let varSizeforeignNested = foreignNested?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizeforeignNested
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestForeignNested.Builder {
            return ProtobufUnittest.TestForeignNested.classBuilder() as! ProtobufUnittest.TestForeignNested.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestForeignNested.Builder {
            return classBuilder() as! ProtobufUnittest.TestForeignNested.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestForeignNested.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestForeignNested.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestForeignNested.Builder {
            return try ProtobufUnittest.TestForeignNested.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestForeignNested) throws -> ProtobufUnittest.TestForeignNested.Builder {
            return try ProtobufUnittest.TestForeignNested.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasForeignNested {
                jsonMap["foreignNested"] = try foreignNested.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestForeignNested {
            return try ProtobufUnittest.TestForeignNested.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestForeignNested {
            return try ProtobufUnittest.TestForeignNested.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasForeignNested {
                output += "\(indent) foreignNested {\n"
                if let outDescForeignNested = foreignNested {
                    output += try outDescForeignNested.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasForeignNested {
                    if let hashValueforeignNested = foreignNested?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueforeignNested
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var foreignNested:ProtobufUnittest.TestAllTypes.NestedMessage! {
                get {
                    if foreignNestedBuilder_ != nil {
                        builderResult.foreignNested = foreignNestedBuilder_.getMessage()
                    }
                    return builderResult.foreignNested
                }
                set (value) {
                    builderResult.hasForeignNested = value != nil
                    builderResult.foreignNested = value
                }
            }
            public var hasForeignNested:Bool {
                get {
                    return builderResult.hasForeignNested
                }
            }
            fileprivate var foreignNestedBuilder_:ProtobufUnittest.TestAllTypes.NestedMessage.Builder! {
                didSet {
                    builderResult.hasForeignNested = true
                }
            }
            public func getForeignNestedBuilder() -> ProtobufUnittest.TestAllTypes.NestedMessage.Builder {
                if foreignNestedBuilder_ == nil {
                    foreignNestedBuilder_ = ProtobufUnittest.TestAllTypes.NestedMessage.Builder()
                    builderResult.foreignNested = foreignNestedBuilder_.getMessage()
                    if foreignNested != nil {
                        try! foreignNestedBuilder_.mergeFrom(other: foreignNested)
                    }
                }
                return foreignNestedBuilder_
            }
            @discardableResult
            public func setForeignNested(_ value:ProtobufUnittest.TestAllTypes.NestedMessage!) -> ProtobufUnittest.TestForeignNested.Builder {
                self.foreignNested = value
                return self
            }
            @discardableResult
            public func mergeForeignNested(value:ProtobufUnittest.TestAllTypes.NestedMessage) throws -> ProtobufUnittest.TestForeignNested.Builder {
                if builderResult.hasForeignNested {
                    builderResult.foreignNested = try ProtobufUnittest.TestAllTypes.NestedMessage.builderWithPrototype(prototype:builderResult.foreignNested).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.foreignNested = value
                }
                builderResult.hasForeignNested = true
                return self
            }
            @discardableResult
            public func clearForeignNested() -> ProtobufUnittest.TestForeignNested.Builder {
                foreignNestedBuilder_ = nil
                builderResult.hasForeignNested = false
                builderResult.foreignNested = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestForeignNested.Builder {
                builderResult = ProtobufUnittest.TestForeignNested()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestForeignNested.Builder {
                return try ProtobufUnittest.TestForeignNested.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestForeignNested {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestForeignNested {
                let returnMe:ProtobufUnittest.TestForeignNested = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestForeignNested) throws -> ProtobufUnittest.TestForeignNested.Builder {
                if other == ProtobufUnittest.TestForeignNested() {
                    return self
                }
                if (other.hasForeignNested) {
                    try mergeForeignNested(value: other.foreignNested)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestForeignNested.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestForeignNested.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:ProtobufUnittest.TestAllTypes.NestedMessage.Builder = ProtobufUnittest.TestAllTypes.NestedMessage.Builder()
                        if hasForeignNested {
                            try subBuilder.mergeFrom(other: foreignNested)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        foreignNested = 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 -> ProtobufUnittest.TestForeignNested.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestForeignNested.Builder()
                if let jsonValueForeignNested = jsonMap["foreignNested"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.foreignNested = try ProtobufUnittest.TestAllTypes.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonValueForeignNested).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestForeignNested.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 ProtobufUnittest.TestForeignNested.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// TestEmptyMessage is used to test unknown field support.
    final public class TestEmptyMessage : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestEmptyMessage.Builder

        public static func == (lhs: ProtobufUnittest.TestEmptyMessage, rhs: ProtobufUnittest.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() -> ProtobufUnittest.TestEmptyMessage.Builder {
            return ProtobufUnittest.TestEmptyMessage.classBuilder() as! ProtobufUnittest.TestEmptyMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestEmptyMessage.Builder {
            return classBuilder() as! ProtobufUnittest.TestEmptyMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestEmptyMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestEmptyMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestEmptyMessage.Builder {
            return try ProtobufUnittest.TestEmptyMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestEmptyMessage) throws -> ProtobufUnittest.TestEmptyMessage.Builder {
            return try ProtobufUnittest.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 -> ProtobufUnittest.TestEmptyMessage {
            return try ProtobufUnittest.TestEmptyMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestEmptyMessage {
            return try ProtobufUnittest.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 "ProtobufUnittest.TestEmptyMessage"
        }
        override public func className() -> String {
            return "ProtobufUnittest.TestEmptyMessage"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestEmptyMessage.Builder {
                builderResult = ProtobufUnittest.TestEmptyMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestEmptyMessage.Builder {
                return try ProtobufUnittest.TestEmptyMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestEmptyMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestEmptyMessage {
                let returnMe:ProtobufUnittest.TestEmptyMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestEmptyMessage) throws -> ProtobufUnittest.TestEmptyMessage.Builder {
                if other == ProtobufUnittest.TestEmptyMessage() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestEmptyMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.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 -> ProtobufUnittest.TestEmptyMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestEmptyMessage.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.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 ProtobufUnittest.TestEmptyMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Like above, but declare all field numbers as potential extensions.  No
    /// actual extensions should ever be defined for this type.
    final public class TestEmptyMessageWithExtensions : ExtendableMessage {
        public typealias BuilderType = ProtobufUnittest.TestEmptyMessageWithExtensions.Builder

        public static func == (lhs: ProtobufUnittest.TestEmptyMessageWithExtensions, rhs: ProtobufUnittest.TestEmptyMessageWithExtensions) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:1, endExclusive:536870912)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            try extensionsAreInitialized()}
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:1, endExclusive:536870912)
            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 += extensionsSerializedSize()
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestEmptyMessageWithExtensions.Builder {
            return ProtobufUnittest.TestEmptyMessageWithExtensions.classBuilder() as! ProtobufUnittest.TestEmptyMessageWithExtensions.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestEmptyMessageWithExtensions.Builder {
            return classBuilder() as! ProtobufUnittest.TestEmptyMessageWithExtensions.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestEmptyMessageWithExtensions.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestEmptyMessageWithExtensions.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestEmptyMessageWithExtensions.Builder {
            return try ProtobufUnittest.TestEmptyMessageWithExtensions.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestEmptyMessageWithExtensions) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions.Builder {
            return try ProtobufUnittest.TestEmptyMessageWithExtensions.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 -> ProtobufUnittest.TestEmptyMessageWithExtensions {
            return try ProtobufUnittest.TestEmptyMessageWithExtensions.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions {
            return try ProtobufUnittest.TestEmptyMessageWithExtensions.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            output += try getExtensionDescription(startInclusive:1, endExclusive:536870912, indent:indent)
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 1, endExclusive:536870912))
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

        final public class Builder : ExtendableMessageBuilder {
            fileprivate var builderResult:ProtobufUnittest.TestEmptyMessageWithExtensions = ProtobufUnittest.TestEmptyMessageWithExtensions()
            public func getMessage() -> ProtobufUnittest.TestEmptyMessageWithExtensions {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            override public var internalGetResult:ExtendableMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestEmptyMessageWithExtensions.Builder {
                builderResult = ProtobufUnittest.TestEmptyMessageWithExtensions()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestEmptyMessageWithExtensions.Builder {
                return try ProtobufUnittest.TestEmptyMessageWithExtensions.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestEmptyMessageWithExtensions {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestEmptyMessageWithExtensions {
                let returnMe:ProtobufUnittest.TestEmptyMessageWithExtensions = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestEmptyMessageWithExtensions) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions.Builder {
                if other == ProtobufUnittest.TestEmptyMessageWithExtensions() {
                    return self
                }
                try mergeExtensionFields(other: other)
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions.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 -> ProtobufUnittest.TestEmptyMessageWithExtensions.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestEmptyMessageWithExtensions.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions.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 ProtobufUnittest.TestEmptyMessageWithExtensions.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestMultipleExtensionRanges : ExtendableMessage {
        public typealias BuilderType = ProtobufUnittest.TestMultipleExtensionRanges.Builder

        public static func == (lhs: ProtobufUnittest.TestMultipleExtensionRanges, rhs: ProtobufUnittest.TestMultipleExtensionRanges) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:42, endExclusive:43)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:4143, endExclusive:4244)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:65536, endExclusive:536870912)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            try extensionsAreInitialized()}
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:42, endExclusive:43)
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:4143, endExclusive:4244)
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:65536, endExclusive:536870912)
            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 += extensionsSerializedSize()
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestMultipleExtensionRanges.Builder {
            return ProtobufUnittest.TestMultipleExtensionRanges.classBuilder() as! ProtobufUnittest.TestMultipleExtensionRanges.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestMultipleExtensionRanges.Builder {
            return classBuilder() as! ProtobufUnittest.TestMultipleExtensionRanges.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestMultipleExtensionRanges.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestMultipleExtensionRanges.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestMultipleExtensionRanges.Builder {
            return try ProtobufUnittest.TestMultipleExtensionRanges.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestMultipleExtensionRanges) throws -> ProtobufUnittest.TestMultipleExtensionRanges.Builder {
            return try ProtobufUnittest.TestMultipleExtensionRanges.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 -> ProtobufUnittest.TestMultipleExtensionRanges {
            return try ProtobufUnittest.TestMultipleExtensionRanges.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestMultipleExtensionRanges {
            return try ProtobufUnittest.TestMultipleExtensionRanges.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            output += try getExtensionDescription(startInclusive:42, endExclusive:43, indent:indent)
            output += try getExtensionDescription(startInclusive:4143, endExclusive:4244, indent:indent)
            output += try getExtensionDescription(startInclusive:65536, endExclusive:536870912, indent:indent)
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 42, endExclusive:43))
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 4143, endExclusive:4244))
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 65536, endExclusive:536870912))
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

        final public class Builder : ExtendableMessageBuilder {
            fileprivate var builderResult:ProtobufUnittest.TestMultipleExtensionRanges = ProtobufUnittest.TestMultipleExtensionRanges()
            public func getMessage() -> ProtobufUnittest.TestMultipleExtensionRanges {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            override public var internalGetResult:ExtendableMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestMultipleExtensionRanges.Builder {
                builderResult = ProtobufUnittest.TestMultipleExtensionRanges()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestMultipleExtensionRanges.Builder {
                return try ProtobufUnittest.TestMultipleExtensionRanges.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestMultipleExtensionRanges {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestMultipleExtensionRanges {
                let returnMe:ProtobufUnittest.TestMultipleExtensionRanges = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestMultipleExtensionRanges) throws -> ProtobufUnittest.TestMultipleExtensionRanges.Builder {
                if other == ProtobufUnittest.TestMultipleExtensionRanges() {
                    return self
                }
                try mergeExtensionFields(other: other)
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestMultipleExtensionRanges.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMultipleExtensionRanges.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 -> ProtobufUnittest.TestMultipleExtensionRanges.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestMultipleExtensionRanges.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestMultipleExtensionRanges.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 ProtobufUnittest.TestMultipleExtensionRanges.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test that really large tag numbers don't break anything.
    final public class TestReallyLargeTagNumber : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestReallyLargeTagNumber.Builder

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

        /// The largest possible tag number is 2^28 - 1, since the wire format uses
        /// three bits to communicate wire type.
        public fileprivate(set) var a:Int32! = nil
        public fileprivate(set) var hasA:Bool = false

        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 hasA {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:a)
            }
            if hasBb {
                try codedOutputStream.writeInt32(fieldNumber: 268435455, 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 hasA {
                serialize_size += a.computeInt32Size(fieldNumber: 1)
            }
            if hasBb {
                serialize_size += bb.computeInt32Size(fieldNumber: 268435455)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
            return ProtobufUnittest.TestReallyLargeTagNumber.classBuilder() as! ProtobufUnittest.TestReallyLargeTagNumber.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
            return classBuilder() as! ProtobufUnittest.TestReallyLargeTagNumber.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestReallyLargeTagNumber.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestReallyLargeTagNumber.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
            return try ProtobufUnittest.TestReallyLargeTagNumber.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestReallyLargeTagNumber) throws -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
            return try ProtobufUnittest.TestReallyLargeTagNumber.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasA {
                jsonMap["a"] = Int(a)
            }
            if hasBb {
                jsonMap["bb"] = Int(bb)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestReallyLargeTagNumber {
            return try ProtobufUnittest.TestReallyLargeTagNumber.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestReallyLargeTagNumber {
            return try ProtobufUnittest.TestReallyLargeTagNumber.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasA {
                output += "\(indent) a: \(String(describing: a)) \n"
            }
            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 hasA {
                    hashCode = (hashCode &* 31) &+ a.hashValue
                }
                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 "ProtobufUnittest.TestReallyLargeTagNumber"
        }
        override public func className() -> String {
            return "ProtobufUnittest.TestReallyLargeTagNumber"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            /// The largest possible tag number is 2^28 - 1, since the wire format uses
            /// three bits to communicate wire type.
            public var a:Int32 {
                get {
                    return builderResult.a
                }
                set (value) {
                    builderResult.hasA = true
                    builderResult.a = value
                }
            }
            public var hasA:Bool {
                get {
                    return builderResult.hasA
                }
            }
            @discardableResult
            public func setA(_ value:Int32) -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
                self.a = value
                return self
            }
            @discardableResult
            public func clearA() -> ProtobufUnittest.TestReallyLargeTagNumber.Builder{
                builderResult.hasA = false
                builderResult.a = nil
                return self
            }
            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) -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
                self.bb = value
                return self
            }
            @discardableResult
            public func clearBb() -> ProtobufUnittest.TestReallyLargeTagNumber.Builder{
                builderResult.hasBb = false
                builderResult.bb = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
                builderResult = ProtobufUnittest.TestReallyLargeTagNumber()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
                return try ProtobufUnittest.TestReallyLargeTagNumber.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestReallyLargeTagNumber {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestReallyLargeTagNumber {
                let returnMe:ProtobufUnittest.TestReallyLargeTagNumber = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestReallyLargeTagNumber) throws -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
                if other == ProtobufUnittest.TestReallyLargeTagNumber() {
                    return self
                }
                if other.hasA {
                    a = other.a
                }
                if other.hasBb {
                    bb = other.bb
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestReallyLargeTagNumber.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:
                        a = try codedInputStream.readInt32()

                    case 2147483640:
                        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 -> ProtobufUnittest.TestReallyLargeTagNumber.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestReallyLargeTagNumber.Builder()
                if let jsonValueA = jsonMap["a"] as? Int {
                    resultDecodedBuilder.a = Int32(jsonValueA)
                } else if let jsonValueA = jsonMap["a"] as? String {
                    resultDecodedBuilder.a = Int32(jsonValueA)!
                }
                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 -> ProtobufUnittest.TestReallyLargeTagNumber.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 ProtobufUnittest.TestReallyLargeTagNumber.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestRecursiveMessage : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestRecursiveMessage.Builder

        public static func == (lhs: ProtobufUnittest.TestRecursiveMessage, rhs: ProtobufUnittest.TestRecursiveMessage) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
            fieldCheck = fieldCheck && (lhs.hasI == rhs.hasI) && (!lhs.hasI || lhs.i == rhs.i)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var a:ProtobufUnittest.TestRecursiveMessage!
        public fileprivate(set) var hasA:Bool = false
        public fileprivate(set) var i:Int32! = nil
        public fileprivate(set) var hasI:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasA {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:a)
            }
            if hasI {
                try codedOutputStream.writeInt32(fieldNumber: 2, value:i)
            }
            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 hasA {
                if let varSizea = a?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizea
                }
            }
            if hasI {
                serialize_size += i.computeInt32Size(fieldNumber: 2)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestRecursiveMessage.Builder {
            return ProtobufUnittest.TestRecursiveMessage.classBuilder() as! ProtobufUnittest.TestRecursiveMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestRecursiveMessage.Builder {
            return classBuilder() as! ProtobufUnittest.TestRecursiveMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRecursiveMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRecursiveMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestRecursiveMessage.Builder {
            return try ProtobufUnittest.TestRecursiveMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestRecursiveMessage) throws -> ProtobufUnittest.TestRecursiveMessage.Builder {
            return try ProtobufUnittest.TestRecursiveMessage.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasA {
                jsonMap["a"] = try a.encode()
            }
            if hasI {
                jsonMap["i"] = Int(i)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestRecursiveMessage {
            return try ProtobufUnittest.TestRecursiveMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRecursiveMessage {
            return try ProtobufUnittest.TestRecursiveMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasA {
                output += "\(indent) a {\n"
                if let outDescA = a {
                    output += try outDescA.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasI {
                output += "\(indent) i: \(String(describing: i)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasA {
                    if let hashValuea = a?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuea
                    }
                }
                if hasI {
                    hashCode = (hashCode &* 31) &+ i.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var a:ProtobufUnittest.TestRecursiveMessage! {
                get {
                    if aBuilder_ != nil {
                        builderResult.a = aBuilder_.getMessage()
                    }
                    return builderResult.a
                }
                set (value) {
                    builderResult.hasA = value != nil
                    builderResult.a = value
                }
            }
            public var hasA:Bool {
                get {
                    return builderResult.hasA
                }
            }
            fileprivate var aBuilder_:ProtobufUnittest.TestRecursiveMessage.Builder! {
                didSet {
                    builderResult.hasA = true
                }
            }
            public func getABuilder() -> ProtobufUnittest.TestRecursiveMessage.Builder {
                if aBuilder_ == nil {
                    aBuilder_ = ProtobufUnittest.TestRecursiveMessage.Builder()
                    builderResult.a = aBuilder_.getMessage()
                    if a != nil {
                        try! aBuilder_.mergeFrom(other: a)
                    }
                }
                return aBuilder_
            }
            @discardableResult
            public func setA(_ value:ProtobufUnittest.TestRecursiveMessage!) -> ProtobufUnittest.TestRecursiveMessage.Builder {
                self.a = value
                return self
            }
            @discardableResult
            public func mergeA(value:ProtobufUnittest.TestRecursiveMessage) throws -> ProtobufUnittest.TestRecursiveMessage.Builder {
                if builderResult.hasA {
                    builderResult.a = try ProtobufUnittest.TestRecursiveMessage.builderWithPrototype(prototype:builderResult.a).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.a = value
                }
                builderResult.hasA = true
                return self
            }
            @discardableResult
            public func clearA() -> ProtobufUnittest.TestRecursiveMessage.Builder {
                aBuilder_ = nil
                builderResult.hasA = false
                builderResult.a = nil
                return self
            }
            public var i:Int32 {
                get {
                    return builderResult.i
                }
                set (value) {
                    builderResult.hasI = true
                    builderResult.i = value
                }
            }
            public var hasI:Bool {
                get {
                    return builderResult.hasI
                }
            }
            @discardableResult
            public func setI(_ value:Int32) -> ProtobufUnittest.TestRecursiveMessage.Builder {
                self.i = value
                return self
            }
            @discardableResult
            public func clearI() -> ProtobufUnittest.TestRecursiveMessage.Builder{
                builderResult.hasI = false
                builderResult.i = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestRecursiveMessage.Builder {
                builderResult = ProtobufUnittest.TestRecursiveMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestRecursiveMessage.Builder {
                return try ProtobufUnittest.TestRecursiveMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestRecursiveMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestRecursiveMessage {
                let returnMe:ProtobufUnittest.TestRecursiveMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestRecursiveMessage) throws -> ProtobufUnittest.TestRecursiveMessage.Builder {
                if other == ProtobufUnittest.TestRecursiveMessage() {
                    return self
                }
                if (other.hasA) {
                    try mergeA(value: other.a)
                }
                if other.hasI {
                    i = other.i
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRecursiveMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRecursiveMessage.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:ProtobufUnittest.TestRecursiveMessage.Builder = ProtobufUnittest.TestRecursiveMessage.Builder()
                        if hasA {
                            try subBuilder.mergeFrom(other: a)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        a = subBuilder.buildPartial()

                    case 16:
                        i = 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 -> ProtobufUnittest.TestRecursiveMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestRecursiveMessage.Builder()
                if let jsonValueA = jsonMap["a"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.a = try ProtobufUnittest.TestRecursiveMessage.Builder.decodeToBuilder(jsonMap:jsonValueA).build()

                }
                if let jsonValueI = jsonMap["i"] as? Int {
                    resultDecodedBuilder.i = Int32(jsonValueI)
                } else if let jsonValueI = jsonMap["i"] as? String {
                    resultDecodedBuilder.i = Int32(jsonValueI)!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRecursiveMessage.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 ProtobufUnittest.TestRecursiveMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test that mutual recursion works.
    final public class TestMutualRecursionA : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestMutualRecursionA.Builder

        public static func == (lhs: ProtobufUnittest.TestMutualRecursionA, rhs: ProtobufUnittest.TestMutualRecursionA) -> 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
        }

        public fileprivate(set) var bb:ProtobufUnittest.TestMutualRecursionB!
        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.writeMessage(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 {
                if let varSizebb = bb?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizebb
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestMutualRecursionA.Builder {
            return ProtobufUnittest.TestMutualRecursionA.classBuilder() as! ProtobufUnittest.TestMutualRecursionA.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestMutualRecursionA.Builder {
            return classBuilder() as! ProtobufUnittest.TestMutualRecursionA.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestMutualRecursionA.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestMutualRecursionA.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestMutualRecursionA.Builder {
            return try ProtobufUnittest.TestMutualRecursionA.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestMutualRecursionA) throws -> ProtobufUnittest.TestMutualRecursionA.Builder {
            return try ProtobufUnittest.TestMutualRecursionA.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"] = try bb.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestMutualRecursionA {
            return try ProtobufUnittest.TestMutualRecursionA.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestMutualRecursionA {
            return try ProtobufUnittest.TestMutualRecursionA.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasBb {
                output += "\(indent) bb {\n"
                if let outDescBb = bb {
                    output += try outDescBb.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasBb {
                    if let hashValuebb = bb?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuebb
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var bb:ProtobufUnittest.TestMutualRecursionB! {
                get {
                    if bbBuilder_ != nil {
                        builderResult.bb = bbBuilder_.getMessage()
                    }
                    return builderResult.bb
                }
                set (value) {
                    builderResult.hasBb = value != nil
                    builderResult.bb = value
                }
            }
            public var hasBb:Bool {
                get {
                    return builderResult.hasBb
                }
            }
            fileprivate var bbBuilder_:ProtobufUnittest.TestMutualRecursionB.Builder! {
                didSet {
                    builderResult.hasBb = true
                }
            }
            public func getBbBuilder() -> ProtobufUnittest.TestMutualRecursionB.Builder {
                if bbBuilder_ == nil {
                    bbBuilder_ = ProtobufUnittest.TestMutualRecursionB.Builder()
                    builderResult.bb = bbBuilder_.getMessage()
                    if bb != nil {
                        try! bbBuilder_.mergeFrom(other: bb)
                    }
                }
                return bbBuilder_
            }
            @discardableResult
            public func setBb(_ value:ProtobufUnittest.TestMutualRecursionB!) -> ProtobufUnittest.TestMutualRecursionA.Builder {
                self.bb = value
                return self
            }
            @discardableResult
            public func mergeBb(value:ProtobufUnittest.TestMutualRecursionB) throws -> ProtobufUnittest.TestMutualRecursionA.Builder {
                if builderResult.hasBb {
                    builderResult.bb = try ProtobufUnittest.TestMutualRecursionB.builderWithPrototype(prototype:builderResult.bb).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.bb = value
                }
                builderResult.hasBb = true
                return self
            }
            @discardableResult
            public func clearBb() -> ProtobufUnittest.TestMutualRecursionA.Builder {
                bbBuilder_ = nil
                builderResult.hasBb = false
                builderResult.bb = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestMutualRecursionA.Builder {
                builderResult = ProtobufUnittest.TestMutualRecursionA()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestMutualRecursionA.Builder {
                return try ProtobufUnittest.TestMutualRecursionA.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestMutualRecursionA {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestMutualRecursionA {
                let returnMe:ProtobufUnittest.TestMutualRecursionA = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestMutualRecursionA) throws -> ProtobufUnittest.TestMutualRecursionA.Builder {
                if other == ProtobufUnittest.TestMutualRecursionA() {
                    return self
                }
                if (other.hasBb) {
                    try mergeBb(value: other.bb)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestMutualRecursionA.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMutualRecursionA.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:ProtobufUnittest.TestMutualRecursionB.Builder = ProtobufUnittest.TestMutualRecursionB.Builder()
                        if hasBb {
                            try subBuilder.mergeFrom(other: bb)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        bb = 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 -> ProtobufUnittest.TestMutualRecursionA.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestMutualRecursionA.Builder()
                if let jsonValueBb = jsonMap["bb"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.bb = try ProtobufUnittest.TestMutualRecursionB.Builder.decodeToBuilder(jsonMap:jsonValueBb).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestMutualRecursionA.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 ProtobufUnittest.TestMutualRecursionA.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestMutualRecursionB : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestMutualRecursionB.Builder

        public static func == (lhs: ProtobufUnittest.TestMutualRecursionB, rhs: ProtobufUnittest.TestMutualRecursionB) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
            fieldCheck = fieldCheck && (lhs.hasOptionalInt32 == rhs.hasOptionalInt32) && (!lhs.hasOptionalInt32 || lhs.optionalInt32 == rhs.optionalInt32)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var a:ProtobufUnittest.TestMutualRecursionA!
        public fileprivate(set) var hasA:Bool = false
        public fileprivate(set) var optionalInt32:Int32! = nil
        public fileprivate(set) var hasOptionalInt32:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasA {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:a)
            }
            if hasOptionalInt32 {
                try codedOutputStream.writeInt32(fieldNumber: 2, value:optionalInt32)
            }
            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 hasA {
                if let varSizea = a?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizea
                }
            }
            if hasOptionalInt32 {
                serialize_size += optionalInt32.computeInt32Size(fieldNumber: 2)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestMutualRecursionB.Builder {
            return ProtobufUnittest.TestMutualRecursionB.classBuilder() as! ProtobufUnittest.TestMutualRecursionB.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestMutualRecursionB.Builder {
            return classBuilder() as! ProtobufUnittest.TestMutualRecursionB.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestMutualRecursionB.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestMutualRecursionB.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestMutualRecursionB.Builder {
            return try ProtobufUnittest.TestMutualRecursionB.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestMutualRecursionB) throws -> ProtobufUnittest.TestMutualRecursionB.Builder {
            return try ProtobufUnittest.TestMutualRecursionB.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasA {
                jsonMap["a"] = try a.encode()
            }
            if hasOptionalInt32 {
                jsonMap["optionalInt32"] = Int(optionalInt32)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestMutualRecursionB {
            return try ProtobufUnittest.TestMutualRecursionB.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestMutualRecursionB {
            return try ProtobufUnittest.TestMutualRecursionB.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasA {
                output += "\(indent) a {\n"
                if let outDescA = a {
                    output += try outDescA.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasOptionalInt32 {
                output += "\(indent) optionalInt32: \(String(describing: optionalInt32)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasA {
                    if let hashValuea = a?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuea
                    }
                }
                if hasOptionalInt32 {
                    hashCode = (hashCode &* 31) &+ optionalInt32.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var a:ProtobufUnittest.TestMutualRecursionA! {
                get {
                    if aBuilder_ != nil {
                        builderResult.a = aBuilder_.getMessage()
                    }
                    return builderResult.a
                }
                set (value) {
                    builderResult.hasA = value != nil
                    builderResult.a = value
                }
            }
            public var hasA:Bool {
                get {
                    return builderResult.hasA
                }
            }
            fileprivate var aBuilder_:ProtobufUnittest.TestMutualRecursionA.Builder! {
                didSet {
                    builderResult.hasA = true
                }
            }
            public func getABuilder() -> ProtobufUnittest.TestMutualRecursionA.Builder {
                if aBuilder_ == nil {
                    aBuilder_ = ProtobufUnittest.TestMutualRecursionA.Builder()
                    builderResult.a = aBuilder_.getMessage()
                    if a != nil {
                        try! aBuilder_.mergeFrom(other: a)
                    }
                }
                return aBuilder_
            }
            @discardableResult
            public func setA(_ value:ProtobufUnittest.TestMutualRecursionA!) -> ProtobufUnittest.TestMutualRecursionB.Builder {
                self.a = value
                return self
            }
            @discardableResult
            public func mergeA(value:ProtobufUnittest.TestMutualRecursionA) throws -> ProtobufUnittest.TestMutualRecursionB.Builder {
                if builderResult.hasA {
                    builderResult.a = try ProtobufUnittest.TestMutualRecursionA.builderWithPrototype(prototype:builderResult.a).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.a = value
                }
                builderResult.hasA = true
                return self
            }
            @discardableResult
            public func clearA() -> ProtobufUnittest.TestMutualRecursionB.Builder {
                aBuilder_ = nil
                builderResult.hasA = false
                builderResult.a = nil
                return self
            }
            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) -> ProtobufUnittest.TestMutualRecursionB.Builder {
                self.optionalInt32 = value
                return self
            }
            @discardableResult
            public func clearOptionalInt32() -> ProtobufUnittest.TestMutualRecursionB.Builder{
                builderResult.hasOptionalInt32 = false
                builderResult.optionalInt32 = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestMutualRecursionB.Builder {
                builderResult = ProtobufUnittest.TestMutualRecursionB()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestMutualRecursionB.Builder {
                return try ProtobufUnittest.TestMutualRecursionB.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestMutualRecursionB {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestMutualRecursionB {
                let returnMe:ProtobufUnittest.TestMutualRecursionB = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestMutualRecursionB) throws -> ProtobufUnittest.TestMutualRecursionB.Builder {
                if other == ProtobufUnittest.TestMutualRecursionB() {
                    return self
                }
                if (other.hasA) {
                    try mergeA(value: other.a)
                }
                if other.hasOptionalInt32 {
                    optionalInt32 = other.optionalInt32
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestMutualRecursionB.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMutualRecursionB.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:ProtobufUnittest.TestMutualRecursionA.Builder = ProtobufUnittest.TestMutualRecursionA.Builder()
                        if hasA {
                            try subBuilder.mergeFrom(other: a)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        a = subBuilder.buildPartial()

                    case 16:
                        optionalInt32 = 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 -> ProtobufUnittest.TestMutualRecursionB.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestMutualRecursionB.Builder()
                if let jsonValueA = jsonMap["a"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.a = try ProtobufUnittest.TestMutualRecursionA.Builder.decodeToBuilder(jsonMap:jsonValueA).build()

                }
                if let jsonValueOptionalInt32 = jsonMap["optionalInt32"] as? Int {
                    resultDecodedBuilder.optionalInt32 = Int32(jsonValueOptionalInt32)
                } else if let jsonValueOptionalInt32 = jsonMap["optionalInt32"] as? String {
                    resultDecodedBuilder.optionalInt32 = Int32(jsonValueOptionalInt32)!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestMutualRecursionB.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 ProtobufUnittest.TestMutualRecursionB.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test that groups have disjoint field numbers from their siblings and
    /// parents.  This is NOT possible in proto1; only google.protobuf.  When attempting
    /// to compile with proto1, this will emit an error; so we only include it
    /// in protobuf_unittest_proto.
    final public class TestDupFieldNumber : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestDupFieldNumber.Builder

        public static func == (lhs: ProtobufUnittest.TestDupFieldNumber, rhs: ProtobufUnittest.TestDupFieldNumber) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
            fieldCheck = fieldCheck && (lhs.hasFoo == rhs.hasFoo) && (!lhs.hasFoo || lhs.foo == rhs.foo)
            fieldCheck = fieldCheck && (lhs.hasBar == rhs.hasBar) && (!lhs.hasBar || lhs.bar == rhs.bar)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class Foo : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestDupFieldNumber.Foo.Builder

            public static func == (lhs: ProtobufUnittest.TestDupFieldNumber.Foo, rhs: ProtobufUnittest.TestDupFieldNumber.Foo) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var a:Int32! = nil
            public fileprivate(set) var hasA:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasA {
                    try codedOutputStream.writeInt32(fieldNumber: 1, value:a)
                }
                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 hasA {
                    serialize_size += a.computeInt32Size(fieldNumber: 1)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                return ProtobufUnittest.TestDupFieldNumber.Foo.classBuilder() as! ProtobufUnittest.TestDupFieldNumber.Foo.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                return classBuilder() as! ProtobufUnittest.TestDupFieldNumber.Foo.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestDupFieldNumber.Foo.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestDupFieldNumber.Foo.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                return try ProtobufUnittest.TestDupFieldNumber.Foo.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestDupFieldNumber.Foo) throws -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasA {
                    jsonMap["a"] = Int(a)
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestDupFieldNumber.Foo {
                return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDupFieldNumber.Foo {
                return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasA {
                    output += "\(indent) a: \(String(describing: a)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasA {
                        hashCode = (hashCode &* 31) &+ a.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var a:Int32 {
                    get {
                        return builderResult.a
                    }
                    set (value) {
                        builderResult.hasA = true
                        builderResult.a = value
                    }
                }
                public var hasA:Bool {
                    get {
                        return builderResult.hasA
                    }
                }
                @discardableResult
                public func setA(_ value:Int32) -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                    self.a = value
                    return self
                }
                @discardableResult
                public func clearA() -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder{
                    builderResult.hasA = false
                    builderResult.a = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                    builderResult = ProtobufUnittest.TestDupFieldNumber.Foo()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                    return try ProtobufUnittest.TestDupFieldNumber.Foo.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestDupFieldNumber.Foo {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestDupFieldNumber.Foo {
                    let returnMe:ProtobufUnittest.TestDupFieldNumber.Foo = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestDupFieldNumber.Foo) throws -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                    if other == ProtobufUnittest.TestDupFieldNumber.Foo() {
                        return self
                    }
                    if other.hasA {
                        a = other.a
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber.Foo.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:
                            a = 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 -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestDupFieldNumber.Foo.Builder()
                    if let jsonValueA = jsonMap["a"] as? Int {
                        resultDecodedBuilder.a = Int32(jsonValueA)
                    } else if let jsonValueA = jsonMap["a"] as? String {
                        resultDecodedBuilder.a = Int32(jsonValueA)!
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDupFieldNumber.Foo.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 ProtobufUnittest.TestDupFieldNumber.Foo.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //Nested type declaration start

        final public class Bar : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestDupFieldNumber.Bar.Builder

            public static func == (lhs: ProtobufUnittest.TestDupFieldNumber.Bar, rhs: ProtobufUnittest.TestDupFieldNumber.Bar) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var a:Int32! = nil
            public fileprivate(set) var hasA:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasA {
                    try codedOutputStream.writeInt32(fieldNumber: 1, value:a)
                }
                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 hasA {
                    serialize_size += a.computeInt32Size(fieldNumber: 1)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                return ProtobufUnittest.TestDupFieldNumber.Bar.classBuilder() as! ProtobufUnittest.TestDupFieldNumber.Bar.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                return classBuilder() as! ProtobufUnittest.TestDupFieldNumber.Bar.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestDupFieldNumber.Bar.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestDupFieldNumber.Bar.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                return try ProtobufUnittest.TestDupFieldNumber.Bar.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestDupFieldNumber.Bar) throws -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasA {
                    jsonMap["a"] = Int(a)
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestDupFieldNumber.Bar {
                return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDupFieldNumber.Bar {
                return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasA {
                    output += "\(indent) a: \(String(describing: a)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasA {
                        hashCode = (hashCode &* 31) &+ a.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var a:Int32 {
                    get {
                        return builderResult.a
                    }
                    set (value) {
                        builderResult.hasA = true
                        builderResult.a = value
                    }
                }
                public var hasA:Bool {
                    get {
                        return builderResult.hasA
                    }
                }
                @discardableResult
                public func setA(_ value:Int32) -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                    self.a = value
                    return self
                }
                @discardableResult
                public func clearA() -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder{
                    builderResult.hasA = false
                    builderResult.a = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                    builderResult = ProtobufUnittest.TestDupFieldNumber.Bar()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                    return try ProtobufUnittest.TestDupFieldNumber.Bar.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestDupFieldNumber.Bar {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestDupFieldNumber.Bar {
                    let returnMe:ProtobufUnittest.TestDupFieldNumber.Bar = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestDupFieldNumber.Bar) throws -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                    if other == ProtobufUnittest.TestDupFieldNumber.Bar() {
                        return self
                    }
                    if other.hasA {
                        a = other.a
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber.Bar.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:
                            a = 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 -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestDupFieldNumber.Bar.Builder()
                    if let jsonValueA = jsonMap["a"] as? Int {
                        resultDecodedBuilder.a = Int32(jsonValueA)
                    } else if let jsonValueA = jsonMap["a"] as? String {
                        resultDecodedBuilder.a = Int32(jsonValueA)!
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDupFieldNumber.Bar.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 ProtobufUnittest.TestDupFieldNumber.Bar.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end

        /// NO_PROTO1
        public fileprivate(set) var a:Int32! = nil
        public fileprivate(set) var hasA:Bool = false

        public fileprivate(set) var foo:ProtobufUnittest.TestDupFieldNumber.Foo!
        public fileprivate(set) var hasFoo:Bool = false
        public fileprivate(set) var bar:ProtobufUnittest.TestDupFieldNumber.Bar!
        public fileprivate(set) var hasBar:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasA {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:a)
            }
            if hasFoo {
                try codedOutputStream.writeGroup(fieldNumber: 2, value:foo)
            }
            if hasBar {
                try codedOutputStream.writeGroup(fieldNumber: 3, value:bar)
            }
            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 hasA {
                serialize_size += a.computeInt32Size(fieldNumber: 1)
            }
            if hasFoo {
                if let varSizefoo = foo?.computeGroupSize(fieldNumber: 2) {
                    serialize_size += varSizefoo
                }
            }
            if hasBar {
                if let varSizebar = bar?.computeGroupSize(fieldNumber: 3) {
                    serialize_size += varSizebar
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestDupFieldNumber.Builder {
            return ProtobufUnittest.TestDupFieldNumber.classBuilder() as! ProtobufUnittest.TestDupFieldNumber.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestDupFieldNumber.Builder {
            return classBuilder() as! ProtobufUnittest.TestDupFieldNumber.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestDupFieldNumber.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestDupFieldNumber.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestDupFieldNumber.Builder {
            return try ProtobufUnittest.TestDupFieldNumber.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestDupFieldNumber) throws -> ProtobufUnittest.TestDupFieldNumber.Builder {
            return try ProtobufUnittest.TestDupFieldNumber.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasA {
                jsonMap["a"] = Int(a)
            }
            if hasFoo {
                jsonMap["foo"] = try foo.encode()
            }
            if hasBar {
                jsonMap["bar"] = try bar.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestDupFieldNumber {
            return try ProtobufUnittest.TestDupFieldNumber.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDupFieldNumber {
            return try ProtobufUnittest.TestDupFieldNumber.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasA {
                output += "\(indent) a: \(String(describing: a)) \n"
            }
            if hasFoo {
                output += "\(indent) foo {\n"
                if let outDescFoo = foo {
                    output += try outDescFoo.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasBar {
                output += "\(indent) bar {\n"
                if let outDescBar = bar {
                    output += try outDescBar.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasA {
                    hashCode = (hashCode &* 31) &+ a.hashValue
                }
                if hasFoo {
                    if let hashValuefoo = foo?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefoo
                    }
                }
                if hasBar {
                    if let hashValuebar = bar?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuebar
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// NO_PROTO1
            public var a:Int32 {
                get {
                    return builderResult.a
                }
                set (value) {
                    builderResult.hasA = true
                    builderResult.a = value
                }
            }
            public var hasA:Bool {
                get {
                    return builderResult.hasA
                }
            }
            @discardableResult
            public func setA(_ value:Int32) -> ProtobufUnittest.TestDupFieldNumber.Builder {
                self.a = value
                return self
            }
            @discardableResult
            public func clearA() -> ProtobufUnittest.TestDupFieldNumber.Builder{
                builderResult.hasA = false
                builderResult.a = nil
                return self
            }
            public var foo:ProtobufUnittest.TestDupFieldNumber.Foo! {
                get {
                    if fooBuilder_ != nil {
                        builderResult.foo = fooBuilder_.getMessage()
                    }
                    return builderResult.foo
                }
                set (value) {
                    builderResult.hasFoo = value != nil
                    builderResult.foo = value
                }
            }
            public var hasFoo:Bool {
                get {
                    return builderResult.hasFoo
                }
            }
            fileprivate var fooBuilder_:ProtobufUnittest.TestDupFieldNumber.Foo.Builder! {
                didSet {
                    builderResult.hasFoo = true
                }
            }
            public func getFooBuilder() -> ProtobufUnittest.TestDupFieldNumber.Foo.Builder {
                if fooBuilder_ == nil {
                    fooBuilder_ = ProtobufUnittest.TestDupFieldNumber.Foo.Builder()
                    builderResult.foo = fooBuilder_.getMessage()
                    if foo != nil {
                        try! fooBuilder_.mergeFrom(other: foo)
                    }
                }
                return fooBuilder_
            }
            @discardableResult
            public func setFoo(_ value:ProtobufUnittest.TestDupFieldNumber.Foo!) -> ProtobufUnittest.TestDupFieldNumber.Builder {
                self.foo = value
                return self
            }
            @discardableResult
            public func mergeFoo(value:ProtobufUnittest.TestDupFieldNumber.Foo) throws -> ProtobufUnittest.TestDupFieldNumber.Builder {
                if builderResult.hasFoo {
                    builderResult.foo = try ProtobufUnittest.TestDupFieldNumber.Foo.builderWithPrototype(prototype:builderResult.foo).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.foo = value
                }
                builderResult.hasFoo = true
                return self
            }
            @discardableResult
            public func clearFoo() -> ProtobufUnittest.TestDupFieldNumber.Builder {
                fooBuilder_ = nil
                builderResult.hasFoo = false
                builderResult.foo = nil
                return self
            }
            public var bar:ProtobufUnittest.TestDupFieldNumber.Bar! {
                get {
                    if barBuilder_ != nil {
                        builderResult.bar = barBuilder_.getMessage()
                    }
                    return builderResult.bar
                }
                set (value) {
                    builderResult.hasBar = value != nil
                    builderResult.bar = value
                }
            }
            public var hasBar:Bool {
                get {
                    return builderResult.hasBar
                }
            }
            fileprivate var barBuilder_:ProtobufUnittest.TestDupFieldNumber.Bar.Builder! {
                didSet {
                    builderResult.hasBar = true
                }
            }
            public func getBarBuilder() -> ProtobufUnittest.TestDupFieldNumber.Bar.Builder {
                if barBuilder_ == nil {
                    barBuilder_ = ProtobufUnittest.TestDupFieldNumber.Bar.Builder()
                    builderResult.bar = barBuilder_.getMessage()
                    if bar != nil {
                        try! barBuilder_.mergeFrom(other: bar)
                    }
                }
                return barBuilder_
            }
            @discardableResult
            public func setBar(_ value:ProtobufUnittest.TestDupFieldNumber.Bar!) -> ProtobufUnittest.TestDupFieldNumber.Builder {
                self.bar = value
                return self
            }
            @discardableResult
            public func mergeBar(value:ProtobufUnittest.TestDupFieldNumber.Bar) throws -> ProtobufUnittest.TestDupFieldNumber.Builder {
                if builderResult.hasBar {
                    builderResult.bar = try ProtobufUnittest.TestDupFieldNumber.Bar.builderWithPrototype(prototype:builderResult.bar).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.bar = value
                }
                builderResult.hasBar = true
                return self
            }
            @discardableResult
            public func clearBar() -> ProtobufUnittest.TestDupFieldNumber.Builder {
                barBuilder_ = nil
                builderResult.hasBar = false
                builderResult.bar = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestDupFieldNumber.Builder {
                builderResult = ProtobufUnittest.TestDupFieldNumber()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestDupFieldNumber.Builder {
                return try ProtobufUnittest.TestDupFieldNumber.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestDupFieldNumber {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestDupFieldNumber {
                let returnMe:ProtobufUnittest.TestDupFieldNumber = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestDupFieldNumber) throws -> ProtobufUnittest.TestDupFieldNumber.Builder {
                if other == ProtobufUnittest.TestDupFieldNumber() {
                    return self
                }
                if other.hasA {
                    a = other.a
                }
                if (other.hasFoo) {
                    try mergeFoo(value: other.foo)
                }
                if (other.hasBar) {
                    try mergeBar(value: other.bar)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDupFieldNumber.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber.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:
                        a = try codedInputStream.readInt32()

                    case 19:
                        let subBuilder:ProtobufUnittest.TestDupFieldNumber.Foo.Builder = ProtobufUnittest.TestDupFieldNumber.Foo.Builder()
                        if hasFoo {
                            try subBuilder.mergeFrom(other: foo)
                        }
                        try codedInputStream.readGroup(fieldNumber: 2, builder:subBuilder, extensionRegistry:extensionRegistry)
                        foo = subBuilder.buildPartial()

                    case 27:
                        let subBuilder:ProtobufUnittest.TestDupFieldNumber.Bar.Builder = ProtobufUnittest.TestDupFieldNumber.Bar.Builder()
                        if hasBar {
                            try subBuilder.mergeFrom(other: bar)
                        }
                        try codedInputStream.readGroup(fieldNumber: 3, builder:subBuilder, extensionRegistry:extensionRegistry)
                        bar = 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 -> ProtobufUnittest.TestDupFieldNumber.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestDupFieldNumber.Builder()
                if let jsonValueA = jsonMap["a"] as? Int {
                    resultDecodedBuilder.a = Int32(jsonValueA)
                } else if let jsonValueA = jsonMap["a"] as? String {
                    resultDecodedBuilder.a = Int32(jsonValueA)!
                }
                if let jsonValueFoo = jsonMap["foo"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.foo = try ProtobufUnittest.TestDupFieldNumber.Foo.Builder.decodeToBuilder(jsonMap:jsonValueFoo).build()

                }
                if let jsonValueBar = jsonMap["bar"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.bar = try ProtobufUnittest.TestDupFieldNumber.Bar.Builder.decodeToBuilder(jsonMap:jsonValueBar).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDupFieldNumber.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 ProtobufUnittest.TestDupFieldNumber.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Additional messages for testing lazy fields.
    final public class TestEagerMessage : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestEagerMessage.Builder

        public static func == (lhs: ProtobufUnittest.TestEagerMessage, rhs: ProtobufUnittest.TestEagerMessage) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasSubMessage == rhs.hasSubMessage) && (!lhs.hasSubMessage || lhs.subMessage == rhs.subMessage)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var subMessage:ProtobufUnittest.TestAllTypes!
        public fileprivate(set) var hasSubMessage:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasSubMessage {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:subMessage)
            }
            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 hasSubMessage {
                if let varSizesubMessage = subMessage?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizesubMessage
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestEagerMessage.Builder {
            return ProtobufUnittest.TestEagerMessage.classBuilder() as! ProtobufUnittest.TestEagerMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestEagerMessage.Builder {
            return classBuilder() as! ProtobufUnittest.TestEagerMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestEagerMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestEagerMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestEagerMessage.Builder {
            return try ProtobufUnittest.TestEagerMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestEagerMessage) throws -> ProtobufUnittest.TestEagerMessage.Builder {
            return try ProtobufUnittest.TestEagerMessage.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasSubMessage {
                jsonMap["subMessage"] = try subMessage.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestEagerMessage {
            return try ProtobufUnittest.TestEagerMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestEagerMessage {
            return try ProtobufUnittest.TestEagerMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasSubMessage {
                output += "\(indent) subMessage {\n"
                if let outDescSubMessage = subMessage {
                    output += try outDescSubMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasSubMessage {
                    if let hashValuesubMessage = subMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuesubMessage
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var subMessage:ProtobufUnittest.TestAllTypes! {
                get {
                    if subMessageBuilder_ != nil {
                        builderResult.subMessage = subMessageBuilder_.getMessage()
                    }
                    return builderResult.subMessage
                }
                set (value) {
                    builderResult.hasSubMessage = value != nil
                    builderResult.subMessage = value
                }
            }
            public var hasSubMessage:Bool {
                get {
                    return builderResult.hasSubMessage
                }
            }
            fileprivate var subMessageBuilder_:ProtobufUnittest.TestAllTypes.Builder! {
                didSet {
                    builderResult.hasSubMessage = true
                }
            }
            public func getSubMessageBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
                if subMessageBuilder_ == nil {
                    subMessageBuilder_ = ProtobufUnittest.TestAllTypes.Builder()
                    builderResult.subMessage = subMessageBuilder_.getMessage()
                    if subMessage != nil {
                        try! subMessageBuilder_.mergeFrom(other: subMessage)
                    }
                }
                return subMessageBuilder_
            }
            @discardableResult
            public func setSubMessage(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestEagerMessage.Builder {
                self.subMessage = value
                return self
            }
            @discardableResult
            public func mergeSubMessage(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestEagerMessage.Builder {
                if builderResult.hasSubMessage {
                    builderResult.subMessage = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.subMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.subMessage = value
                }
                builderResult.hasSubMessage = true
                return self
            }
            @discardableResult
            public func clearSubMessage() -> ProtobufUnittest.TestEagerMessage.Builder {
                subMessageBuilder_ = nil
                builderResult.hasSubMessage = false
                builderResult.subMessage = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestEagerMessage.Builder {
                builderResult = ProtobufUnittest.TestEagerMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestEagerMessage.Builder {
                return try ProtobufUnittest.TestEagerMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestEagerMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestEagerMessage {
                let returnMe:ProtobufUnittest.TestEagerMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestEagerMessage) throws -> ProtobufUnittest.TestEagerMessage.Builder {
                if other == ProtobufUnittest.TestEagerMessage() {
                    return self
                }
                if (other.hasSubMessage) {
                    try mergeSubMessage(value: other.subMessage)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestEagerMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEagerMessage.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:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                        if hasSubMessage {
                            try subBuilder.mergeFrom(other: subMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        subMessage = 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 -> ProtobufUnittest.TestEagerMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestEagerMessage.Builder()
                if let jsonValueSubMessage = jsonMap["subMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.subMessage = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueSubMessage).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestEagerMessage.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 ProtobufUnittest.TestEagerMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestLazyMessage : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestLazyMessage.Builder

        public static func == (lhs: ProtobufUnittest.TestLazyMessage, rhs: ProtobufUnittest.TestLazyMessage) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasSubMessage == rhs.hasSubMessage) && (!lhs.hasSubMessage || lhs.subMessage == rhs.subMessage)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var subMessage:ProtobufUnittest.TestAllTypes!
        public fileprivate(set) var hasSubMessage:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasSubMessage {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:subMessage)
            }
            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 hasSubMessage {
                if let varSizesubMessage = subMessage?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizesubMessage
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestLazyMessage.Builder {
            return ProtobufUnittest.TestLazyMessage.classBuilder() as! ProtobufUnittest.TestLazyMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestLazyMessage.Builder {
            return classBuilder() as! ProtobufUnittest.TestLazyMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestLazyMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestLazyMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestLazyMessage.Builder {
            return try ProtobufUnittest.TestLazyMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestLazyMessage) throws -> ProtobufUnittest.TestLazyMessage.Builder {
            return try ProtobufUnittest.TestLazyMessage.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasSubMessage {
                jsonMap["subMessage"] = try subMessage.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestLazyMessage {
            return try ProtobufUnittest.TestLazyMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestLazyMessage {
            return try ProtobufUnittest.TestLazyMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasSubMessage {
                output += "\(indent) subMessage {\n"
                if let outDescSubMessage = subMessage {
                    output += try outDescSubMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasSubMessage {
                    if let hashValuesubMessage = subMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuesubMessage
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var subMessage:ProtobufUnittest.TestAllTypes! {
                get {
                    if subMessageBuilder_ != nil {
                        builderResult.subMessage = subMessageBuilder_.getMessage()
                    }
                    return builderResult.subMessage
                }
                set (value) {
                    builderResult.hasSubMessage = value != nil
                    builderResult.subMessage = value
                }
            }
            public var hasSubMessage:Bool {
                get {
                    return builderResult.hasSubMessage
                }
            }
            fileprivate var subMessageBuilder_:ProtobufUnittest.TestAllTypes.Builder! {
                didSet {
                    builderResult.hasSubMessage = true
                }
            }
            public func getSubMessageBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
                if subMessageBuilder_ == nil {
                    subMessageBuilder_ = ProtobufUnittest.TestAllTypes.Builder()
                    builderResult.subMessage = subMessageBuilder_.getMessage()
                    if subMessage != nil {
                        try! subMessageBuilder_.mergeFrom(other: subMessage)
                    }
                }
                return subMessageBuilder_
            }
            @discardableResult
            public func setSubMessage(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestLazyMessage.Builder {
                self.subMessage = value
                return self
            }
            @discardableResult
            public func mergeSubMessage(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestLazyMessage.Builder {
                if builderResult.hasSubMessage {
                    builderResult.subMessage = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.subMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.subMessage = value
                }
                builderResult.hasSubMessage = true
                return self
            }
            @discardableResult
            public func clearSubMessage() -> ProtobufUnittest.TestLazyMessage.Builder {
                subMessageBuilder_ = nil
                builderResult.hasSubMessage = false
                builderResult.subMessage = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestLazyMessage.Builder {
                builderResult = ProtobufUnittest.TestLazyMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestLazyMessage.Builder {
                return try ProtobufUnittest.TestLazyMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestLazyMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestLazyMessage {
                let returnMe:ProtobufUnittest.TestLazyMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestLazyMessage) throws -> ProtobufUnittest.TestLazyMessage.Builder {
                if other == ProtobufUnittest.TestLazyMessage() {
                    return self
                }
                if (other.hasSubMessage) {
                    try mergeSubMessage(value: other.subMessage)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestLazyMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestLazyMessage.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:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                        if hasSubMessage {
                            try subBuilder.mergeFrom(other: subMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        subMessage = 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 -> ProtobufUnittest.TestLazyMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestLazyMessage.Builder()
                if let jsonValueSubMessage = jsonMap["subMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.subMessage = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueSubMessage).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestLazyMessage.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 ProtobufUnittest.TestLazyMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Needed for a Python test.
    final public class TestNestedMessageHasBits : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestNestedMessageHasBits.Builder

        public static func == (lhs: ProtobufUnittest.TestNestedMessageHasBits, rhs: ProtobufUnittest.TestNestedMessageHasBits) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasOptionalNestedMessage == rhs.hasOptionalNestedMessage) && (!lhs.hasOptionalNestedMessage || lhs.optionalNestedMessage == rhs.optionalNestedMessage)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class NestedMessage : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder

            public static func == (lhs: ProtobufUnittest.TestNestedMessageHasBits.NestedMessage, rhs: ProtobufUnittest.TestNestedMessageHasBits.NestedMessage) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.nestedmessageRepeatedInt32 == rhs.nestedmessageRepeatedInt32)
                fieldCheck = fieldCheck && (lhs.nestedmessageRepeatedForeignmessage == rhs.nestedmessageRepeatedForeignmessage)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var nestedmessageRepeatedInt32:Array<Int32> = Array<Int32>()
            public fileprivate(set) var nestedmessageRepeatedForeignmessage:Array<ProtobufUnittest.ForeignMessage>  = Array<ProtobufUnittest.ForeignMessage>()
            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if !nestedmessageRepeatedInt32.isEmpty {
                    for oneValuenestedmessageRepeatedInt32 in nestedmessageRepeatedInt32 {
                        try codedOutputStream.writeInt32(fieldNumber: 1, value:oneValuenestedmessageRepeatedInt32)
                    }
                }
                for oneElementNestedmessageRepeatedForeignmessage in nestedmessageRepeatedForeignmessage {
                      try codedOutputStream.writeMessage(fieldNumber: 2, value:oneElementNestedmessageRepeatedForeignmessage)
                }
                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 dataSizeNestedmessageRepeatedInt32:Int32 = 0
                for oneValuenestedmessageRepeatedInt32 in nestedmessageRepeatedInt32 {
                    dataSizeNestedmessageRepeatedInt32 += oneValuenestedmessageRepeatedInt32.computeInt32SizeNoTag()
                }
                serialize_size += dataSizeNestedmessageRepeatedInt32
                serialize_size += 1 * Int32(nestedmessageRepeatedInt32.count)
                for oneElementNestedmessageRepeatedForeignmessage in nestedmessageRepeatedForeignmessage {
                    serialize_size += oneElementNestedmessageRepeatedForeignmessage.computeMessageSize(fieldNumber: 2)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                return ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.classBuilder() as! ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                return classBuilder() as! ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestNestedMessageHasBits.NestedMessage) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if !nestedmessageRepeatedInt32.isEmpty {
                    var jsonArrayNestedmessageRepeatedInt32:Array<Int> = []
                    for oneValueNestedmessageRepeatedInt32 in nestedmessageRepeatedInt32 {
                        jsonArrayNestedmessageRepeatedInt32.append(Int(oneValueNestedmessageRepeatedInt32))
                    }
                    jsonMap["nestedmessageRepeatedInt32"] = jsonArrayNestedmessageRepeatedInt32
                }
                if !nestedmessageRepeatedForeignmessage.isEmpty {
                    var jsonArrayNestedmessageRepeatedForeignmessage:Array<Dictionary<String,Any>> = []
                    for oneValueNestedmessageRepeatedForeignmessage in nestedmessageRepeatedForeignmessage {
                        let ecodedMessageNestedmessageRepeatedForeignmessage = try oneValueNestedmessageRepeatedForeignmessage.encode()
                        jsonArrayNestedmessageRepeatedForeignmessage.append(ecodedMessageNestedmessageRepeatedForeignmessage)
                    }
                    jsonMap["nestedmessageRepeatedForeignmessage"] = jsonArrayNestedmessageRepeatedForeignmessage
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
                return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
                return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                var nestedmessageRepeatedInt32ElementIndex:Int = 0
                for oneValueNestedmessageRepeatedInt32 in nestedmessageRepeatedInt32  {
                    output += "\(indent) nestedmessageRepeatedInt32[\(nestedmessageRepeatedInt32ElementIndex)]: \(oneValueNestedmessageRepeatedInt32)\n"
                    nestedmessageRepeatedInt32ElementIndex += 1
                }
                var nestedmessageRepeatedForeignmessageElementIndex:Int = 0
                for oneElementNestedmessageRepeatedForeignmessage in nestedmessageRepeatedForeignmessage {
                    output += "\(indent) nestedmessageRepeatedForeignmessage[\(nestedmessageRepeatedForeignmessageElementIndex)] {\n"
                    output += try oneElementNestedmessageRepeatedForeignmessage.getDescription(indent: "\(indent)  ")
                    output += "\(indent)}\n"
                    nestedmessageRepeatedForeignmessageElementIndex += 1
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    for oneValueNestedmessageRepeatedInt32 in nestedmessageRepeatedInt32 {
                        hashCode = (hashCode &* 31) &+ oneValueNestedmessageRepeatedInt32.hashValue
                    }
                    for oneElementNestedmessageRepeatedForeignmessage in nestedmessageRepeatedForeignmessage {
                        hashCode = (hashCode &* 31) &+ oneElementNestedmessageRepeatedForeignmessage.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var nestedmessageRepeatedInt32:Array<Int32> {
                    get {
                        return builderResult.nestedmessageRepeatedInt32
                    }
                    set (array) {
                        builderResult.nestedmessageRepeatedInt32 = array
                    }
                }
                @discardableResult
                public func setNestedmessageRepeatedInt32(_ value:Array<Int32>) -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                    self.nestedmessageRepeatedInt32 = value
                    return self
                }
                @discardableResult
                public func clearNestedmessageRepeatedInt32() -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                    builderResult.nestedmessageRepeatedInt32.removeAll(keepingCapacity: false)
                    return self
                }
                public var nestedmessageRepeatedForeignmessage:Array<ProtobufUnittest.ForeignMessage> {
                    get {
                        return builderResult.nestedmessageRepeatedForeignmessage
                    }
                    set (value) {
                        builderResult.nestedmessageRepeatedForeignmessage = value
                    }
                }
                @discardableResult
                public func setNestedmessageRepeatedForeignmessage(_ value:Array<ProtobufUnittest.ForeignMessage>) -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                    self.nestedmessageRepeatedForeignmessage = value
                    return self
                }
                @discardableResult
                public func clearNestedmessageRepeatedForeignmessage() -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                    builderResult.nestedmessageRepeatedForeignmessage.removeAll(keepingCapacity: false)
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                    builderResult = ProtobufUnittest.TestNestedMessageHasBits.NestedMessage()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                    return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
                    let returnMe:ProtobufUnittest.TestNestedMessageHasBits.NestedMessage = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestNestedMessageHasBits.NestedMessage) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                    if other == ProtobufUnittest.TestNestedMessageHasBits.NestedMessage() {
                        return self
                    }
                    if !other.nestedmessageRepeatedInt32.isEmpty {
                        builderResult.nestedmessageRepeatedInt32 += other.nestedmessageRepeatedInt32
                    }
                    if !other.nestedmessageRepeatedForeignmessage.isEmpty  {
                         builderResult.nestedmessageRepeatedForeignmessage += other.nestedmessageRepeatedForeignmessage
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedMessageHasBits.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:
                            nestedmessageRepeatedInt32 += [try codedInputStream.readInt32()]

                        case 18:
                            let subBuilder = ProtobufUnittest.ForeignMessage.Builder()
                            try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                            nestedmessageRepeatedForeignmessage.append(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 -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder()
                    if let jsonValueNestedmessageRepeatedInt32 = jsonMap["nestedmessageRepeatedInt32"] as? Array<Int> {
                        var jsonArrayNestedmessageRepeatedInt32:Array<Int32> = []
                        for oneValueNestedmessageRepeatedInt32 in jsonValueNestedmessageRepeatedInt32 {
                            jsonArrayNestedmessageRepeatedInt32.append(Int32(oneValueNestedmessageRepeatedInt32))
                        }
                        resultDecodedBuilder.nestedmessageRepeatedInt32 = jsonArrayNestedmessageRepeatedInt32
                    }
                    if let jsonValueNestedmessageRepeatedForeignmessage = jsonMap["nestedmessageRepeatedForeignmessage"] as? Array<Dictionary<String,Any>> {
                        var jsonArrayNestedmessageRepeatedForeignmessage:Array<ProtobufUnittest.ForeignMessage> = []
                        for oneValueNestedmessageRepeatedForeignmessage in jsonValueNestedmessageRepeatedForeignmessage {
                            let messageFromStringNestedmessageRepeatedForeignmessage = try ProtobufUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:oneValueNestedmessageRepeatedForeignmessage).build()

                            jsonArrayNestedmessageRepeatedForeignmessage.append(messageFromStringNestedmessageRepeatedForeignmessage)
                        }
                        resultDecodedBuilder.nestedmessageRepeatedForeignmessage = jsonArrayNestedmessageRepeatedForeignmessage
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestNestedMessageHasBits.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 ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end

        public fileprivate(set) var optionalNestedMessage:ProtobufUnittest.TestNestedMessageHasBits.NestedMessage!
        public fileprivate(set) var hasOptionalNestedMessage:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasOptionalNestedMessage {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:optionalNestedMessage)
            }
            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 hasOptionalNestedMessage {
                if let varSizeoptionalNestedMessage = optionalNestedMessage?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizeoptionalNestedMessage
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
            return ProtobufUnittest.TestNestedMessageHasBits.classBuilder() as! ProtobufUnittest.TestNestedMessageHasBits.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
            return classBuilder() as! ProtobufUnittest.TestNestedMessageHasBits.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestNestedMessageHasBits.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestNestedMessageHasBits.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
            return try ProtobufUnittest.TestNestedMessageHasBits.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestNestedMessageHasBits) throws -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
            return try ProtobufUnittest.TestNestedMessageHasBits.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasOptionalNestedMessage {
                jsonMap["optionalNestedMessage"] = try optionalNestedMessage.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestNestedMessageHasBits {
            return try ProtobufUnittest.TestNestedMessageHasBits.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestNestedMessageHasBits {
            return try ProtobufUnittest.TestNestedMessageHasBits.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasOptionalNestedMessage {
                output += "\(indent) optionalNestedMessage {\n"
                if let outDescOptionalNestedMessage = optionalNestedMessage {
                    output += try outDescOptionalNestedMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasOptionalNestedMessage {
                    if let hashValueoptionalNestedMessage = optionalNestedMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalNestedMessage
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var optionalNestedMessage:ProtobufUnittest.TestNestedMessageHasBits.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_:ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder! {
                didSet {
                    builderResult.hasOptionalNestedMessage = true
                }
            }
            public func getOptionalNestedMessageBuilder() -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder {
                if optionalNestedMessageBuilder_ == nil {
                    optionalNestedMessageBuilder_ = ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder()
                    builderResult.optionalNestedMessage = optionalNestedMessageBuilder_.getMessage()
                    if optionalNestedMessage != nil {
                        try! optionalNestedMessageBuilder_.mergeFrom(other: optionalNestedMessage)
                    }
                }
                return optionalNestedMessageBuilder_
            }
            @discardableResult
            public func setOptionalNestedMessage(_ value:ProtobufUnittest.TestNestedMessageHasBits.NestedMessage!) -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
                self.optionalNestedMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalNestedMessage(value:ProtobufUnittest.TestNestedMessageHasBits.NestedMessage) throws -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
                if builderResult.hasOptionalNestedMessage {
                    builderResult.optionalNestedMessage = try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.builderWithPrototype(prototype:builderResult.optionalNestedMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalNestedMessage = value
                }
                builderResult.hasOptionalNestedMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalNestedMessage() -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
                optionalNestedMessageBuilder_ = nil
                builderResult.hasOptionalNestedMessage = false
                builderResult.optionalNestedMessage = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
                builderResult = ProtobufUnittest.TestNestedMessageHasBits()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
                return try ProtobufUnittest.TestNestedMessageHasBits.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestNestedMessageHasBits {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestNestedMessageHasBits {
                let returnMe:ProtobufUnittest.TestNestedMessageHasBits = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestNestedMessageHasBits) throws -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
                if other == ProtobufUnittest.TestNestedMessageHasBits() {
                    return self
                }
                if (other.hasOptionalNestedMessage) {
                    try mergeOptionalNestedMessage(value: other.optionalNestedMessage)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedMessageHasBits.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:ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder = ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder()
                        if hasOptionalNestedMessage {
                            try subBuilder.mergeFrom(other: optionalNestedMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalNestedMessage = 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 -> ProtobufUnittest.TestNestedMessageHasBits.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestNestedMessageHasBits.Builder()
                if let jsonValueOptionalNestedMessage = jsonMap["optionalNestedMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalNestedMessage = try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonValueOptionalNestedMessage).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestNestedMessageHasBits.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 ProtobufUnittest.TestNestedMessageHasBits.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test message with CamelCase field names.  This violates Protocol Buffer
    /// standard style.
    final public class TestCamelCaseFieldNames : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestCamelCaseFieldNames.Builder

        public static func == (lhs: ProtobufUnittest.TestCamelCaseFieldNames, rhs: ProtobufUnittest.TestCamelCaseFieldNames) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasPrimitiveField == rhs.hasPrimitiveField) && (!lhs.hasPrimitiveField || lhs.primitiveField == rhs.primitiveField)
            fieldCheck = fieldCheck && (lhs.hasStringField == rhs.hasStringField) && (!lhs.hasStringField || lhs.stringField == rhs.stringField)
            fieldCheck = fieldCheck && (lhs.hasEnumField == rhs.hasEnumField) && (!lhs.hasEnumField || lhs.enumField == rhs.enumField)
            fieldCheck = fieldCheck && (lhs.hasMessageField == rhs.hasMessageField) && (!lhs.hasMessageField || lhs.messageField == rhs.messageField)
            fieldCheck = fieldCheck && (lhs.hasStringPieceField == rhs.hasStringPieceField) && (!lhs.hasStringPieceField || lhs.stringPieceField == rhs.stringPieceField)
            fieldCheck = fieldCheck && (lhs.hasCordField == rhs.hasCordField) && (!lhs.hasCordField || lhs.cordField == rhs.cordField)
            fieldCheck = fieldCheck && (lhs.repeatedPrimitiveField == rhs.repeatedPrimitiveField)
            fieldCheck = fieldCheck && (lhs.repeatedStringField == rhs.repeatedStringField)
            fieldCheck = fieldCheck && (lhs.repeatedEnumField == rhs.repeatedEnumField)
            fieldCheck = fieldCheck && (lhs.repeatedMessageField == rhs.repeatedMessageField)
            fieldCheck = fieldCheck && (lhs.repeatedStringPieceField == rhs.repeatedStringPieceField)
            fieldCheck = fieldCheck && (lhs.repeatedCordField == rhs.repeatedCordField)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var primitiveField:Int32! = nil
        public fileprivate(set) var hasPrimitiveField:Bool = false

        public fileprivate(set) var stringField:String! = nil
        public fileprivate(set) var hasStringField:Bool = false

        public fileprivate(set) var enumField:ProtobufUnittest.ForeignEnum = ProtobufUnittest.ForeignEnum.foreignFoo
        public fileprivate(set) var hasEnumField:Bool = false
        public fileprivate(set) var messageField:ProtobufUnittest.ForeignMessage!
        public fileprivate(set) var hasMessageField:Bool = false
        public fileprivate(set) var stringPieceField:String! = nil
        public fileprivate(set) var hasStringPieceField:Bool = false

        public fileprivate(set) var cordField:String! = nil
        public fileprivate(set) var hasCordField:Bool = false

        public fileprivate(set) var repeatedPrimitiveField:Array<Int32> = Array<Int32>()
        public fileprivate(set) var repeatedStringField:Array<String> = Array<String>()
        private var repeatedEnumFieldMemoizedSerializedSize:Int32 = 0
        public fileprivate(set) var repeatedEnumField:Array<ProtobufUnittest.ForeignEnum> = Array<ProtobufUnittest.ForeignEnum>()
        public fileprivate(set) var repeatedMessageField:Array<ProtobufUnittest.ForeignMessage>  = Array<ProtobufUnittest.ForeignMessage>()
        public fileprivate(set) var repeatedStringPieceField:Array<String> = Array<String>()
        public fileprivate(set) var repeatedCordField:Array<String> = Array<String>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasPrimitiveField {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:primitiveField)
            }
            if hasStringField {
                try codedOutputStream.writeString(fieldNumber: 2, value:stringField)
            }
            if hasEnumField {
                try codedOutputStream.writeEnum(fieldNumber: 3, value:enumField.rawValue)
            }
            if hasMessageField {
                try codedOutputStream.writeMessage(fieldNumber: 4, value:messageField)
            }
            if hasStringPieceField {
                try codedOutputStream.writeString(fieldNumber: 5, value:stringPieceField)
            }
            if hasCordField {
                try codedOutputStream.writeString(fieldNumber: 6, value:cordField)
            }
            if !repeatedPrimitiveField.isEmpty {
                for oneValuerepeatedPrimitiveField in repeatedPrimitiveField {
                    try codedOutputStream.writeInt32(fieldNumber: 7, value:oneValuerepeatedPrimitiveField)
                }
            }
            if !repeatedStringField.isEmpty {
                for oneValuerepeatedStringField in repeatedStringField {
                    try codedOutputStream.writeString(fieldNumber: 8, value:oneValuerepeatedStringField)
                }
            }
            for oneValueOfrepeatedEnumField in repeatedEnumField {
                  try codedOutputStream.writeEnum(fieldNumber: 9, value:oneValueOfrepeatedEnumField.rawValue)
            }
            for oneElementRepeatedMessageField in repeatedMessageField {
                  try codedOutputStream.writeMessage(fieldNumber: 10, value:oneElementRepeatedMessageField)
            }
            if !repeatedStringPieceField.isEmpty {
                for oneValuerepeatedStringPieceField in repeatedStringPieceField {
                    try codedOutputStream.writeString(fieldNumber: 11, value:oneValuerepeatedStringPieceField)
                }
            }
            if !repeatedCordField.isEmpty {
                for oneValuerepeatedCordField in repeatedCordField {
                    try codedOutputStream.writeString(fieldNumber: 12, value:oneValuerepeatedCordField)
                }
            }
            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 hasPrimitiveField {
                serialize_size += primitiveField.computeInt32Size(fieldNumber: 1)
            }
            if hasStringField {
                serialize_size += stringField.computeStringSize(fieldNumber: 2)
            }
            if (hasEnumField) {
                serialize_size += enumField.rawValue.computeEnumSize(fieldNumber: 3)
            }
            if hasMessageField {
                if let varSizemessageField = messageField?.computeMessageSize(fieldNumber: 4) {
                    serialize_size += varSizemessageField
                }
            }
            if hasStringPieceField {
                serialize_size += stringPieceField.computeStringSize(fieldNumber: 5)
            }
            if hasCordField {
                serialize_size += cordField.computeStringSize(fieldNumber: 6)
            }
            var dataSizeRepeatedPrimitiveField:Int32 = 0
            for oneValuerepeatedPrimitiveField in repeatedPrimitiveField {
                dataSizeRepeatedPrimitiveField += oneValuerepeatedPrimitiveField.computeInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedPrimitiveField
            serialize_size += 1 * Int32(repeatedPrimitiveField.count)
            var dataSizeRepeatedStringField:Int32 = 0
            for oneValuerepeatedStringField in repeatedStringField {
                dataSizeRepeatedStringField += oneValuerepeatedStringField.computeStringSizeNoTag()
            }
            serialize_size += dataSizeRepeatedStringField
            serialize_size += 1 * Int32(repeatedStringField.count)
            var dataSizerepeatedEnumField:Int32 = 0
            for oneValueOfrepeatedEnumField in repeatedEnumField {
                dataSizerepeatedEnumField += oneValueOfrepeatedEnumField.rawValue.computeEnumSizeNoTag()
            }
            serialize_size += dataSizerepeatedEnumField
            serialize_size += (1 * Int32(repeatedEnumField.count))
            for oneElementRepeatedMessageField in repeatedMessageField {
                serialize_size += oneElementRepeatedMessageField.computeMessageSize(fieldNumber: 10)
            }
            var dataSizeRepeatedStringPieceField:Int32 = 0
            for oneValuerepeatedStringPieceField in repeatedStringPieceField {
                dataSizeRepeatedStringPieceField += oneValuerepeatedStringPieceField.computeStringSizeNoTag()
            }
            serialize_size += dataSizeRepeatedStringPieceField
            serialize_size += 1 * Int32(repeatedStringPieceField.count)
            var dataSizeRepeatedCordField:Int32 = 0
            for oneValuerepeatedCordField in repeatedCordField {
                dataSizeRepeatedCordField += oneValuerepeatedCordField.computeStringSizeNoTag()
            }
            serialize_size += dataSizeRepeatedCordField
            serialize_size += 1 * Int32(repeatedCordField.count)
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
            return ProtobufUnittest.TestCamelCaseFieldNames.classBuilder() as! ProtobufUnittest.TestCamelCaseFieldNames.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
            return classBuilder() as! ProtobufUnittest.TestCamelCaseFieldNames.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestCamelCaseFieldNames.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestCamelCaseFieldNames.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
            return try ProtobufUnittest.TestCamelCaseFieldNames.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestCamelCaseFieldNames) throws -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
            return try ProtobufUnittest.TestCamelCaseFieldNames.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasPrimitiveField {
                jsonMap["PrimitiveField"] = Int(primitiveField)
            }
            if hasStringField {
                jsonMap["StringField"] = stringField
            }
            if hasEnumField {
                jsonMap["EnumField"] = enumField.toString()
            }
            if hasMessageField {
                jsonMap["MessageField"] = try messageField.encode()
            }
            if hasStringPieceField {
                jsonMap["StringPieceField"] = stringPieceField
            }
            if hasCordField {
                jsonMap["CordField"] = cordField
            }
            if !repeatedPrimitiveField.isEmpty {
                var jsonArrayRepeatedPrimitiveField:Array<Int> = []
                for oneValueRepeatedPrimitiveField in repeatedPrimitiveField {
                    jsonArrayRepeatedPrimitiveField.append(Int(oneValueRepeatedPrimitiveField))
                }
                jsonMap["RepeatedPrimitiveField"] = jsonArrayRepeatedPrimitiveField
            }
            if !repeatedStringField.isEmpty {
                var jsonArrayRepeatedStringField:Array<String> = []
                for oneValueRepeatedStringField in repeatedStringField {
                    jsonArrayRepeatedStringField.append(oneValueRepeatedStringField)
                }
                jsonMap["RepeatedStringField"] = jsonArrayRepeatedStringField
            }
            if !repeatedEnumField.isEmpty {
                var jsonArrayRepeatedEnumField:Array<String> = []
                for oneValueRepeatedEnumField in repeatedEnumField {
                    jsonArrayRepeatedEnumField.append(oneValueRepeatedEnumField.toString())
                }
                jsonMap["RepeatedEnumField"] = jsonArrayRepeatedEnumField
            }
            if !repeatedMessageField.isEmpty {
                var jsonArrayRepeatedMessageField:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedMessageField in repeatedMessageField {
                    let ecodedMessageRepeatedMessageField = try oneValueRepeatedMessageField.encode()
                    jsonArrayRepeatedMessageField.append(ecodedMessageRepeatedMessageField)
                }
                jsonMap["RepeatedMessageField"] = jsonArrayRepeatedMessageField
            }
            if !repeatedStringPieceField.isEmpty {
                var jsonArrayRepeatedStringPieceField:Array<String> = []
                for oneValueRepeatedStringPieceField in repeatedStringPieceField {
                    jsonArrayRepeatedStringPieceField.append(oneValueRepeatedStringPieceField)
                }
                jsonMap["RepeatedStringPieceField"] = jsonArrayRepeatedStringPieceField
            }
            if !repeatedCordField.isEmpty {
                var jsonArrayRepeatedCordField:Array<String> = []
                for oneValueRepeatedCordField in repeatedCordField {
                    jsonArrayRepeatedCordField.append(oneValueRepeatedCordField)
                }
                jsonMap["RepeatedCordField"] = jsonArrayRepeatedCordField
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestCamelCaseFieldNames {
            return try ProtobufUnittest.TestCamelCaseFieldNames.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestCamelCaseFieldNames {
            return try ProtobufUnittest.TestCamelCaseFieldNames.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasPrimitiveField {
                output += "\(indent) primitiveField: \(String(describing: primitiveField)) \n"
            }
            if hasStringField {
                output += "\(indent) stringField: \(String(describing: stringField)) \n"
            }
            if (hasEnumField) {
                output += "\(indent) enumField: \(enumField.description)\n"
            }
            if hasMessageField {
                output += "\(indent) messageField {\n"
                if let outDescMessageField = messageField {
                    output += try outDescMessageField.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasStringPieceField {
                output += "\(indent) stringPieceField: \(String(describing: stringPieceField)) \n"
            }
            if hasCordField {
                output += "\(indent) cordField: \(String(describing: cordField)) \n"
            }
            var repeatedPrimitiveFieldElementIndex:Int = 0
            for oneValueRepeatedPrimitiveField in repeatedPrimitiveField  {
                output += "\(indent) repeatedPrimitiveField[\(repeatedPrimitiveFieldElementIndex)]: \(oneValueRepeatedPrimitiveField)\n"
                repeatedPrimitiveFieldElementIndex += 1
            }
            var repeatedStringFieldElementIndex:Int = 0
            for oneValueRepeatedStringField in repeatedStringField  {
                output += "\(indent) repeatedStringField[\(repeatedStringFieldElementIndex)]: \(oneValueRepeatedStringField)\n"
                repeatedStringFieldElementIndex += 1
            }
            var repeatedEnumFieldElementIndex:Int = 0
            for oneValueOfrepeatedEnumField in repeatedEnumField {
                output += "\(indent) repeatedEnumField[\(repeatedEnumFieldElementIndex)]: \(oneValueOfrepeatedEnumField.description)\n"
                repeatedEnumFieldElementIndex += 1
            }
            var repeatedMessageFieldElementIndex:Int = 0
            for oneElementRepeatedMessageField in repeatedMessageField {
                output += "\(indent) repeatedMessageField[\(repeatedMessageFieldElementIndex)] {\n"
                output += try oneElementRepeatedMessageField.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedMessageFieldElementIndex += 1
            }
            var repeatedStringPieceFieldElementIndex:Int = 0
            for oneValueRepeatedStringPieceField in repeatedStringPieceField  {
                output += "\(indent) repeatedStringPieceField[\(repeatedStringPieceFieldElementIndex)]: \(oneValueRepeatedStringPieceField)\n"
                repeatedStringPieceFieldElementIndex += 1
            }
            var repeatedCordFieldElementIndex:Int = 0
            for oneValueRepeatedCordField in repeatedCordField  {
                output += "\(indent) repeatedCordField[\(repeatedCordFieldElementIndex)]: \(oneValueRepeatedCordField)\n"
                repeatedCordFieldElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasPrimitiveField {
                    hashCode = (hashCode &* 31) &+ primitiveField.hashValue
                }
                if hasStringField {
                    hashCode = (hashCode &* 31) &+ stringField.hashValue
                }
                if hasEnumField {
                     hashCode = (hashCode &* 31) &+ enumField.hashValue
                }
                if hasMessageField {
                    if let hashValuemessageField = messageField?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuemessageField
                    }
                }
                if hasStringPieceField {
                    hashCode = (hashCode &* 31) &+ stringPieceField.hashValue
                }
                if hasCordField {
                    hashCode = (hashCode &* 31) &+ cordField.hashValue
                }
                for oneValueRepeatedPrimitiveField in repeatedPrimitiveField {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedPrimitiveField.hashValue
                }
                for oneValueRepeatedStringField in repeatedStringField {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedStringField.hashValue
                }
                for oneValueOfrepeatedEnumField in repeatedEnumField {
                    hashCode = (hashCode &* 31) &+ oneValueOfrepeatedEnumField.hashValue
                }
                for oneElementRepeatedMessageField in repeatedMessageField {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedMessageField.hashValue
                }
                for oneValueRepeatedStringPieceField in repeatedStringPieceField {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedStringPieceField.hashValue
                }
                for oneValueRepeatedCordField in repeatedCordField {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedCordField.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var primitiveField:Int32 {
                get {
                    return builderResult.primitiveField
                }
                set (value) {
                    builderResult.hasPrimitiveField = true
                    builderResult.primitiveField = value
                }
            }
            public var hasPrimitiveField:Bool {
                get {
                    return builderResult.hasPrimitiveField
                }
            }
            @discardableResult
            public func setPrimitiveField(_ value:Int32) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.primitiveField = value
                return self
            }
            @discardableResult
            public func clearPrimitiveField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder{
                builderResult.hasPrimitiveField = false
                builderResult.primitiveField = nil
                return self
            }
            public var stringField:String {
                get {
                    return builderResult.stringField
                }
                set (value) {
                    builderResult.hasStringField = true
                    builderResult.stringField = value
                }
            }
            public var hasStringField:Bool {
                get {
                    return builderResult.hasStringField
                }
            }
            @discardableResult
            public func setStringField(_ value:String) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.stringField = value
                return self
            }
            @discardableResult
            public func clearStringField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder{
                builderResult.hasStringField = false
                builderResult.stringField = nil
                return self
            }
                public var enumField:ProtobufUnittest.ForeignEnum {
                    get {
                        return builderResult.enumField
                    }
                    set (value) {
                        builderResult.hasEnumField = true
                        builderResult.enumField = value
                    }
                }
                public var hasEnumField:Bool{
                    get {
                        return builderResult.hasEnumField
                    }
                }
            @discardableResult
                public func setEnumField(_ value:ProtobufUnittest.ForeignEnum) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                  self.enumField = value
                  return self
                }
            @discardableResult
                public func clearEnumField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                   builderResult.hasEnumField = false
                   builderResult.enumField = .foreignFoo
                   return self
                }
            public var messageField:ProtobufUnittest.ForeignMessage! {
                get {
                    if messageFieldBuilder_ != nil {
                        builderResult.messageField = messageFieldBuilder_.getMessage()
                    }
                    return builderResult.messageField
                }
                set (value) {
                    builderResult.hasMessageField = value != nil
                    builderResult.messageField = value
                }
            }
            public var hasMessageField:Bool {
                get {
                    return builderResult.hasMessageField
                }
            }
            fileprivate var messageFieldBuilder_:ProtobufUnittest.ForeignMessage.Builder! {
                didSet {
                    builderResult.hasMessageField = true
                }
            }
            public func getMessageFieldBuilder() -> ProtobufUnittest.ForeignMessage.Builder {
                if messageFieldBuilder_ == nil {
                    messageFieldBuilder_ = ProtobufUnittest.ForeignMessage.Builder()
                    builderResult.messageField = messageFieldBuilder_.getMessage()
                    if messageField != nil {
                        try! messageFieldBuilder_.mergeFrom(other: messageField)
                    }
                }
                return messageFieldBuilder_
            }
            @discardableResult
            public func setMessageField(_ value:ProtobufUnittest.ForeignMessage!) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.messageField = value
                return self
            }
            @discardableResult
            public func mergeMessageField(value:ProtobufUnittest.ForeignMessage) throws -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                if builderResult.hasMessageField {
                    builderResult.messageField = try ProtobufUnittest.ForeignMessage.builderWithPrototype(prototype:builderResult.messageField).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.messageField = value
                }
                builderResult.hasMessageField = true
                return self
            }
            @discardableResult
            public func clearMessageField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                messageFieldBuilder_ = nil
                builderResult.hasMessageField = false
                builderResult.messageField = nil
                return self
            }
            public var stringPieceField:String {
                get {
                    return builderResult.stringPieceField
                }
                set (value) {
                    builderResult.hasStringPieceField = true
                    builderResult.stringPieceField = value
                }
            }
            public var hasStringPieceField:Bool {
                get {
                    return builderResult.hasStringPieceField
                }
            }
            @discardableResult
            public func setStringPieceField(_ value:String) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.stringPieceField = value
                return self
            }
            @discardableResult
            public func clearStringPieceField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder{
                builderResult.hasStringPieceField = false
                builderResult.stringPieceField = nil
                return self
            }
            public var cordField:String {
                get {
                    return builderResult.cordField
                }
                set (value) {
                    builderResult.hasCordField = true
                    builderResult.cordField = value
                }
            }
            public var hasCordField:Bool {
                get {
                    return builderResult.hasCordField
                }
            }
            @discardableResult
            public func setCordField(_ value:String) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.cordField = value
                return self
            }
            @discardableResult
            public func clearCordField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder{
                builderResult.hasCordField = false
                builderResult.cordField = nil
                return self
            }
            public var repeatedPrimitiveField:Array<Int32> {
                get {
                    return builderResult.repeatedPrimitiveField
                }
                set (array) {
                    builderResult.repeatedPrimitiveField = array
                }
            }
            @discardableResult
            public func setRepeatedPrimitiveField(_ value:Array<Int32>) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.repeatedPrimitiveField = value
                return self
            }
            @discardableResult
            public func clearRepeatedPrimitiveField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                builderResult.repeatedPrimitiveField.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedStringField:Array<String> {
                get {
                    return builderResult.repeatedStringField
                }
                set (array) {
                    builderResult.repeatedStringField = array
                }
            }
            @discardableResult
            public func setRepeatedStringField(_ value:Array<String>) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.repeatedStringField = value
                return self
            }
            @discardableResult
            public func clearRepeatedStringField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                builderResult.repeatedStringField.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedEnumField:Array<ProtobufUnittest.ForeignEnum> {
                get {
                    return builderResult.repeatedEnumField
                }
                set (value) {
                    builderResult.repeatedEnumField = value
                }
            }
            @discardableResult
            public func setRepeatedEnumField(_ value:Array<ProtobufUnittest.ForeignEnum>) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.repeatedEnumField = value
                return self
            }
            @discardableResult
            public func clearRepeatedEnumField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                builderResult.repeatedEnumField.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedMessageField:Array<ProtobufUnittest.ForeignMessage> {
                get {
                    return builderResult.repeatedMessageField
                }
                set (value) {
                    builderResult.repeatedMessageField = value
                }
            }
            @discardableResult
            public func setRepeatedMessageField(_ value:Array<ProtobufUnittest.ForeignMessage>) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.repeatedMessageField = value
                return self
            }
            @discardableResult
            public func clearRepeatedMessageField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                builderResult.repeatedMessageField.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedStringPieceField:Array<String> {
                get {
                    return builderResult.repeatedStringPieceField
                }
                set (array) {
                    builderResult.repeatedStringPieceField = array
                }
            }
            @discardableResult
            public func setRepeatedStringPieceField(_ value:Array<String>) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.repeatedStringPieceField = value
                return self
            }
            @discardableResult
            public func clearRepeatedStringPieceField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                builderResult.repeatedStringPieceField.removeAll(keepingCapacity: false)
                return self
            }
            public var repeatedCordField:Array<String> {
                get {
                    return builderResult.repeatedCordField
                }
                set (array) {
                    builderResult.repeatedCordField = array
                }
            }
            @discardableResult
            public func setRepeatedCordField(_ value:Array<String>) -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                self.repeatedCordField = value
                return self
            }
            @discardableResult
            public func clearRepeatedCordField() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                builderResult.repeatedCordField.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                builderResult = ProtobufUnittest.TestCamelCaseFieldNames()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                return try ProtobufUnittest.TestCamelCaseFieldNames.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestCamelCaseFieldNames {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestCamelCaseFieldNames {
                let returnMe:ProtobufUnittest.TestCamelCaseFieldNames = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestCamelCaseFieldNames) throws -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                if other == ProtobufUnittest.TestCamelCaseFieldNames() {
                    return self
                }
                if other.hasPrimitiveField {
                    primitiveField = other.primitiveField
                }
                if other.hasStringField {
                    stringField = other.stringField
                }
                if other.hasEnumField {
                    enumField = other.enumField
                }
                if (other.hasMessageField) {
                    try mergeMessageField(value: other.messageField)
                }
                if other.hasStringPieceField {
                    stringPieceField = other.stringPieceField
                }
                if other.hasCordField {
                    cordField = other.cordField
                }
                if !other.repeatedPrimitiveField.isEmpty {
                    builderResult.repeatedPrimitiveField += other.repeatedPrimitiveField
                }
                if !other.repeatedStringField.isEmpty {
                    builderResult.repeatedStringField += other.repeatedStringField
                }
                if !other.repeatedEnumField.isEmpty {
                     builderResult.repeatedEnumField += other.repeatedEnumField
                }
                if !other.repeatedMessageField.isEmpty  {
                     builderResult.repeatedMessageField += other.repeatedMessageField
                }
                if !other.repeatedStringPieceField.isEmpty {
                    builderResult.repeatedStringPieceField += other.repeatedStringPieceField
                }
                if !other.repeatedCordField.isEmpty {
                    builderResult.repeatedCordField += other.repeatedCordField
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestCamelCaseFieldNames.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:
                        primitiveField = try codedInputStream.readInt32()

                    case 18:
                        stringField = try codedInputStream.readString()

                    case 24:
                        let valueIntenumField = try codedInputStream.readEnum()
                        if let enumsenumField = ProtobufUnittest.ForeignEnum(rawValue:valueIntenumField){
                            enumField = enumsenumField
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 3, value:Int64(valueIntenumField))
                        }

                    case 34:
                        let subBuilder:ProtobufUnittest.ForeignMessage.Builder = ProtobufUnittest.ForeignMessage.Builder()
                        if hasMessageField {
                            try subBuilder.mergeFrom(other: messageField)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        messageField = subBuilder.buildPartial()

                    case 42:
                        stringPieceField = try codedInputStream.readString()

                    case 50:
                        cordField = try codedInputStream.readString()

                    case 56:
                        repeatedPrimitiveField += [try codedInputStream.readInt32()]

                    case 66:
                        repeatedStringField += [try codedInputStream.readString()]

                    case 72:
                        let valueIntrepeatedEnumField = try codedInputStream.readEnum()
                        if let enumsrepeatedEnumField = ProtobufUnittest.ForeignEnum(rawValue:valueIntrepeatedEnumField) {
                            builderResult.repeatedEnumField.append(enumsrepeatedEnumField)
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 9, value:Int64(valueIntrepeatedEnumField))
                        }

                    case 82:
                        let subBuilder = ProtobufUnittest.ForeignMessage.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        repeatedMessageField.append(subBuilder.buildPartial())

                    case 90:
                        repeatedStringPieceField += [try codedInputStream.readString()]

                    case 98:
                        repeatedCordField += [try codedInputStream.readString()]

                    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 -> ProtobufUnittest.TestCamelCaseFieldNames.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestCamelCaseFieldNames.Builder()
                if let jsonValuePrimitiveField = jsonMap["PrimitiveField"] as? Int {
                    resultDecodedBuilder.primitiveField = Int32(jsonValuePrimitiveField)
                } else if let jsonValuePrimitiveField = jsonMap["PrimitiveField"] as? String {
                    resultDecodedBuilder.primitiveField = Int32(jsonValuePrimitiveField)!
                }
                if let jsonValueStringField = jsonMap["StringField"] as? String {
                    resultDecodedBuilder.stringField = jsonValueStringField
                }
                if let jsonValueEnumField = jsonMap["EnumField"] as? String {
                    resultDecodedBuilder.enumField = try ProtobufUnittest.ForeignEnum.fromString(jsonValueEnumField)
                }
                if let jsonValueMessageField = jsonMap["MessageField"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.messageField = try ProtobufUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:jsonValueMessageField).build()

                }
                if let jsonValueStringPieceField = jsonMap["StringPieceField"] as? String {
                    resultDecodedBuilder.stringPieceField = jsonValueStringPieceField
                }
                if let jsonValueCordField = jsonMap["CordField"] as? String {
                    resultDecodedBuilder.cordField = jsonValueCordField
                }
                if let jsonValueRepeatedPrimitiveField = jsonMap["RepeatedPrimitiveField"] as? Array<Int> {
                    var jsonArrayRepeatedPrimitiveField:Array<Int32> = []
                    for oneValueRepeatedPrimitiveField in jsonValueRepeatedPrimitiveField {
                        jsonArrayRepeatedPrimitiveField.append(Int32(oneValueRepeatedPrimitiveField))
                    }
                    resultDecodedBuilder.repeatedPrimitiveField = jsonArrayRepeatedPrimitiveField
                }
                if let jsonValueRepeatedStringField = jsonMap["RepeatedStringField"] as? Array<String> {
                    var jsonArrayRepeatedStringField:Array<String> = []
                    for oneValueRepeatedStringField in jsonValueRepeatedStringField {
                        jsonArrayRepeatedStringField.append(oneValueRepeatedStringField)
                    }
                    resultDecodedBuilder.repeatedStringField = jsonArrayRepeatedStringField
                }
                if let jsonValueRepeatedEnumField = jsonMap["RepeatedEnumField"] as? Array<String> {
                    var jsonArrayRepeatedEnumField:Array<ProtobufUnittest.ForeignEnum> = []
                    for oneValueRepeatedEnumField in jsonValueRepeatedEnumField {
                        let enumFromStringRepeatedEnumField = try ProtobufUnittest.ForeignEnum.fromString(oneValueRepeatedEnumField)
                        jsonArrayRepeatedEnumField.append(enumFromStringRepeatedEnumField)
                    }
                    resultDecodedBuilder.repeatedEnumField = jsonArrayRepeatedEnumField
                }
                if let jsonValueRepeatedMessageField = jsonMap["RepeatedMessageField"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedMessageField:Array<ProtobufUnittest.ForeignMessage> = []
                    for oneValueRepeatedMessageField in jsonValueRepeatedMessageField {
                        let messageFromStringRepeatedMessageField = try ProtobufUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:oneValueRepeatedMessageField).build()

                        jsonArrayRepeatedMessageField.append(messageFromStringRepeatedMessageField)
                    }
                    resultDecodedBuilder.repeatedMessageField = jsonArrayRepeatedMessageField
                }
                if let jsonValueRepeatedStringPieceField = jsonMap["RepeatedStringPieceField"] as? Array<String> {
                    var jsonArrayRepeatedStringPieceField:Array<String> = []
                    for oneValueRepeatedStringPieceField in jsonValueRepeatedStringPieceField {
                        jsonArrayRepeatedStringPieceField.append(oneValueRepeatedStringPieceField)
                    }
                    resultDecodedBuilder.repeatedStringPieceField = jsonArrayRepeatedStringPieceField
                }
                if let jsonValueRepeatedCordField = jsonMap["RepeatedCordField"] as? Array<String> {
                    var jsonArrayRepeatedCordField:Array<String> = []
                    for oneValueRepeatedCordField in jsonValueRepeatedCordField {
                        jsonArrayRepeatedCordField.append(oneValueRepeatedCordField)
                    }
                    resultDecodedBuilder.repeatedCordField = jsonArrayRepeatedCordField
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestCamelCaseFieldNames.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 ProtobufUnittest.TestCamelCaseFieldNames.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// We list fields out of order, to ensure that we're using field number and not
    /// field index to determine serialization order.
    final public class TestFieldOrderings : ExtendableMessage {
        public typealias BuilderType = ProtobufUnittest.TestFieldOrderings.Builder

        public static func == (lhs: ProtobufUnittest.TestFieldOrderings, rhs: ProtobufUnittest.TestFieldOrderings) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasMyInt == rhs.hasMyInt) && (!lhs.hasMyInt || lhs.myInt == rhs.myInt)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:2, endExclusive:11)
            fieldCheck = fieldCheck && (lhs.hasMyString == rhs.hasMyString) && (!lhs.hasMyString || lhs.myString == rhs.myString)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:12, endExclusive:101)
            fieldCheck = fieldCheck && (lhs.hasMyFloat == rhs.hasMyFloat) && (!lhs.hasMyFloat || lhs.myFloat == rhs.myFloat)
            fieldCheck = fieldCheck && (lhs.hasOptionalNestedMessage == rhs.hasOptionalNestedMessage) && (!lhs.hasOptionalNestedMessage || lhs.optionalNestedMessage == rhs.optionalNestedMessage)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class NestedMessage : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder

            public static func == (lhs: ProtobufUnittest.TestFieldOrderings.NestedMessage, rhs: ProtobufUnittest.TestFieldOrderings.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.hasOo == rhs.hasOo) && (!lhs.hasOo || lhs.oo == rhs.oo)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var oo:Int64! = nil
            public fileprivate(set) var hasOo:Bool = false

            /// 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)
                }
                if hasOo {
                    try codedOutputStream.writeInt64(fieldNumber: 2, value:oo)
                }
                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)
                }
                if hasOo {
                    serialize_size += oo.computeInt64Size(fieldNumber: 2)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                return ProtobufUnittest.TestFieldOrderings.NestedMessage.classBuilder() as! ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                return classBuilder() as! ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                return try ProtobufUnittest.TestFieldOrderings.NestedMessage.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestFieldOrderings.NestedMessage) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                return try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasOo {
                    jsonMap["oo"] = "\(oo!)"
                }
                if hasBb {
                    jsonMap["bb"] = Int(bb)
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
                return try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
                return try ProtobufUnittest.TestFieldOrderings.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"
                }
                if hasOo {
                    output += "\(indent) oo: \(String(describing: oo)) \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
                    }
                    if hasOo {
                        hashCode = (hashCode &* 31) &+ oo.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var oo:Int64 {
                    get {
                        return builderResult.oo
                    }
                    set (value) {
                        builderResult.hasOo = true
                        builderResult.oo = value
                    }
                }
                public var hasOo:Bool {
                    get {
                        return builderResult.hasOo
                    }
                }
                @discardableResult
                public func setOo(_ value:Int64) -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                    self.oo = value
                    return self
                }
                @discardableResult
                public func clearOo() -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder{
                    builderResult.hasOo = false
                    builderResult.oo = nil
                    return self
                }
                /// 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) -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                    self.bb = value
                    return self
                }
                @discardableResult
                public func clearBb() -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder{
                    builderResult.hasBb = false
                    builderResult.bb = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                    builderResult = ProtobufUnittest.TestFieldOrderings.NestedMessage()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                    return try ProtobufUnittest.TestFieldOrderings.NestedMessage.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
                    let returnMe:ProtobufUnittest.TestFieldOrderings.NestedMessage = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestFieldOrderings.NestedMessage) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                    if other == ProtobufUnittest.TestFieldOrderings.NestedMessage() {
                        return self
                    }
                    if other.hasOo {
                        oo = other.oo
                    }
                    if other.hasBb {
                        bb = other.bb
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestFieldOrderings.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()

                        case 16:
                            oo = try codedInputStream.readInt64()

                        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 -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder()
                    if let jsonValueOo = jsonMap["oo"] as? String {
                        resultDecodedBuilder.oo = Int64(jsonValueOo)!
                    } else if let jsonValueOo = jsonMap["oo"] as? Int {
                        resultDecodedBuilder.oo = Int64(jsonValueOo)
                    }
                    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 -> ProtobufUnittest.TestFieldOrderings.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 ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end

        public fileprivate(set) var myString:String! = nil
        public fileprivate(set) var hasMyString:Bool = false

        public fileprivate(set) var myInt:Int64! = nil
        public fileprivate(set) var hasMyInt:Bool = false

        public fileprivate(set) var myFloat:Float! = nil
        public fileprivate(set) var hasMyFloat:Bool = false

        public fileprivate(set) var optionalNestedMessage:ProtobufUnittest.TestFieldOrderings.NestedMessage!
        public fileprivate(set) var hasOptionalNestedMessage:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            try extensionsAreInitialized()}
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasMyInt {
                try codedOutputStream.writeInt64(fieldNumber: 1, value:myInt)
            }
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:2, endExclusive:11)
            if hasMyString {
                try codedOutputStream.writeString(fieldNumber: 11, value:myString)
            }
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:12, endExclusive:101)
            if hasMyFloat {
                try codedOutputStream.writeFloat(fieldNumber: 101, value:myFloat)
            }
            if hasOptionalNestedMessage {
                try codedOutputStream.writeMessage(fieldNumber: 200, value:optionalNestedMessage)
            }
            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 hasMyInt {
                serialize_size += myInt.computeInt64Size(fieldNumber: 1)
            }
            if hasMyString {
                serialize_size += myString.computeStringSize(fieldNumber: 11)
            }
            if hasMyFloat {
                serialize_size += myFloat.computeFloatSize(fieldNumber: 101)
            }
            if hasOptionalNestedMessage {
                if let varSizeoptionalNestedMessage = optionalNestedMessage?.computeMessageSize(fieldNumber: 200) {
                    serialize_size += varSizeoptionalNestedMessage
                }
            }
            serialize_size += extensionsSerializedSize()
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestFieldOrderings.Builder {
            return ProtobufUnittest.TestFieldOrderings.classBuilder() as! ProtobufUnittest.TestFieldOrderings.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestFieldOrderings.Builder {
            return classBuilder() as! ProtobufUnittest.TestFieldOrderings.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestFieldOrderings.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestFieldOrderings.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestFieldOrderings.Builder {
            return try ProtobufUnittest.TestFieldOrderings.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestFieldOrderings) throws -> ProtobufUnittest.TestFieldOrderings.Builder {
            return try ProtobufUnittest.TestFieldOrderings.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasMyString {
                jsonMap["myString"] = myString
            }
            if hasMyInt {
                jsonMap["myInt"] = "\(myInt!)"
            }
            if hasMyFloat {
                jsonMap["myFloat"] = Float(myFloat)
            }
            if hasOptionalNestedMessage {
                jsonMap["optionalNestedMessage"] = try optionalNestedMessage.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestFieldOrderings {
            return try ProtobufUnittest.TestFieldOrderings.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestFieldOrderings {
            return try ProtobufUnittest.TestFieldOrderings.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasMyInt {
                output += "\(indent) myInt: \(String(describing: myInt)) \n"
            }
            output += try getExtensionDescription(startInclusive:2, endExclusive:11, indent:indent)
            if hasMyString {
                output += "\(indent) myString: \(String(describing: myString)) \n"
            }
            output += try getExtensionDescription(startInclusive:12, endExclusive:101, indent:indent)
            if hasMyFloat {
                output += "\(indent) myFloat: \(String(describing: myFloat)) \n"
            }
            if hasOptionalNestedMessage {
                output += "\(indent) optionalNestedMessage {\n"
                if let outDescOptionalNestedMessage = optionalNestedMessage {
                    output += try outDescOptionalNestedMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasMyInt {
                    hashCode = (hashCode &* 31) &+ myInt.hashValue
                }
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 2, endExclusive:11))
                if hasMyString {
                    hashCode = (hashCode &* 31) &+ myString.hashValue
                }
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 12, endExclusive:101))
                if hasMyFloat {
                    hashCode = (hashCode &* 31) &+ myFloat.hashValue
                }
                if hasOptionalNestedMessage {
                    if let hashValueoptionalNestedMessage = optionalNestedMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalNestedMessage
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

        final public class Builder : ExtendableMessageBuilder {
            fileprivate var builderResult:ProtobufUnittest.TestFieldOrderings = ProtobufUnittest.TestFieldOrderings()
            public func getMessage() -> ProtobufUnittest.TestFieldOrderings {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            public var myString:String {
                get {
                    return builderResult.myString
                }
                set (value) {
                    builderResult.hasMyString = true
                    builderResult.myString = value
                }
            }
            public var hasMyString:Bool {
                get {
                    return builderResult.hasMyString
                }
            }
            @discardableResult
            public func setMyString(_ value:String) -> ProtobufUnittest.TestFieldOrderings.Builder {
                self.myString = value
                return self
            }
            @discardableResult
            public func clearMyString() -> ProtobufUnittest.TestFieldOrderings.Builder{
                builderResult.hasMyString = false
                builderResult.myString = nil
                return self
            }
            public var myInt:Int64 {
                get {
                    return builderResult.myInt
                }
                set (value) {
                    builderResult.hasMyInt = true
                    builderResult.myInt = value
                }
            }
            public var hasMyInt:Bool {
                get {
                    return builderResult.hasMyInt
                }
            }
            @discardableResult
            public func setMyInt(_ value:Int64) -> ProtobufUnittest.TestFieldOrderings.Builder {
                self.myInt = value
                return self
            }
            @discardableResult
            public func clearMyInt() -> ProtobufUnittest.TestFieldOrderings.Builder{
                builderResult.hasMyInt = false
                builderResult.myInt = nil
                return self
            }
            public var myFloat:Float {
                get {
                    return builderResult.myFloat
                }
                set (value) {
                    builderResult.hasMyFloat = true
                    builderResult.myFloat = value
                }
            }
            public var hasMyFloat:Bool {
                get {
                    return builderResult.hasMyFloat
                }
            }
            @discardableResult
            public func setMyFloat(_ value:Float) -> ProtobufUnittest.TestFieldOrderings.Builder {
                self.myFloat = value
                return self
            }
            @discardableResult
            public func clearMyFloat() -> ProtobufUnittest.TestFieldOrderings.Builder{
                builderResult.hasMyFloat = false
                builderResult.myFloat = nil
                return self
            }
            public var optionalNestedMessage:ProtobufUnittest.TestFieldOrderings.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_:ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder! {
                didSet {
                    builderResult.hasOptionalNestedMessage = true
                }
            }
            public func getOptionalNestedMessageBuilder() -> ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder {
                if optionalNestedMessageBuilder_ == nil {
                    optionalNestedMessageBuilder_ = ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder()
                    builderResult.optionalNestedMessage = optionalNestedMessageBuilder_.getMessage()
                    if optionalNestedMessage != nil {
                        try! optionalNestedMessageBuilder_.mergeFrom(other: optionalNestedMessage)
                    }
                }
                return optionalNestedMessageBuilder_
            }
            @discardableResult
            public func setOptionalNestedMessage(_ value:ProtobufUnittest.TestFieldOrderings.NestedMessage!) -> ProtobufUnittest.TestFieldOrderings.Builder {
                self.optionalNestedMessage = value
                return self
            }
            @discardableResult
            public func mergeOptionalNestedMessage(value:ProtobufUnittest.TestFieldOrderings.NestedMessage) throws -> ProtobufUnittest.TestFieldOrderings.Builder {
                if builderResult.hasOptionalNestedMessage {
                    builderResult.optionalNestedMessage = try ProtobufUnittest.TestFieldOrderings.NestedMessage.builderWithPrototype(prototype:builderResult.optionalNestedMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalNestedMessage = value
                }
                builderResult.hasOptionalNestedMessage = true
                return self
            }
            @discardableResult
            public func clearOptionalNestedMessage() -> ProtobufUnittest.TestFieldOrderings.Builder {
                optionalNestedMessageBuilder_ = nil
                builderResult.hasOptionalNestedMessage = false
                builderResult.optionalNestedMessage = nil
                return self
            }
            override public var internalGetResult:ExtendableMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestFieldOrderings.Builder {
                builderResult = ProtobufUnittest.TestFieldOrderings()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestFieldOrderings.Builder {
                return try ProtobufUnittest.TestFieldOrderings.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestFieldOrderings {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestFieldOrderings {
                let returnMe:ProtobufUnittest.TestFieldOrderings = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestFieldOrderings) throws -> ProtobufUnittest.TestFieldOrderings.Builder {
                if other == ProtobufUnittest.TestFieldOrderings() {
                    return self
                }
                if other.hasMyString {
                    myString = other.myString
                }
                if other.hasMyInt {
                    myInt = other.myInt
                }
                if other.hasMyFloat {
                    myFloat = other.myFloat
                }
                if (other.hasOptionalNestedMessage) {
                    try mergeOptionalNestedMessage(value: other.optionalNestedMessage)
                }
                try mergeExtensionFields(other: other)
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestFieldOrderings.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestFieldOrderings.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:
                        myInt = try codedInputStream.readInt64()

                    case 90:
                        myString = try codedInputStream.readString()

                    case 813:
                        myFloat = try codedInputStream.readFloat()

                    case 1602:
                        let subBuilder:ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder = ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder()
                        if hasOptionalNestedMessage {
                            try subBuilder.mergeFrom(other: optionalNestedMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalNestedMessage = 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 -> ProtobufUnittest.TestFieldOrderings.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestFieldOrderings.Builder()
                if let jsonValueMyString = jsonMap["myString"] as? String {
                    resultDecodedBuilder.myString = jsonValueMyString
                }
                if let jsonValueMyInt = jsonMap["myInt"] as? String {
                    resultDecodedBuilder.myInt = Int64(jsonValueMyInt)!
                } else if let jsonValueMyInt = jsonMap["myInt"] as? Int {
                    resultDecodedBuilder.myInt = Int64(jsonValueMyInt)
                }
                if let jsonValueMyFloat = jsonMap["myFloat"] as? Float {
                    resultDecodedBuilder.myFloat = Float(jsonValueMyFloat)
                } else if let jsonValueMyFloat = jsonMap["myFloat"] as? String {
                    resultDecodedBuilder.myFloat = Float(jsonValueMyFloat)!
                }
                if let jsonValueOptionalNestedMessage = jsonMap["optionalNestedMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalNestedMessage = try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonValueOptionalNestedMessage).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestFieldOrderings.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 ProtobufUnittest.TestFieldOrderings.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestExtremeDefaultValues : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestExtremeDefaultValues.Builder

        public static func == (lhs: ProtobufUnittest.TestExtremeDefaultValues, rhs: ProtobufUnittest.TestExtremeDefaultValues) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasEscapedBytes == rhs.hasEscapedBytes) && (!lhs.hasEscapedBytes || lhs.escapedBytes == rhs.escapedBytes)
            fieldCheck = fieldCheck && (lhs.hasLargeUint32 == rhs.hasLargeUint32) && (!lhs.hasLargeUint32 || lhs.largeUint32 == rhs.largeUint32)
            fieldCheck = fieldCheck && (lhs.hasLargeUint64 == rhs.hasLargeUint64) && (!lhs.hasLargeUint64 || lhs.largeUint64 == rhs.largeUint64)
            fieldCheck = fieldCheck && (lhs.hasSmallInt32 == rhs.hasSmallInt32) && (!lhs.hasSmallInt32 || lhs.smallInt32 == rhs.smallInt32)
            fieldCheck = fieldCheck && (lhs.hasSmallInt64 == rhs.hasSmallInt64) && (!lhs.hasSmallInt64 || lhs.smallInt64 == rhs.smallInt64)
            fieldCheck = fieldCheck && (lhs.hasUtf8String == rhs.hasUtf8String) && (!lhs.hasUtf8String || lhs.utf8String == rhs.utf8String)
            fieldCheck = fieldCheck && (lhs.hasZeroFloat == rhs.hasZeroFloat) && (!lhs.hasZeroFloat || lhs.zeroFloat == rhs.zeroFloat)
            fieldCheck = fieldCheck && (lhs.hasOneFloat == rhs.hasOneFloat) && (!lhs.hasOneFloat || lhs.oneFloat == rhs.oneFloat)
            fieldCheck = fieldCheck && (lhs.hasSmallFloat == rhs.hasSmallFloat) && (!lhs.hasSmallFloat || lhs.smallFloat == rhs.smallFloat)
            fieldCheck = fieldCheck && (lhs.hasNegativeOneFloat == rhs.hasNegativeOneFloat) && (!lhs.hasNegativeOneFloat || lhs.negativeOneFloat == rhs.negativeOneFloat)
            fieldCheck = fieldCheck && (lhs.hasNegativeFloat == rhs.hasNegativeFloat) && (!lhs.hasNegativeFloat || lhs.negativeFloat == rhs.negativeFloat)
            fieldCheck = fieldCheck && (lhs.hasLargeFloat == rhs.hasLargeFloat) && (!lhs.hasLargeFloat || lhs.largeFloat == rhs.largeFloat)
            fieldCheck = fieldCheck && (lhs.hasSmallNegativeFloat == rhs.hasSmallNegativeFloat) && (!lhs.hasSmallNegativeFloat || lhs.smallNegativeFloat == rhs.smallNegativeFloat)
            fieldCheck = fieldCheck && (lhs.hasInfDouble == rhs.hasInfDouble) && (!lhs.hasInfDouble || lhs.infDouble == rhs.infDouble)
            fieldCheck = fieldCheck && (lhs.hasNegInfDouble == rhs.hasNegInfDouble) && (!lhs.hasNegInfDouble || lhs.negInfDouble == rhs.negInfDouble)
            fieldCheck = fieldCheck && (lhs.hasNanDouble == rhs.hasNanDouble) && (!lhs.hasNanDouble || lhs.nanDouble == rhs.nanDouble)
            fieldCheck = fieldCheck && (lhs.hasInfFloat == rhs.hasInfFloat) && (!lhs.hasInfFloat || lhs.infFloat == rhs.infFloat)
            fieldCheck = fieldCheck && (lhs.hasNegInfFloat == rhs.hasNegInfFloat) && (!lhs.hasNegInfFloat || lhs.negInfFloat == rhs.negInfFloat)
            fieldCheck = fieldCheck && (lhs.hasNanFloat == rhs.hasNanFloat) && (!lhs.hasNanFloat || lhs.nanFloat == rhs.nanFloat)
            fieldCheck = fieldCheck && (lhs.hasCppTrigraph == rhs.hasCppTrigraph) && (!lhs.hasCppTrigraph || lhs.cppTrigraph == rhs.cppTrigraph)
            fieldCheck = fieldCheck && (lhs.hasReallySmallInt32 == rhs.hasReallySmallInt32) && (!lhs.hasReallySmallInt32 || lhs.reallySmallInt32 == rhs.reallySmallInt32)
            fieldCheck = fieldCheck && (lhs.hasReallySmallInt64 == rhs.hasReallySmallInt64) && (!lhs.hasReallySmallInt64 || lhs.reallySmallInt64 == rhs.reallySmallInt64)
            fieldCheck = fieldCheck && (lhs.hasStringWithZero == rhs.hasStringWithZero) && (!lhs.hasStringWithZero || lhs.stringWithZero == rhs.stringWithZero)
            fieldCheck = fieldCheck && (lhs.hasBytesWithZero == rhs.hasBytesWithZero) && (!lhs.hasBytesWithZero || lhs.bytesWithZero == rhs.bytesWithZero)
            fieldCheck = fieldCheck && (lhs.hasStringPieceWithZero == rhs.hasStringPieceWithZero) && (!lhs.hasStringPieceWithZero || lhs.stringPieceWithZero == rhs.stringPieceWithZero)
            fieldCheck = fieldCheck && (lhs.hasCordWithZero == rhs.hasCordWithZero) && (!lhs.hasCordWithZero || lhs.cordWithZero == rhs.cordWithZero)
            fieldCheck = fieldCheck && (lhs.hasReplacementString == rhs.hasReplacementString) && (!lhs.hasReplacementString || lhs.replacementString == rhs.replacementString)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var escapedBytes:Data! = Data(bytes:([UInt8]() + "world".utf8), count:5)
        public fileprivate(set) var hasEscapedBytes:Bool = false

        public fileprivate(set) var largeUint32:UInt32! = UInt32(255)
        public fileprivate(set) var hasLargeUint32:Bool = false

        public fileprivate(set) var largeUint64:UInt64! = UInt64(255)
        public fileprivate(set) var hasLargeUint64:Bool = false

        public fileprivate(set) var smallInt32:Int32! = Int32(-127)
        public fileprivate(set) var hasSmallInt32:Bool = false

        public fileprivate(set) var smallInt64:Int64! = Int64(-127)
        public fileprivate(set) var hasSmallInt64:Bool = false

        public fileprivate(set) var reallySmallInt32:Int32! = Int32(-128)
        public fileprivate(set) var hasReallySmallInt32:Bool = false

        public fileprivate(set) var reallySmallInt64:Int64! = Int64(-128)
        public fileprivate(set) var hasReallySmallInt64:Bool = false

        /// The default value here is UTF-8 for "\u1234".  (We could also just type
        /// the UTF-8 text directly into this text file rather than escape it, but
        /// lots of people use editors that would be confused by this.)
        public fileprivate(set) var utf8String:String! = "hello"
        public fileprivate(set) var hasUtf8String:Bool = false

        /// Tests for single-precision floating-point values.
        public fileprivate(set) var zeroFloat:Float! = Float(0)
        public fileprivate(set) var hasZeroFloat:Bool = false

        public fileprivate(set) var oneFloat:Float! = Float(1)
        public fileprivate(set) var hasOneFloat:Bool = false

        public fileprivate(set) var smallFloat:Float! = Float(1.5)
        public fileprivate(set) var hasSmallFloat:Bool = false

        public fileprivate(set) var negativeOneFloat:Float! = Float(-1)
        public fileprivate(set) var hasNegativeOneFloat:Bool = false

        public fileprivate(set) var negativeFloat:Float! = Float(-1.5)
        public fileprivate(set) var hasNegativeFloat:Bool = false

        /// Using exponents
        public fileprivate(set) var largeFloat:Float! = Float(2e+08)
        public fileprivate(set) var hasLargeFloat:Bool = false

        public fileprivate(set) var smallNegativeFloat:Float! = Float(-8e-28)
        public fileprivate(set) var hasSmallNegativeFloat:Bool = false

        /// Text for nonfinite floating-point values.
        public fileprivate(set) var infDouble:Double! = Double(HUGE)
        public fileprivate(set) var hasInfDouble:Bool = false

        public fileprivate(set) var negInfDouble:Double! = Double(-HUGE)
        public fileprivate(set) var hasNegInfDouble:Bool = false

        public fileprivate(set) var nanDouble:Double! = 0.0
        public fileprivate(set) var hasNanDouble:Bool = false

        public fileprivate(set) var infFloat:Float! = HUGE
        public fileprivate(set) var hasInfFloat:Bool = false

        public fileprivate(set) var negInfFloat:Float! = -HUGE
        public fileprivate(set) var hasNegInfFloat:Bool = false

        public fileprivate(set) var nanFloat:Float! = 0.0
        public fileprivate(set) var hasNanFloat:Bool = false

        /// Tests for C++ trigraphs.
        /// Trigraphs should be escaped in C++ generated files, but they should not be
        /// escaped for other languages.
        /// Note that in .proto file, "\?" is a valid way to escape ? in string
        /// literals.
        public fileprivate(set) var cppTrigraph:String! = "asdfasdf"
        public fileprivate(set) var hasCppTrigraph:Bool = false

        /// String defaults containing the character '\000'
        public fileprivate(set) var stringWithZero:String! = "hel\000lo"
        public fileprivate(set) var hasStringWithZero:Bool = false

        public fileprivate(set) var bytesWithZero:Data! = Data(bytes:([UInt8]() + "wor\000ld".utf8), count:6)
        public fileprivate(set) var hasBytesWithZero:Bool = false

        public fileprivate(set) var stringPieceWithZero:String! = "ab\000c"
        public fileprivate(set) var hasStringPieceWithZero:Bool = false

        public fileprivate(set) var cordWithZero:String! = "12\0003"
        public fileprivate(set) var hasCordWithZero:Bool = false

        public fileprivate(set) var replacementString:String! = "${unknown}"
        public fileprivate(set) var hasReplacementString:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasEscapedBytes {
                try codedOutputStream.writeData(fieldNumber: 1, value:escapedBytes)
            }
            if hasLargeUint32 {
                try codedOutputStream.writeUInt32(fieldNumber: 2, value:largeUint32)
            }
            if hasLargeUint64 {
                try codedOutputStream.writeUInt64(fieldNumber: 3, value:largeUint64)
            }
            if hasSmallInt32 {
                try codedOutputStream.writeInt32(fieldNumber: 4, value:smallInt32)
            }
            if hasSmallInt64 {
                try codedOutputStream.writeInt64(fieldNumber: 5, value:smallInt64)
            }
            if hasUtf8String {
                try codedOutputStream.writeString(fieldNumber: 6, value:utf8String)
            }
            if hasZeroFloat {
                try codedOutputStream.writeFloat(fieldNumber: 7, value:zeroFloat)
            }
            if hasOneFloat {
                try codedOutputStream.writeFloat(fieldNumber: 8, value:oneFloat)
            }
            if hasSmallFloat {
                try codedOutputStream.writeFloat(fieldNumber: 9, value:smallFloat)
            }
            if hasNegativeOneFloat {
                try codedOutputStream.writeFloat(fieldNumber: 10, value:negativeOneFloat)
            }
            if hasNegativeFloat {
                try codedOutputStream.writeFloat(fieldNumber: 11, value:negativeFloat)
            }
            if hasLargeFloat {
                try codedOutputStream.writeFloat(fieldNumber: 12, value:largeFloat)
            }
            if hasSmallNegativeFloat {
                try codedOutputStream.writeFloat(fieldNumber: 13, value:smallNegativeFloat)
            }
            if hasInfDouble {
                try codedOutputStream.writeDouble(fieldNumber: 14, value:infDouble)
            }
            if hasNegInfDouble {
                try codedOutputStream.writeDouble(fieldNumber: 15, value:negInfDouble)
            }
            if hasNanDouble {
                try codedOutputStream.writeDouble(fieldNumber: 16, value:nanDouble)
            }
            if hasInfFloat {
                try codedOutputStream.writeFloat(fieldNumber: 17, value:infFloat)
            }
            if hasNegInfFloat {
                try codedOutputStream.writeFloat(fieldNumber: 18, value:negInfFloat)
            }
            if hasNanFloat {
                try codedOutputStream.writeFloat(fieldNumber: 19, value:nanFloat)
            }
            if hasCppTrigraph {
                try codedOutputStream.writeString(fieldNumber: 20, value:cppTrigraph)
            }
            if hasReallySmallInt32 {
                try codedOutputStream.writeInt32(fieldNumber: 21, value:reallySmallInt32)
            }
            if hasReallySmallInt64 {
                try codedOutputStream.writeInt64(fieldNumber: 22, value:reallySmallInt64)
            }
            if hasStringWithZero {
                try codedOutputStream.writeString(fieldNumber: 23, value:stringWithZero)
            }
            if hasBytesWithZero {
                try codedOutputStream.writeData(fieldNumber: 24, value:bytesWithZero)
            }
            if hasStringPieceWithZero {
                try codedOutputStream.writeString(fieldNumber: 25, value:stringPieceWithZero)
            }
            if hasCordWithZero {
                try codedOutputStream.writeString(fieldNumber: 26, value:cordWithZero)
            }
            if hasReplacementString {
                try codedOutputStream.writeString(fieldNumber: 27, value:replacementString)
            }
            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 hasEscapedBytes {
                serialize_size += escapedBytes.computeDataSize(fieldNumber: 1)
            }
            if hasLargeUint32 {
                serialize_size += largeUint32.computeUInt32Size(fieldNumber: 2)
            }
            if hasLargeUint64 {
                serialize_size += largeUint64.computeUInt64Size(fieldNumber: 3)
            }
            if hasSmallInt32 {
                serialize_size += smallInt32.computeInt32Size(fieldNumber: 4)
            }
            if hasSmallInt64 {
                serialize_size += smallInt64.computeInt64Size(fieldNumber: 5)
            }
            if hasUtf8String {
                serialize_size += utf8String.computeStringSize(fieldNumber: 6)
            }
            if hasZeroFloat {
                serialize_size += zeroFloat.computeFloatSize(fieldNumber: 7)
            }
            if hasOneFloat {
                serialize_size += oneFloat.computeFloatSize(fieldNumber: 8)
            }
            if hasSmallFloat {
                serialize_size += smallFloat.computeFloatSize(fieldNumber: 9)
            }
            if hasNegativeOneFloat {
                serialize_size += negativeOneFloat.computeFloatSize(fieldNumber: 10)
            }
            if hasNegativeFloat {
                serialize_size += negativeFloat.computeFloatSize(fieldNumber: 11)
            }
            if hasLargeFloat {
                serialize_size += largeFloat.computeFloatSize(fieldNumber: 12)
            }
            if hasSmallNegativeFloat {
                serialize_size += smallNegativeFloat.computeFloatSize(fieldNumber: 13)
            }
            if hasInfDouble {
                serialize_size += infDouble.computeDoubleSize(fieldNumber: 14)
            }
            if hasNegInfDouble {
                serialize_size += negInfDouble.computeDoubleSize(fieldNumber: 15)
            }
            if hasNanDouble {
                serialize_size += nanDouble.computeDoubleSize(fieldNumber: 16)
            }
            if hasInfFloat {
                serialize_size += infFloat.computeFloatSize(fieldNumber: 17)
            }
            if hasNegInfFloat {
                serialize_size += negInfFloat.computeFloatSize(fieldNumber: 18)
            }
            if hasNanFloat {
                serialize_size += nanFloat.computeFloatSize(fieldNumber: 19)
            }
            if hasCppTrigraph {
                serialize_size += cppTrigraph.computeStringSize(fieldNumber: 20)
            }
            if hasReallySmallInt32 {
                serialize_size += reallySmallInt32.computeInt32Size(fieldNumber: 21)
            }
            if hasReallySmallInt64 {
                serialize_size += reallySmallInt64.computeInt64Size(fieldNumber: 22)
            }
            if hasStringWithZero {
                serialize_size += stringWithZero.computeStringSize(fieldNumber: 23)
            }
            if hasBytesWithZero {
                serialize_size += bytesWithZero.computeDataSize(fieldNumber: 24)
            }
            if hasStringPieceWithZero {
                serialize_size += stringPieceWithZero.computeStringSize(fieldNumber: 25)
            }
            if hasCordWithZero {
                serialize_size += cordWithZero.computeStringSize(fieldNumber: 26)
            }
            if hasReplacementString {
                serialize_size += replacementString.computeStringSize(fieldNumber: 27)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
            return ProtobufUnittest.TestExtremeDefaultValues.classBuilder() as! ProtobufUnittest.TestExtremeDefaultValues.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
            return classBuilder() as! ProtobufUnittest.TestExtremeDefaultValues.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestExtremeDefaultValues.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestExtremeDefaultValues.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
            return try ProtobufUnittest.TestExtremeDefaultValues.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestExtremeDefaultValues) throws -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
            return try ProtobufUnittest.TestExtremeDefaultValues.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasEscapedBytes {
                jsonMap["escapedBytes"] = escapedBytes.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
            }
            if hasLargeUint32 {
                jsonMap["largeUint32"] = UInt(largeUint32)
            }
            if hasLargeUint64 {
                jsonMap["largeUint64"] = "\(largeUint64!)"
            }
            if hasSmallInt32 {
                jsonMap["smallInt32"] = Int(smallInt32)
            }
            if hasSmallInt64 {
                jsonMap["smallInt64"] = "\(smallInt64!)"
            }
            if hasReallySmallInt32 {
                jsonMap["reallySmallInt32"] = Int(reallySmallInt32)
            }
            if hasReallySmallInt64 {
                jsonMap["reallySmallInt64"] = "\(reallySmallInt64!)"
            }
            if hasUtf8String {
                jsonMap["utf8String"] = utf8String
            }
            if hasZeroFloat {
                jsonMap["zeroFloat"] = Float(zeroFloat)
            }
            if hasOneFloat {
                jsonMap["oneFloat"] = Float(oneFloat)
            }
            if hasSmallFloat {
                jsonMap["smallFloat"] = Float(smallFloat)
            }
            if hasNegativeOneFloat {
                jsonMap["negativeOneFloat"] = Float(negativeOneFloat)
            }
            if hasNegativeFloat {
                jsonMap["negativeFloat"] = Float(negativeFloat)
            }
            if hasLargeFloat {
                jsonMap["largeFloat"] = Float(largeFloat)
            }
            if hasSmallNegativeFloat {
                jsonMap["smallNegativeFloat"] = Float(smallNegativeFloat)
            }
            if hasInfDouble {
                jsonMap["infDouble"] = Double(infDouble)
            }
            if hasNegInfDouble {
                jsonMap["negInfDouble"] = Double(negInfDouble)
            }
            if hasNanDouble {
                jsonMap["nanDouble"] = Double(nanDouble)
            }
            if hasInfFloat {
                jsonMap["infFloat"] = Float(infFloat)
            }
            if hasNegInfFloat {
                jsonMap["negInfFloat"] = Float(negInfFloat)
            }
            if hasNanFloat {
                jsonMap["nanFloat"] = Float(nanFloat)
            }
            if hasCppTrigraph {
                jsonMap["cppTrigraph"] = cppTrigraph
            }
            if hasStringWithZero {
                jsonMap["stringWithZero"] = stringWithZero
            }
            if hasBytesWithZero {
                jsonMap["bytesWithZero"] = bytesWithZero.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
            }
            if hasStringPieceWithZero {
                jsonMap["stringPieceWithZero"] = stringPieceWithZero
            }
            if hasCordWithZero {
                jsonMap["cordWithZero"] = cordWithZero
            }
            if hasReplacementString {
                jsonMap["replacementString"] = replacementString
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestExtremeDefaultValues {
            return try ProtobufUnittest.TestExtremeDefaultValues.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestExtremeDefaultValues {
            return try ProtobufUnittest.TestExtremeDefaultValues.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasEscapedBytes {
                output += "\(indent) escapedBytes: \(String(describing: escapedBytes)) \n"
            }
            if hasLargeUint32 {
                output += "\(indent) largeUint32: \(String(describing: largeUint32)) \n"
            }
            if hasLargeUint64 {
                output += "\(indent) largeUint64: \(String(describing: largeUint64)) \n"
            }
            if hasSmallInt32 {
                output += "\(indent) smallInt32: \(String(describing: smallInt32)) \n"
            }
            if hasSmallInt64 {
                output += "\(indent) smallInt64: \(String(describing: smallInt64)) \n"
            }
            if hasUtf8String {
                output += "\(indent) utf8String: \(String(describing: utf8String)) \n"
            }
            if hasZeroFloat {
                output += "\(indent) zeroFloat: \(String(describing: zeroFloat)) \n"
            }
            if hasOneFloat {
                output += "\(indent) oneFloat: \(String(describing: oneFloat)) \n"
            }
            if hasSmallFloat {
                output += "\(indent) smallFloat: \(String(describing: smallFloat)) \n"
            }
            if hasNegativeOneFloat {
                output += "\(indent) negativeOneFloat: \(String(describing: negativeOneFloat)) \n"
            }
            if hasNegativeFloat {
                output += "\(indent) negativeFloat: \(String(describing: negativeFloat)) \n"
            }
            if hasLargeFloat {
                output += "\(indent) largeFloat: \(String(describing: largeFloat)) \n"
            }
            if hasSmallNegativeFloat {
                output += "\(indent) smallNegativeFloat: \(String(describing: smallNegativeFloat)) \n"
            }
            if hasInfDouble {
                output += "\(indent) infDouble: \(String(describing: infDouble)) \n"
            }
            if hasNegInfDouble {
                output += "\(indent) negInfDouble: \(String(describing: negInfDouble)) \n"
            }
            if hasNanDouble {
                output += "\(indent) nanDouble: \(String(describing: nanDouble)) \n"
            }
            if hasInfFloat {
                output += "\(indent) infFloat: \(String(describing: infFloat)) \n"
            }
            if hasNegInfFloat {
                output += "\(indent) negInfFloat: \(String(describing: negInfFloat)) \n"
            }
            if hasNanFloat {
                output += "\(indent) nanFloat: \(String(describing: nanFloat)) \n"
            }
            if hasCppTrigraph {
                output += "\(indent) cppTrigraph: \(String(describing: cppTrigraph)) \n"
            }
            if hasReallySmallInt32 {
                output += "\(indent) reallySmallInt32: \(String(describing: reallySmallInt32)) \n"
            }
            if hasReallySmallInt64 {
                output += "\(indent) reallySmallInt64: \(String(describing: reallySmallInt64)) \n"
            }
            if hasStringWithZero {
                output += "\(indent) stringWithZero: \(String(describing: stringWithZero)) \n"
            }
            if hasBytesWithZero {
                output += "\(indent) bytesWithZero: \(String(describing: bytesWithZero)) \n"
            }
            if hasStringPieceWithZero {
                output += "\(indent) stringPieceWithZero: \(String(describing: stringPieceWithZero)) \n"
            }
            if hasCordWithZero {
                output += "\(indent) cordWithZero: \(String(describing: cordWithZero)) \n"
            }
            if hasReplacementString {
                output += "\(indent) replacementString: \(String(describing: replacementString)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasEscapedBytes {
                    hashCode = (hashCode &* 31) &+ escapedBytes.hashValue
                }
                if hasLargeUint32 {
                    hashCode = (hashCode &* 31) &+ largeUint32.hashValue
                }
                if hasLargeUint64 {
                    hashCode = (hashCode &* 31) &+ largeUint64.hashValue
                }
                if hasSmallInt32 {
                    hashCode = (hashCode &* 31) &+ smallInt32.hashValue
                }
                if hasSmallInt64 {
                    hashCode = (hashCode &* 31) &+ smallInt64.hashValue
                }
                if hasUtf8String {
                    hashCode = (hashCode &* 31) &+ utf8String.hashValue
                }
                if hasZeroFloat {
                    hashCode = (hashCode &* 31) &+ zeroFloat.hashValue
                }
                if hasOneFloat {
                    hashCode = (hashCode &* 31) &+ oneFloat.hashValue
                }
                if hasSmallFloat {
                    hashCode = (hashCode &* 31) &+ smallFloat.hashValue
                }
                if hasNegativeOneFloat {
                    hashCode = (hashCode &* 31) &+ negativeOneFloat.hashValue
                }
                if hasNegativeFloat {
                    hashCode = (hashCode &* 31) &+ negativeFloat.hashValue
                }
                if hasLargeFloat {
                    hashCode = (hashCode &* 31) &+ largeFloat.hashValue
                }
                if hasSmallNegativeFloat {
                    hashCode = (hashCode &* 31) &+ smallNegativeFloat.hashValue
                }
                if hasInfDouble {
                    hashCode = (hashCode &* 31) &+ infDouble.hashValue
                }
                if hasNegInfDouble {
                    hashCode = (hashCode &* 31) &+ negInfDouble.hashValue
                }
                if hasNanDouble {
                    hashCode = (hashCode &* 31) &+ nanDouble.hashValue
                }
                if hasInfFloat {
                    hashCode = (hashCode &* 31) &+ infFloat.hashValue
                }
                if hasNegInfFloat {
                    hashCode = (hashCode &* 31) &+ negInfFloat.hashValue
                }
                if hasNanFloat {
                    hashCode = (hashCode &* 31) &+ nanFloat.hashValue
                }
                if hasCppTrigraph {
                    hashCode = (hashCode &* 31) &+ cppTrigraph.hashValue
                }
                if hasReallySmallInt32 {
                    hashCode = (hashCode &* 31) &+ reallySmallInt32.hashValue
                }
                if hasReallySmallInt64 {
                    hashCode = (hashCode &* 31) &+ reallySmallInt64.hashValue
                }
                if hasStringWithZero {
                    hashCode = (hashCode &* 31) &+ stringWithZero.hashValue
                }
                if hasBytesWithZero {
                    hashCode = (hashCode &* 31) &+ bytesWithZero.hashValue
                }
                if hasStringPieceWithZero {
                    hashCode = (hashCode &* 31) &+ stringPieceWithZero.hashValue
                }
                if hasCordWithZero {
                    hashCode = (hashCode &* 31) &+ cordWithZero.hashValue
                }
                if hasReplacementString {
                    hashCode = (hashCode &* 31) &+ replacementString.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var escapedBytes:Data {
                get {
                    return builderResult.escapedBytes
                }
                set (value) {
                    builderResult.hasEscapedBytes = true
                    builderResult.escapedBytes = value
                }
            }
            public var hasEscapedBytes:Bool {
                get {
                    return builderResult.hasEscapedBytes
                }
            }
            @discardableResult
            public func setEscapedBytes(_ value:Data) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.escapedBytes = value
                return self
            }
            @discardableResult
            public func clearEscapedBytes() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasEscapedBytes = false
                builderResult.escapedBytes = Data(bytes:([UInt8]() + "world".utf8), count:5)
                return self
            }
            public var largeUint32:UInt32 {
                get {
                    return builderResult.largeUint32
                }
                set (value) {
                    builderResult.hasLargeUint32 = true
                    builderResult.largeUint32 = value
                }
            }
            public var hasLargeUint32:Bool {
                get {
                    return builderResult.hasLargeUint32
                }
            }
            @discardableResult
            public func setLargeUint32(_ value:UInt32) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.largeUint32 = value
                return self
            }
            @discardableResult
            public func clearLargeUint32() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasLargeUint32 = false
                builderResult.largeUint32 = UInt32(255)
                return self
            }
            public var largeUint64:UInt64 {
                get {
                    return builderResult.largeUint64
                }
                set (value) {
                    builderResult.hasLargeUint64 = true
                    builderResult.largeUint64 = value
                }
            }
            public var hasLargeUint64:Bool {
                get {
                    return builderResult.hasLargeUint64
                }
            }
            @discardableResult
            public func setLargeUint64(_ value:UInt64) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.largeUint64 = value
                return self
            }
            @discardableResult
            public func clearLargeUint64() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasLargeUint64 = false
                builderResult.largeUint64 = UInt64(255)
                return self
            }
            public var smallInt32:Int32 {
                get {
                    return builderResult.smallInt32
                }
                set (value) {
                    builderResult.hasSmallInt32 = true
                    builderResult.smallInt32 = value
                }
            }
            public var hasSmallInt32:Bool {
                get {
                    return builderResult.hasSmallInt32
                }
            }
            @discardableResult
            public func setSmallInt32(_ value:Int32) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.smallInt32 = value
                return self
            }
            @discardableResult
            public func clearSmallInt32() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasSmallInt32 = false
                builderResult.smallInt32 = Int32(-127)
                return self
            }
            public var smallInt64:Int64 {
                get {
                    return builderResult.smallInt64
                }
                set (value) {
                    builderResult.hasSmallInt64 = true
                    builderResult.smallInt64 = value
                }
            }
            public var hasSmallInt64:Bool {
                get {
                    return builderResult.hasSmallInt64
                }
            }
            @discardableResult
            public func setSmallInt64(_ value:Int64) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.smallInt64 = value
                return self
            }
            @discardableResult
            public func clearSmallInt64() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasSmallInt64 = false
                builderResult.smallInt64 = Int64(-127)
                return self
            }
            public var reallySmallInt32:Int32 {
                get {
                    return builderResult.reallySmallInt32
                }
                set (value) {
                    builderResult.hasReallySmallInt32 = true
                    builderResult.reallySmallInt32 = value
                }
            }
            public var hasReallySmallInt32:Bool {
                get {
                    return builderResult.hasReallySmallInt32
                }
            }
            @discardableResult
            public func setReallySmallInt32(_ value:Int32) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.reallySmallInt32 = value
                return self
            }
            @discardableResult
            public func clearReallySmallInt32() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasReallySmallInt32 = false
                builderResult.reallySmallInt32 = Int32(-128)
                return self
            }
            public var reallySmallInt64:Int64 {
                get {
                    return builderResult.reallySmallInt64
                }
                set (value) {
                    builderResult.hasReallySmallInt64 = true
                    builderResult.reallySmallInt64 = value
                }
            }
            public var hasReallySmallInt64:Bool {
                get {
                    return builderResult.hasReallySmallInt64
                }
            }
            @discardableResult
            public func setReallySmallInt64(_ value:Int64) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.reallySmallInt64 = value
                return self
            }
            @discardableResult
            public func clearReallySmallInt64() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasReallySmallInt64 = false
                builderResult.reallySmallInt64 = Int64(-128)
                return self
            }
            /// The default value here is UTF-8 for "\u1234".  (We could also just type
            /// the UTF-8 text directly into this text file rather than escape it, but
            /// lots of people use editors that would be confused by this.)
            public var utf8String:String {
                get {
                    return builderResult.utf8String
                }
                set (value) {
                    builderResult.hasUtf8String = true
                    builderResult.utf8String = value
                }
            }
            public var hasUtf8String:Bool {
                get {
                    return builderResult.hasUtf8String
                }
            }
            @discardableResult
            public func setUtf8String(_ value:String) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.utf8String = value
                return self
            }
            @discardableResult
            public func clearUtf8String() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasUtf8String = false
                builderResult.utf8String = "hello"
                return self
            }
            /// Tests for single-precision floating-point values.
            public var zeroFloat:Float {
                get {
                    return builderResult.zeroFloat
                }
                set (value) {
                    builderResult.hasZeroFloat = true
                    builderResult.zeroFloat = value
                }
            }
            public var hasZeroFloat:Bool {
                get {
                    return builderResult.hasZeroFloat
                }
            }
            @discardableResult
            public func setZeroFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.zeroFloat = value
                return self
            }
            @discardableResult
            public func clearZeroFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasZeroFloat = false
                builderResult.zeroFloat = Float(0)
                return self
            }
            public var oneFloat:Float {
                get {
                    return builderResult.oneFloat
                }
                set (value) {
                    builderResult.hasOneFloat = true
                    builderResult.oneFloat = value
                }
            }
            public var hasOneFloat:Bool {
                get {
                    return builderResult.hasOneFloat
                }
            }
            @discardableResult
            public func setOneFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.oneFloat = value
                return self
            }
            @discardableResult
            public func clearOneFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasOneFloat = false
                builderResult.oneFloat = Float(1)
                return self
            }
            public var smallFloat:Float {
                get {
                    return builderResult.smallFloat
                }
                set (value) {
                    builderResult.hasSmallFloat = true
                    builderResult.smallFloat = value
                }
            }
            public var hasSmallFloat:Bool {
                get {
                    return builderResult.hasSmallFloat
                }
            }
            @discardableResult
            public func setSmallFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.smallFloat = value
                return self
            }
            @discardableResult
            public func clearSmallFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasSmallFloat = false
                builderResult.smallFloat = Float(1.5)
                return self
            }
            public var negativeOneFloat:Float {
                get {
                    return builderResult.negativeOneFloat
                }
                set (value) {
                    builderResult.hasNegativeOneFloat = true
                    builderResult.negativeOneFloat = value
                }
            }
            public var hasNegativeOneFloat:Bool {
                get {
                    return builderResult.hasNegativeOneFloat
                }
            }
            @discardableResult
            public func setNegativeOneFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.negativeOneFloat = value
                return self
            }
            @discardableResult
            public func clearNegativeOneFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasNegativeOneFloat = false
                builderResult.negativeOneFloat = Float(-1)
                return self
            }
            public var negativeFloat:Float {
                get {
                    return builderResult.negativeFloat
                }
                set (value) {
                    builderResult.hasNegativeFloat = true
                    builderResult.negativeFloat = value
                }
            }
            public var hasNegativeFloat:Bool {
                get {
                    return builderResult.hasNegativeFloat
                }
            }
            @discardableResult
            public func setNegativeFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.negativeFloat = value
                return self
            }
            @discardableResult
            public func clearNegativeFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasNegativeFloat = false
                builderResult.negativeFloat = Float(-1.5)
                return self
            }
            /// Using exponents
            public var largeFloat:Float {
                get {
                    return builderResult.largeFloat
                }
                set (value) {
                    builderResult.hasLargeFloat = true
                    builderResult.largeFloat = value
                }
            }
            public var hasLargeFloat:Bool {
                get {
                    return builderResult.hasLargeFloat
                }
            }
            @discardableResult
            public func setLargeFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.largeFloat = value
                return self
            }
            @discardableResult
            public func clearLargeFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasLargeFloat = false
                builderResult.largeFloat = Float(2e+08)
                return self
            }
            public var smallNegativeFloat:Float {
                get {
                    return builderResult.smallNegativeFloat
                }
                set (value) {
                    builderResult.hasSmallNegativeFloat = true
                    builderResult.smallNegativeFloat = value
                }
            }
            public var hasSmallNegativeFloat:Bool {
                get {
                    return builderResult.hasSmallNegativeFloat
                }
            }
            @discardableResult
            public func setSmallNegativeFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.smallNegativeFloat = value
                return self
            }
            @discardableResult
            public func clearSmallNegativeFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasSmallNegativeFloat = false
                builderResult.smallNegativeFloat = Float(-8e-28)
                return self
            }
            /// Text for nonfinite floating-point values.
            public var infDouble:Double {
                get {
                    return builderResult.infDouble
                }
                set (value) {
                    builderResult.hasInfDouble = true
                    builderResult.infDouble = value
                }
            }
            public var hasInfDouble:Bool {
                get {
                    return builderResult.hasInfDouble
                }
            }
            @discardableResult
            public func setInfDouble(_ value:Double) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.infDouble = value
                return self
            }
            @discardableResult
            public func clearInfDouble() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasInfDouble = false
                builderResult.infDouble = Double(HUGE)
                return self
            }
            public var negInfDouble:Double {
                get {
                    return builderResult.negInfDouble
                }
                set (value) {
                    builderResult.hasNegInfDouble = true
                    builderResult.negInfDouble = value
                }
            }
            public var hasNegInfDouble:Bool {
                get {
                    return builderResult.hasNegInfDouble
                }
            }
            @discardableResult
            public func setNegInfDouble(_ value:Double) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.negInfDouble = value
                return self
            }
            @discardableResult
            public func clearNegInfDouble() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasNegInfDouble = false
                builderResult.negInfDouble = Double(-HUGE)
                return self
            }
            public var nanDouble:Double {
                get {
                    return builderResult.nanDouble
                }
                set (value) {
                    builderResult.hasNanDouble = true
                    builderResult.nanDouble = value
                }
            }
            public var hasNanDouble:Bool {
                get {
                    return builderResult.hasNanDouble
                }
            }
            @discardableResult
            public func setNanDouble(_ value:Double) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.nanDouble = value
                return self
            }
            @discardableResult
            public func clearNanDouble() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasNanDouble = false
                builderResult.nanDouble = 0.0
                return self
            }
            public var infFloat:Float {
                get {
                    return builderResult.infFloat
                }
                set (value) {
                    builderResult.hasInfFloat = true
                    builderResult.infFloat = value
                }
            }
            public var hasInfFloat:Bool {
                get {
                    return builderResult.hasInfFloat
                }
            }
            @discardableResult
            public func setInfFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.infFloat = value
                return self
            }
            @discardableResult
            public func clearInfFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasInfFloat = false
                builderResult.infFloat = HUGE
                return self
            }
            public var negInfFloat:Float {
                get {
                    return builderResult.negInfFloat
                }
                set (value) {
                    builderResult.hasNegInfFloat = true
                    builderResult.negInfFloat = value
                }
            }
            public var hasNegInfFloat:Bool {
                get {
                    return builderResult.hasNegInfFloat
                }
            }
            @discardableResult
            public func setNegInfFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.negInfFloat = value
                return self
            }
            @discardableResult
            public func clearNegInfFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasNegInfFloat = false
                builderResult.negInfFloat = -HUGE
                return self
            }
            public var nanFloat:Float {
                get {
                    return builderResult.nanFloat
                }
                set (value) {
                    builderResult.hasNanFloat = true
                    builderResult.nanFloat = value
                }
            }
            public var hasNanFloat:Bool {
                get {
                    return builderResult.hasNanFloat
                }
            }
            @discardableResult
            public func setNanFloat(_ value:Float) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.nanFloat = value
                return self
            }
            @discardableResult
            public func clearNanFloat() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasNanFloat = false
                builderResult.nanFloat = 0.0
                return self
            }
            /// Tests for C++ trigraphs.
            /// Trigraphs should be escaped in C++ generated files, but they should not be
            /// escaped for other languages.
            /// Note that in .proto file, "\?" is a valid way to escape ? in string
            /// literals.
            public var cppTrigraph:String {
                get {
                    return builderResult.cppTrigraph
                }
                set (value) {
                    builderResult.hasCppTrigraph = true
                    builderResult.cppTrigraph = value
                }
            }
            public var hasCppTrigraph:Bool {
                get {
                    return builderResult.hasCppTrigraph
                }
            }
            @discardableResult
            public func setCppTrigraph(_ value:String) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.cppTrigraph = value
                return self
            }
            @discardableResult
            public func clearCppTrigraph() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasCppTrigraph = false
                builderResult.cppTrigraph = "asdfasdf"
                return self
            }
            /// String defaults containing the character '\000'
            public var stringWithZero:String {
                get {
                    return builderResult.stringWithZero
                }
                set (value) {
                    builderResult.hasStringWithZero = true
                    builderResult.stringWithZero = value
                }
            }
            public var hasStringWithZero:Bool {
                get {
                    return builderResult.hasStringWithZero
                }
            }
            @discardableResult
            public func setStringWithZero(_ value:String) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.stringWithZero = value
                return self
            }
            @discardableResult
            public func clearStringWithZero() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasStringWithZero = false
                builderResult.stringWithZero = "hel\000lo"
                return self
            }
            public var bytesWithZero:Data {
                get {
                    return builderResult.bytesWithZero
                }
                set (value) {
                    builderResult.hasBytesWithZero = true
                    builderResult.bytesWithZero = value
                }
            }
            public var hasBytesWithZero:Bool {
                get {
                    return builderResult.hasBytesWithZero
                }
            }
            @discardableResult
            public func setBytesWithZero(_ value:Data) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.bytesWithZero = value
                return self
            }
            @discardableResult
            public func clearBytesWithZero() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasBytesWithZero = false
                builderResult.bytesWithZero = Data(bytes:([UInt8]() + "wor\000ld".utf8), count:6)
                return self
            }
            public var stringPieceWithZero:String {
                get {
                    return builderResult.stringPieceWithZero
                }
                set (value) {
                    builderResult.hasStringPieceWithZero = true
                    builderResult.stringPieceWithZero = value
                }
            }
            public var hasStringPieceWithZero:Bool {
                get {
                    return builderResult.hasStringPieceWithZero
                }
            }
            @discardableResult
            public func setStringPieceWithZero(_ value:String) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.stringPieceWithZero = value
                return self
            }
            @discardableResult
            public func clearStringPieceWithZero() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasStringPieceWithZero = false
                builderResult.stringPieceWithZero = "ab\000c"
                return self
            }
            public var cordWithZero:String {
                get {
                    return builderResult.cordWithZero
                }
                set (value) {
                    builderResult.hasCordWithZero = true
                    builderResult.cordWithZero = value
                }
            }
            public var hasCordWithZero:Bool {
                get {
                    return builderResult.hasCordWithZero
                }
            }
            @discardableResult
            public func setCordWithZero(_ value:String) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.cordWithZero = value
                return self
            }
            @discardableResult
            public func clearCordWithZero() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasCordWithZero = false
                builderResult.cordWithZero = "12\0003"
                return self
            }
            public var replacementString:String {
                get {
                    return builderResult.replacementString
                }
                set (value) {
                    builderResult.hasReplacementString = true
                    builderResult.replacementString = value
                }
            }
            public var hasReplacementString:Bool {
                get {
                    return builderResult.hasReplacementString
                }
            }
            @discardableResult
            public func setReplacementString(_ value:String) -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                self.replacementString = value
                return self
            }
            @discardableResult
            public func clearReplacementString() -> ProtobufUnittest.TestExtremeDefaultValues.Builder{
                builderResult.hasReplacementString = false
                builderResult.replacementString = "${unknown}"
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                builderResult = ProtobufUnittest.TestExtremeDefaultValues()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                return try ProtobufUnittest.TestExtremeDefaultValues.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestExtremeDefaultValues {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestExtremeDefaultValues {
                let returnMe:ProtobufUnittest.TestExtremeDefaultValues = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestExtremeDefaultValues) throws -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                if other == ProtobufUnittest.TestExtremeDefaultValues() {
                    return self
                }
                if other.hasEscapedBytes {
                    escapedBytes = other.escapedBytes
                }
                if other.hasLargeUint32 {
                    largeUint32 = other.largeUint32
                }
                if other.hasLargeUint64 {
                    largeUint64 = other.largeUint64
                }
                if other.hasSmallInt32 {
                    smallInt32 = other.smallInt32
                }
                if other.hasSmallInt64 {
                    smallInt64 = other.smallInt64
                }
                if other.hasReallySmallInt32 {
                    reallySmallInt32 = other.reallySmallInt32
                }
                if other.hasReallySmallInt64 {
                    reallySmallInt64 = other.reallySmallInt64
                }
                if other.hasUtf8String {
                    utf8String = other.utf8String
                }
                if other.hasZeroFloat {
                    zeroFloat = other.zeroFloat
                }
                if other.hasOneFloat {
                    oneFloat = other.oneFloat
                }
                if other.hasSmallFloat {
                    smallFloat = other.smallFloat
                }
                if other.hasNegativeOneFloat {
                    negativeOneFloat = other.negativeOneFloat
                }
                if other.hasNegativeFloat {
                    negativeFloat = other.negativeFloat
                }
                if other.hasLargeFloat {
                    largeFloat = other.largeFloat
                }
                if other.hasSmallNegativeFloat {
                    smallNegativeFloat = other.smallNegativeFloat
                }
                if other.hasInfDouble {
                    infDouble = other.infDouble
                }
                if other.hasNegInfDouble {
                    negInfDouble = other.negInfDouble
                }
                if other.hasNanDouble {
                    nanDouble = other.nanDouble
                }
                if other.hasInfFloat {
                    infFloat = other.infFloat
                }
                if other.hasNegInfFloat {
                    negInfFloat = other.negInfFloat
                }
                if other.hasNanFloat {
                    nanFloat = other.nanFloat
                }
                if other.hasCppTrigraph {
                    cppTrigraph = other.cppTrigraph
                }
                if other.hasStringWithZero {
                    stringWithZero = other.stringWithZero
                }
                if other.hasBytesWithZero {
                    bytesWithZero = other.bytesWithZero
                }
                if other.hasStringPieceWithZero {
                    stringPieceWithZero = other.stringPieceWithZero
                }
                if other.hasCordWithZero {
                    cordWithZero = other.cordWithZero
                }
                if other.hasReplacementString {
                    replacementString = other.replacementString
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestExtremeDefaultValues.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:
                        escapedBytes = try codedInputStream.readData()

                    case 16:
                        largeUint32 = try codedInputStream.readUInt32()

                    case 24:
                        largeUint64 = try codedInputStream.readUInt64()

                    case 32:
                        smallInt32 = try codedInputStream.readInt32()

                    case 40:
                        smallInt64 = try codedInputStream.readInt64()

                    case 50:
                        utf8String = try codedInputStream.readString()

                    case 61:
                        zeroFloat = try codedInputStream.readFloat()

                    case 69:
                        oneFloat = try codedInputStream.readFloat()

                    case 77:
                        smallFloat = try codedInputStream.readFloat()

                    case 85:
                        negativeOneFloat = try codedInputStream.readFloat()

                    case 93:
                        negativeFloat = try codedInputStream.readFloat()

                    case 101:
                        largeFloat = try codedInputStream.readFloat()

                    case 109:
                        smallNegativeFloat = try codedInputStream.readFloat()

                    case 113:
                        infDouble = try codedInputStream.readDouble()

                    case 121:
                        negInfDouble = try codedInputStream.readDouble()

                    case 129:
                        nanDouble = try codedInputStream.readDouble()

                    case 141:
                        infFloat = try codedInputStream.readFloat()

                    case 149:
                        negInfFloat = try codedInputStream.readFloat()

                    case 157:
                        nanFloat = try codedInputStream.readFloat()

                    case 162:
                        cppTrigraph = try codedInputStream.readString()

                    case 168:
                        reallySmallInt32 = try codedInputStream.readInt32()

                    case 176:
                        reallySmallInt64 = try codedInputStream.readInt64()

                    case 186:
                        stringWithZero = try codedInputStream.readString()

                    case 194:
                        bytesWithZero = try codedInputStream.readData()

                    case 202:
                        stringPieceWithZero = try codedInputStream.readString()

                    case 210:
                        cordWithZero = try codedInputStream.readString()

                    case 218:
                        replacementString = try codedInputStream.readString()

                    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 -> ProtobufUnittest.TestExtremeDefaultValues.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestExtremeDefaultValues.Builder()
                if let jsonValueEscapedBytes = jsonMap["escapedBytes"] as? String {
                    resultDecodedBuilder.escapedBytes = Data(base64Encoded:jsonValueEscapedBytes, options: Data.Base64DecodingOptions(rawValue:0))!
                }
                if let jsonValueLargeUint32 = jsonMap["largeUint32"] as? UInt {
                    resultDecodedBuilder.largeUint32 = UInt32(jsonValueLargeUint32)
                } else if let jsonValueLargeUint32 = jsonMap["largeUint32"] as? String {
                    resultDecodedBuilder.largeUint32 = UInt32(jsonValueLargeUint32)!
                }
                if let jsonValueLargeUint64 = jsonMap["largeUint64"] as? String {
                    resultDecodedBuilder.largeUint64 = UInt64(jsonValueLargeUint64)!
                } else if let jsonValueLargeUint64 = jsonMap["largeUint64"] as? UInt {
                    resultDecodedBuilder.largeUint64 = UInt64(jsonValueLargeUint64)
                }
                if let jsonValueSmallInt32 = jsonMap["smallInt32"] as? Int {
                    resultDecodedBuilder.smallInt32 = Int32(jsonValueSmallInt32)
                } else if let jsonValueSmallInt32 = jsonMap["smallInt32"] as? String {
                    resultDecodedBuilder.smallInt32 = Int32(jsonValueSmallInt32)!
                }
                if let jsonValueSmallInt64 = jsonMap["smallInt64"] as? String {
                    resultDecodedBuilder.smallInt64 = Int64(jsonValueSmallInt64)!
                } else if let jsonValueSmallInt64 = jsonMap["smallInt64"] as? Int {
                    resultDecodedBuilder.smallInt64 = Int64(jsonValueSmallInt64)
                }
                if let jsonValueReallySmallInt32 = jsonMap["reallySmallInt32"] as? Int {
                    resultDecodedBuilder.reallySmallInt32 = Int32(jsonValueReallySmallInt32)
                } else if let jsonValueReallySmallInt32 = jsonMap["reallySmallInt32"] as? String {
                    resultDecodedBuilder.reallySmallInt32 = Int32(jsonValueReallySmallInt32)!
                }
                if let jsonValueReallySmallInt64 = jsonMap["reallySmallInt64"] as? String {
                    resultDecodedBuilder.reallySmallInt64 = Int64(jsonValueReallySmallInt64)!
                } else if let jsonValueReallySmallInt64 = jsonMap["reallySmallInt64"] as? Int {
                    resultDecodedBuilder.reallySmallInt64 = Int64(jsonValueReallySmallInt64)
                }
                if let jsonValueUtf8String = jsonMap["utf8String"] as? String {
                    resultDecodedBuilder.utf8String = jsonValueUtf8String
                }
                if let jsonValueZeroFloat = jsonMap["zeroFloat"] as? Float {
                    resultDecodedBuilder.zeroFloat = Float(jsonValueZeroFloat)
                } else if let jsonValueZeroFloat = jsonMap["zeroFloat"] as? String {
                    resultDecodedBuilder.zeroFloat = Float(jsonValueZeroFloat)!
                }
                if let jsonValueOneFloat = jsonMap["oneFloat"] as? Float {
                    resultDecodedBuilder.oneFloat = Float(jsonValueOneFloat)
                } else if let jsonValueOneFloat = jsonMap["oneFloat"] as? String {
                    resultDecodedBuilder.oneFloat = Float(jsonValueOneFloat)!
                }
                if let jsonValueSmallFloat = jsonMap["smallFloat"] as? Float {
                    resultDecodedBuilder.smallFloat = Float(jsonValueSmallFloat)
                } else if let jsonValueSmallFloat = jsonMap["smallFloat"] as? String {
                    resultDecodedBuilder.smallFloat = Float(jsonValueSmallFloat)!
                }
                if let jsonValueNegativeOneFloat = jsonMap["negativeOneFloat"] as? Float {
                    resultDecodedBuilder.negativeOneFloat = Float(jsonValueNegativeOneFloat)
                } else if let jsonValueNegativeOneFloat = jsonMap["negativeOneFloat"] as? String {
                    resultDecodedBuilder.negativeOneFloat = Float(jsonValueNegativeOneFloat)!
                }
                if let jsonValueNegativeFloat = jsonMap["negativeFloat"] as? Float {
                    resultDecodedBuilder.negativeFloat = Float(jsonValueNegativeFloat)
                } else if let jsonValueNegativeFloat = jsonMap["negativeFloat"] as? String {
                    resultDecodedBuilder.negativeFloat = Float(jsonValueNegativeFloat)!
                }
                if let jsonValueLargeFloat = jsonMap["largeFloat"] as? Float {
                    resultDecodedBuilder.largeFloat = Float(jsonValueLargeFloat)
                } else if let jsonValueLargeFloat = jsonMap["largeFloat"] as? String {
                    resultDecodedBuilder.largeFloat = Float(jsonValueLargeFloat)!
                }
                if let jsonValueSmallNegativeFloat = jsonMap["smallNegativeFloat"] as? Float {
                    resultDecodedBuilder.smallNegativeFloat = Float(jsonValueSmallNegativeFloat)
                } else if let jsonValueSmallNegativeFloat = jsonMap["smallNegativeFloat"] as? String {
                    resultDecodedBuilder.smallNegativeFloat = Float(jsonValueSmallNegativeFloat)!
                }
                if let jsonValueInfDouble = jsonMap["infDouble"] as? Double {
                    resultDecodedBuilder.infDouble = Double(jsonValueInfDouble)
                } else if let jsonValueInfDouble = jsonMap["infDouble"] as? String {
                    resultDecodedBuilder.infDouble = Double(jsonValueInfDouble)!
                }
                if let jsonValueNegInfDouble = jsonMap["negInfDouble"] as? Double {
                    resultDecodedBuilder.negInfDouble = Double(jsonValueNegInfDouble)
                } else if let jsonValueNegInfDouble = jsonMap["negInfDouble"] as? String {
                    resultDecodedBuilder.negInfDouble = Double(jsonValueNegInfDouble)!
                }
                if let jsonValueNanDouble = jsonMap["nanDouble"] as? Double {
                    resultDecodedBuilder.nanDouble = Double(jsonValueNanDouble)
                } else if let jsonValueNanDouble = jsonMap["nanDouble"] as? String {
                    resultDecodedBuilder.nanDouble = Double(jsonValueNanDouble)!
                }
                if let jsonValueInfFloat = jsonMap["infFloat"] as? Float {
                    resultDecodedBuilder.infFloat = Float(jsonValueInfFloat)
                } else if let jsonValueInfFloat = jsonMap["infFloat"] as? String {
                    resultDecodedBuilder.infFloat = Float(jsonValueInfFloat)!
                }
                if let jsonValueNegInfFloat = jsonMap["negInfFloat"] as? Float {
                    resultDecodedBuilder.negInfFloat = Float(jsonValueNegInfFloat)
                } else if let jsonValueNegInfFloat = jsonMap["negInfFloat"] as? String {
                    resultDecodedBuilder.negInfFloat = Float(jsonValueNegInfFloat)!
                }
                if let jsonValueNanFloat = jsonMap["nanFloat"] as? Float {
                    resultDecodedBuilder.nanFloat = Float(jsonValueNanFloat)
                } else if let jsonValueNanFloat = jsonMap["nanFloat"] as? String {
                    resultDecodedBuilder.nanFloat = Float(jsonValueNanFloat)!
                }
                if let jsonValueCppTrigraph = jsonMap["cppTrigraph"] as? String {
                    resultDecodedBuilder.cppTrigraph = jsonValueCppTrigraph
                }
                if let jsonValueStringWithZero = jsonMap["stringWithZero"] as? String {
                    resultDecodedBuilder.stringWithZero = jsonValueStringWithZero
                }
                if let jsonValueBytesWithZero = jsonMap["bytesWithZero"] as? String {
                    resultDecodedBuilder.bytesWithZero = Data(base64Encoded:jsonValueBytesWithZero, options: Data.Base64DecodingOptions(rawValue:0))!
                }
                if let jsonValueStringPieceWithZero = jsonMap["stringPieceWithZero"] as? String {
                    resultDecodedBuilder.stringPieceWithZero = jsonValueStringPieceWithZero
                }
                if let jsonValueCordWithZero = jsonMap["cordWithZero"] as? String {
                    resultDecodedBuilder.cordWithZero = jsonValueCordWithZero
                }
                if let jsonValueReplacementString = jsonMap["replacementString"] as? String {
                    resultDecodedBuilder.replacementString = jsonValueReplacementString
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestExtremeDefaultValues.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 ProtobufUnittest.TestExtremeDefaultValues.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class SparseEnumMessage : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.SparseEnumMessage.Builder

        public static func == (lhs: ProtobufUnittest.SparseEnumMessage, rhs: ProtobufUnittest.SparseEnumMessage) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasSparseEnum == rhs.hasSparseEnum) && (!lhs.hasSparseEnum || lhs.sparseEnum == rhs.sparseEnum)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var sparseEnum:ProtobufUnittest.TestSparseEnum = ProtobufUnittest.TestSparseEnum.sparseA
        public fileprivate(set) var hasSparseEnum:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasSparseEnum {
                try codedOutputStream.writeEnum(fieldNumber: 1, value:sparseEnum.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
            if (hasSparseEnum) {
                serialize_size += sparseEnum.rawValue.computeEnumSize(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.SparseEnumMessage.Builder {
            return ProtobufUnittest.SparseEnumMessage.classBuilder() as! ProtobufUnittest.SparseEnumMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.SparseEnumMessage.Builder {
            return classBuilder() as! ProtobufUnittest.SparseEnumMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.SparseEnumMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.SparseEnumMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.SparseEnumMessage.Builder {
            return try ProtobufUnittest.SparseEnumMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.SparseEnumMessage) throws -> ProtobufUnittest.SparseEnumMessage.Builder {
            return try ProtobufUnittest.SparseEnumMessage.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasSparseEnum {
                jsonMap["sparseEnum"] = sparseEnum.toString()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.SparseEnumMessage {
            return try ProtobufUnittest.SparseEnumMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.SparseEnumMessage {
            return try ProtobufUnittest.SparseEnumMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if (hasSparseEnum) {
                output += "\(indent) sparseEnum: \(sparseEnum.description)\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasSparseEnum {
                     hashCode = (hashCode &* 31) &+ sparseEnum.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
                public var sparseEnum:ProtobufUnittest.TestSparseEnum {
                    get {
                        return builderResult.sparseEnum
                    }
                    set (value) {
                        builderResult.hasSparseEnum = true
                        builderResult.sparseEnum = value
                    }
                }
                public var hasSparseEnum:Bool{
                    get {
                        return builderResult.hasSparseEnum
                    }
                }
            @discardableResult
                public func setSparseEnum(_ value:ProtobufUnittest.TestSparseEnum) -> ProtobufUnittest.SparseEnumMessage.Builder {
                  self.sparseEnum = value
                  return self
                }
            @discardableResult
                public func clearSparseEnum() -> ProtobufUnittest.SparseEnumMessage.Builder {
                   builderResult.hasSparseEnum = false
                   builderResult.sparseEnum = .sparseA
                   return self
                }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.SparseEnumMessage.Builder {
                builderResult = ProtobufUnittest.SparseEnumMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.SparseEnumMessage.Builder {
                return try ProtobufUnittest.SparseEnumMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.SparseEnumMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.SparseEnumMessage {
                let returnMe:ProtobufUnittest.SparseEnumMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.SparseEnumMessage) throws -> ProtobufUnittest.SparseEnumMessage.Builder {
                if other == ProtobufUnittest.SparseEnumMessage() {
                    return self
                }
                if other.hasSparseEnum {
                    sparseEnum = other.sparseEnum
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.SparseEnumMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SparseEnumMessage.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:
                        let valueIntsparseEnum = try codedInputStream.readEnum()
                        if let enumssparseEnum = ProtobufUnittest.TestSparseEnum(rawValue:valueIntsparseEnum){
                            sparseEnum = enumssparseEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 1, value:Int64(valueIntsparseEnum))
                        }

                    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 -> ProtobufUnittest.SparseEnumMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.SparseEnumMessage.Builder()
                if let jsonValueSparseEnum = jsonMap["sparseEnum"] as? String {
                    resultDecodedBuilder.sparseEnum = try ProtobufUnittest.TestSparseEnum.fromString(jsonValueSparseEnum)
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.SparseEnumMessage.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 ProtobufUnittest.SparseEnumMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test String and Bytes: string is for valid UTF-8 strings
    final public class OneString : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.OneString.Builder

        public static func == (lhs: ProtobufUnittest.OneString, rhs: ProtobufUnittest.OneString) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasData == rhs.hasData) && (!lhs.hasData || lhs.data == rhs.data)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var data:String! = nil
        public fileprivate(set) var hasData:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasData {
                try codedOutputStream.writeString(fieldNumber: 1, value:data)
            }
            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 hasData {
                serialize_size += data.computeStringSize(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.OneString.Builder {
            return ProtobufUnittest.OneString.classBuilder() as! ProtobufUnittest.OneString.Builder
        }
        public func getBuilder() -> ProtobufUnittest.OneString.Builder {
            return classBuilder() as! ProtobufUnittest.OneString.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.OneString.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.OneString.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.OneString.Builder {
            return try ProtobufUnittest.OneString.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.OneString) throws -> ProtobufUnittest.OneString.Builder {
            return try ProtobufUnittest.OneString.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasData {
                jsonMap["data"] = data
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.OneString {
            return try ProtobufUnittest.OneString.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.OneString {
            return try ProtobufUnittest.OneString.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasData {
                output += "\(indent) data: \(String(describing: data)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasData {
                    hashCode = (hashCode &* 31) &+ data.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var data:String {
                get {
                    return builderResult.data
                }
                set (value) {
                    builderResult.hasData = true
                    builderResult.data = value
                }
            }
            public var hasData:Bool {
                get {
                    return builderResult.hasData
                }
            }
            @discardableResult
            public func setData(_ value:String) -> ProtobufUnittest.OneString.Builder {
                self.data = value
                return self
            }
            @discardableResult
            public func clearData() -> ProtobufUnittest.OneString.Builder{
                builderResult.hasData = false
                builderResult.data = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.OneString.Builder {
                builderResult = ProtobufUnittest.OneString()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.OneString.Builder {
                return try ProtobufUnittest.OneString.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.OneString {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.OneString {
                let returnMe:ProtobufUnittest.OneString = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.OneString) throws -> ProtobufUnittest.OneString.Builder {
                if other == ProtobufUnittest.OneString() {
                    return self
                }
                if other.hasData {
                    data = other.data
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.OneString.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OneString.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:
                        data = try codedInputStream.readString()

                    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 -> ProtobufUnittest.OneString.Builder {
                let resultDecodedBuilder = ProtobufUnittest.OneString.Builder()
                if let jsonValueData = jsonMap["data"] as? String {
                    resultDecodedBuilder.data = jsonValueData
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.OneString.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 ProtobufUnittest.OneString.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class MoreString : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.MoreString.Builder

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

        public fileprivate(set) var data:Array<String> = Array<String>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if !data.isEmpty {
                for oneValuedata in data {
                    try codedOutputStream.writeString(fieldNumber: 1, value:oneValuedata)
                }
            }
            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 dataSizeData:Int32 = 0
            for oneValuedata in data {
                dataSizeData += oneValuedata.computeStringSizeNoTag()
            }
            serialize_size += dataSizeData
            serialize_size += 1 * Int32(data.count)
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.MoreString.Builder {
            return ProtobufUnittest.MoreString.classBuilder() as! ProtobufUnittest.MoreString.Builder
        }
        public func getBuilder() -> ProtobufUnittest.MoreString.Builder {
            return classBuilder() as! ProtobufUnittest.MoreString.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.MoreString.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.MoreString.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.MoreString.Builder {
            return try ProtobufUnittest.MoreString.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.MoreString) throws -> ProtobufUnittest.MoreString.Builder {
            return try ProtobufUnittest.MoreString.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if !data.isEmpty {
                var jsonArrayData:Array<String> = []
                for oneValueData in data {
                    jsonArrayData.append(oneValueData)
                }
                jsonMap["data"] = jsonArrayData
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.MoreString {
            return try ProtobufUnittest.MoreString.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.MoreString {
            return try ProtobufUnittest.MoreString.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            var dataElementIndex:Int = 0
            for oneValueData in data  {
                output += "\(indent) data[\(dataElementIndex)]: \(oneValueData)\n"
                dataElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                for oneValueData in data {
                    hashCode = (hashCode &* 31) &+ oneValueData.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var data:Array<String> {
                get {
                    return builderResult.data
                }
                set (array) {
                    builderResult.data = array
                }
            }
            @discardableResult
            public func setData(_ value:Array<String>) -> ProtobufUnittest.MoreString.Builder {
                self.data = value
                return self
            }
            @discardableResult
            public func clearData() -> ProtobufUnittest.MoreString.Builder {
                builderResult.data.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.MoreString.Builder {
                builderResult = ProtobufUnittest.MoreString()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.MoreString.Builder {
                return try ProtobufUnittest.MoreString.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.MoreString {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.MoreString {
                let returnMe:ProtobufUnittest.MoreString = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.MoreString) throws -> ProtobufUnittest.MoreString.Builder {
                if other == ProtobufUnittest.MoreString() {
                    return self
                }
                if !other.data.isEmpty {
                    builderResult.data += other.data
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.MoreString.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.MoreString.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:
                        data += [try codedInputStream.readString()]

                    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 -> ProtobufUnittest.MoreString.Builder {
                let resultDecodedBuilder = ProtobufUnittest.MoreString.Builder()
                if let jsonValueData = jsonMap["data"] as? Array<String> {
                    var jsonArrayData:Array<String> = []
                    for oneValueData in jsonValueData {
                        jsonArrayData.append(oneValueData)
                    }
                    resultDecodedBuilder.data = jsonArrayData
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.MoreString.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 ProtobufUnittest.MoreString.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class OneBytes : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.OneBytes.Builder

        public static func == (lhs: ProtobufUnittest.OneBytes, rhs: ProtobufUnittest.OneBytes) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasData == rhs.hasData) && (!lhs.hasData || lhs.data == rhs.data)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var data:Data! = nil
        public fileprivate(set) var hasData:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasData {
                try codedOutputStream.writeData(fieldNumber: 1, value:data)
            }
            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 hasData {
                serialize_size += data.computeDataSize(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.OneBytes.Builder {
            return ProtobufUnittest.OneBytes.classBuilder() as! ProtobufUnittest.OneBytes.Builder
        }
        public func getBuilder() -> ProtobufUnittest.OneBytes.Builder {
            return classBuilder() as! ProtobufUnittest.OneBytes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.OneBytes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.OneBytes.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.OneBytes.Builder {
            return try ProtobufUnittest.OneBytes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.OneBytes) throws -> ProtobufUnittest.OneBytes.Builder {
            return try ProtobufUnittest.OneBytes.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasData {
                jsonMap["data"] = data.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.OneBytes {
            return try ProtobufUnittest.OneBytes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.OneBytes {
            return try ProtobufUnittest.OneBytes.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasData {
                output += "\(indent) data: \(String(describing: data)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasData {
                    hashCode = (hashCode &* 31) &+ data.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var data:Data {
                get {
                    return builderResult.data
                }
                set (value) {
                    builderResult.hasData = true
                    builderResult.data = value
                }
            }
            public var hasData:Bool {
                get {
                    return builderResult.hasData
                }
            }
            @discardableResult
            public func setData(_ value:Data) -> ProtobufUnittest.OneBytes.Builder {
                self.data = value
                return self
            }
            @discardableResult
            public func clearData() -> ProtobufUnittest.OneBytes.Builder{
                builderResult.hasData = false
                builderResult.data = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.OneBytes.Builder {
                builderResult = ProtobufUnittest.OneBytes()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.OneBytes.Builder {
                return try ProtobufUnittest.OneBytes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.OneBytes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.OneBytes {
                let returnMe:ProtobufUnittest.OneBytes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.OneBytes) throws -> ProtobufUnittest.OneBytes.Builder {
                if other == ProtobufUnittest.OneBytes() {
                    return self
                }
                if other.hasData {
                    data = other.data
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.OneBytes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OneBytes.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:
                        data = 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 -> ProtobufUnittest.OneBytes.Builder {
                let resultDecodedBuilder = ProtobufUnittest.OneBytes.Builder()
                if let jsonValueData = jsonMap["data"] as? String {
                    resultDecodedBuilder.data = Data(base64Encoded:jsonValueData, options: Data.Base64DecodingOptions(rawValue:0))!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.OneBytes.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 ProtobufUnittest.OneBytes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class MoreBytes : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.MoreBytes.Builder

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

        public fileprivate(set) var data:Array<Data> = Array<Data>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if !data.isEmpty {
                for oneValuedata in data {
                    try codedOutputStream.writeData(fieldNumber: 1, value:oneValuedata)
                }
            }
            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 dataSizeData:Int32 = 0
            for oneValuedata in data {
                dataSizeData += oneValuedata.computeDataSizeNoTag()
            }
            serialize_size += dataSizeData
            serialize_size += 1 * Int32(data.count)
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.MoreBytes.Builder {
            return ProtobufUnittest.MoreBytes.classBuilder() as! ProtobufUnittest.MoreBytes.Builder
        }
        public func getBuilder() -> ProtobufUnittest.MoreBytes.Builder {
            return classBuilder() as! ProtobufUnittest.MoreBytes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.MoreBytes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.MoreBytes.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.MoreBytes.Builder {
            return try ProtobufUnittest.MoreBytes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.MoreBytes) throws -> ProtobufUnittest.MoreBytes.Builder {
            return try ProtobufUnittest.MoreBytes.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if !data.isEmpty {
                var jsonArrayData:Array<String> = []
                for oneValueData in data {
                    jsonArrayData.append(oneValueData.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0)))
                }
                jsonMap["data"] = jsonArrayData
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.MoreBytes {
            return try ProtobufUnittest.MoreBytes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.MoreBytes {
            return try ProtobufUnittest.MoreBytes.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            var dataElementIndex:Int = 0
            for oneValueData in data  {
                output += "\(indent) data[\(dataElementIndex)]: \(oneValueData)\n"
                dataElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                for oneValueData in data {
                    hashCode = (hashCode &* 31) &+ oneValueData.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var data:Array<Data> {
                get {
                    return builderResult.data
                }
                set (array) {
                    builderResult.data = array
                }
            }
            @discardableResult
            public func setData(_ value:Array<Data>) -> ProtobufUnittest.MoreBytes.Builder {
                self.data = value
                return self
            }
            @discardableResult
            public func clearData() -> ProtobufUnittest.MoreBytes.Builder {
                builderResult.data.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.MoreBytes.Builder {
                builderResult = ProtobufUnittest.MoreBytes()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.MoreBytes.Builder {
                return try ProtobufUnittest.MoreBytes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.MoreBytes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.MoreBytes {
                let returnMe:ProtobufUnittest.MoreBytes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.MoreBytes) throws -> ProtobufUnittest.MoreBytes.Builder {
                if other == ProtobufUnittest.MoreBytes() {
                    return self
                }
                if !other.data.isEmpty {
                    builderResult.data += other.data
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.MoreBytes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.MoreBytes.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:
                        data += [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 -> ProtobufUnittest.MoreBytes.Builder {
                let resultDecodedBuilder = ProtobufUnittest.MoreBytes.Builder()
                if let jsonValueData = jsonMap["data"] as? Array<String> {
                    var jsonArrayData:Array<Data> = []
                    for oneValueData in jsonValueData {
                        jsonArrayData.append(Data(base64Encoded:oneValueData, options: Data.Base64DecodingOptions(rawValue:0))!)
                    }
                    resultDecodedBuilder.data = jsonArrayData
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.MoreBytes.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 ProtobufUnittest.MoreBytes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test int32, uint32, int64, uint64, and bool are all compatible
    final public class Int32Message : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.Int32Message.Builder

        public static func == (lhs: ProtobufUnittest.Int32Message, rhs: ProtobufUnittest.Int32Message) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasData == rhs.hasData) && (!lhs.hasData || lhs.data == rhs.data)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var data:Int32! = nil
        public fileprivate(set) var hasData:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasData {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:data)
            }
            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 hasData {
                serialize_size += data.computeInt32Size(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.Int32Message.Builder {
            return ProtobufUnittest.Int32Message.classBuilder() as! ProtobufUnittest.Int32Message.Builder
        }
        public func getBuilder() -> ProtobufUnittest.Int32Message.Builder {
            return classBuilder() as! ProtobufUnittest.Int32Message.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Int32Message.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Int32Message.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.Int32Message.Builder {
            return try ProtobufUnittest.Int32Message.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.Int32Message) throws -> ProtobufUnittest.Int32Message.Builder {
            return try ProtobufUnittest.Int32Message.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasData {
                jsonMap["data"] = Int(data)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.Int32Message {
            return try ProtobufUnittest.Int32Message.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.Int32Message {
            return try ProtobufUnittest.Int32Message.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasData {
                output += "\(indent) data: \(String(describing: data)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasData {
                    hashCode = (hashCode &* 31) &+ data.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var data:Int32 {
                get {
                    return builderResult.data
                }
                set (value) {
                    builderResult.hasData = true
                    builderResult.data = value
                }
            }
            public var hasData:Bool {
                get {
                    return builderResult.hasData
                }
            }
            @discardableResult
            public func setData(_ value:Int32) -> ProtobufUnittest.Int32Message.Builder {
                self.data = value
                return self
            }
            @discardableResult
            public func clearData() -> ProtobufUnittest.Int32Message.Builder{
                builderResult.hasData = false
                builderResult.data = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.Int32Message.Builder {
                builderResult = ProtobufUnittest.Int32Message()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.Int32Message.Builder {
                return try ProtobufUnittest.Int32Message.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.Int32Message {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.Int32Message {
                let returnMe:ProtobufUnittest.Int32Message = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.Int32Message) throws -> ProtobufUnittest.Int32Message.Builder {
                if other == ProtobufUnittest.Int32Message() {
                    return self
                }
                if other.hasData {
                    data = other.data
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Int32Message.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Int32Message.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:
                        data = 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 -> ProtobufUnittest.Int32Message.Builder {
                let resultDecodedBuilder = ProtobufUnittest.Int32Message.Builder()
                if let jsonValueData = jsonMap["data"] as? Int {
                    resultDecodedBuilder.data = Int32(jsonValueData)
                } else if let jsonValueData = jsonMap["data"] as? String {
                    resultDecodedBuilder.data = Int32(jsonValueData)!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.Int32Message.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 ProtobufUnittest.Int32Message.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class Uint32Message : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.Uint32Message.Builder

        public static func == (lhs: ProtobufUnittest.Uint32Message, rhs: ProtobufUnittest.Uint32Message) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasData == rhs.hasData) && (!lhs.hasData || lhs.data == rhs.data)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var data:UInt32! = nil
        public fileprivate(set) var hasData:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasData {
                try codedOutputStream.writeUInt32(fieldNumber: 1, value:data)
            }
            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 hasData {
                serialize_size += data.computeUInt32Size(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.Uint32Message.Builder {
            return ProtobufUnittest.Uint32Message.classBuilder() as! ProtobufUnittest.Uint32Message.Builder
        }
        public func getBuilder() -> ProtobufUnittest.Uint32Message.Builder {
            return classBuilder() as! ProtobufUnittest.Uint32Message.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Uint32Message.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Uint32Message.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.Uint32Message.Builder {
            return try ProtobufUnittest.Uint32Message.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.Uint32Message) throws -> ProtobufUnittest.Uint32Message.Builder {
            return try ProtobufUnittest.Uint32Message.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasData {
                jsonMap["data"] = UInt(data)
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.Uint32Message {
            return try ProtobufUnittest.Uint32Message.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.Uint32Message {
            return try ProtobufUnittest.Uint32Message.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasData {
                output += "\(indent) data: \(String(describing: data)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasData {
                    hashCode = (hashCode &* 31) &+ data.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var data:UInt32 {
                get {
                    return builderResult.data
                }
                set (value) {
                    builderResult.hasData = true
                    builderResult.data = value
                }
            }
            public var hasData:Bool {
                get {
                    return builderResult.hasData
                }
            }
            @discardableResult
            public func setData(_ value:UInt32) -> ProtobufUnittest.Uint32Message.Builder {
                self.data = value
                return self
            }
            @discardableResult
            public func clearData() -> ProtobufUnittest.Uint32Message.Builder{
                builderResult.hasData = false
                builderResult.data = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.Uint32Message.Builder {
                builderResult = ProtobufUnittest.Uint32Message()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.Uint32Message.Builder {
                return try ProtobufUnittest.Uint32Message.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.Uint32Message {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.Uint32Message {
                let returnMe:ProtobufUnittest.Uint32Message = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.Uint32Message) throws -> ProtobufUnittest.Uint32Message.Builder {
                if other == ProtobufUnittest.Uint32Message() {
                    return self
                }
                if other.hasData {
                    data = other.data
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Uint32Message.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Uint32Message.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:
                        data = try codedInputStream.readUInt32()

                    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 -> ProtobufUnittest.Uint32Message.Builder {
                let resultDecodedBuilder = ProtobufUnittest.Uint32Message.Builder()
                if let jsonValueData = jsonMap["data"] as? UInt {
                    resultDecodedBuilder.data = UInt32(jsonValueData)
                } else if let jsonValueData = jsonMap["data"] as? String {
                    resultDecodedBuilder.data = UInt32(jsonValueData)!
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.Uint32Message.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 ProtobufUnittest.Uint32Message.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class Int64Message : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.Int64Message.Builder

        public static func == (lhs: ProtobufUnittest.Int64Message, rhs: ProtobufUnittest.Int64Message) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasData == rhs.hasData) && (!lhs.hasData || lhs.data == rhs.data)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var data:Int64! = nil
        public fileprivate(set) var hasData:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasData {
                try codedOutputStream.writeInt64(fieldNumber: 1, value:data)
            }
            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 hasData {
                serialize_size += data.computeInt64Size(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.Int64Message.Builder {
            return ProtobufUnittest.Int64Message.classBuilder() as! ProtobufUnittest.Int64Message.Builder
        }
        public func getBuilder() -> ProtobufUnittest.Int64Message.Builder {
            return classBuilder() as! ProtobufUnittest.Int64Message.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Int64Message.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Int64Message.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.Int64Message.Builder {
            return try ProtobufUnittest.Int64Message.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.Int64Message) throws -> ProtobufUnittest.Int64Message.Builder {
            return try ProtobufUnittest.Int64Message.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasData {
                jsonMap["data"] = "\(data!)"
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.Int64Message {
            return try ProtobufUnittest.Int64Message.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.Int64Message {
            return try ProtobufUnittest.Int64Message.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasData {
                output += "\(indent) data: \(String(describing: data)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasData {
                    hashCode = (hashCode &* 31) &+ data.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var data:Int64 {
                get {
                    return builderResult.data
                }
                set (value) {
                    builderResult.hasData = true
                    builderResult.data = value
                }
            }
            public var hasData:Bool {
                get {
                    return builderResult.hasData
                }
            }
            @discardableResult
            public func setData(_ value:Int64) -> ProtobufUnittest.Int64Message.Builder {
                self.data = value
                return self
            }
            @discardableResult
            public func clearData() -> ProtobufUnittest.Int64Message.Builder{
                builderResult.hasData = false
                builderResult.data = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.Int64Message.Builder {
                builderResult = ProtobufUnittest.Int64Message()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.Int64Message.Builder {
                return try ProtobufUnittest.Int64Message.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.Int64Message {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.Int64Message {
                let returnMe:ProtobufUnittest.Int64Message = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.Int64Message) throws -> ProtobufUnittest.Int64Message.Builder {
                if other == ProtobufUnittest.Int64Message() {
                    return self
                }
                if other.hasData {
                    data = other.data
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Int64Message.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Int64Message.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:
                        data = try codedInputStream.readInt64()

                    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 -> ProtobufUnittest.Int64Message.Builder {
                let resultDecodedBuilder = ProtobufUnittest.Int64Message.Builder()
                if let jsonValueData = jsonMap["data"] as? String {
                    resultDecodedBuilder.data = Int64(jsonValueData)!
                } else if let jsonValueData = jsonMap["data"] as? Int {
                    resultDecodedBuilder.data = Int64(jsonValueData)
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.Int64Message.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 ProtobufUnittest.Int64Message.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class Uint64Message : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.Uint64Message.Builder

        public static func == (lhs: ProtobufUnittest.Uint64Message, rhs: ProtobufUnittest.Uint64Message) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasData == rhs.hasData) && (!lhs.hasData || lhs.data == rhs.data)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var data:UInt64! = nil
        public fileprivate(set) var hasData:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasData {
                try codedOutputStream.writeUInt64(fieldNumber: 1, value:data)
            }
            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 hasData {
                serialize_size += data.computeUInt64Size(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.Uint64Message.Builder {
            return ProtobufUnittest.Uint64Message.classBuilder() as! ProtobufUnittest.Uint64Message.Builder
        }
        public func getBuilder() -> ProtobufUnittest.Uint64Message.Builder {
            return classBuilder() as! ProtobufUnittest.Uint64Message.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Uint64Message.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Uint64Message.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.Uint64Message.Builder {
            return try ProtobufUnittest.Uint64Message.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.Uint64Message) throws -> ProtobufUnittest.Uint64Message.Builder {
            return try ProtobufUnittest.Uint64Message.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasData {
                jsonMap["data"] = "\(data!)"
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.Uint64Message {
            return try ProtobufUnittest.Uint64Message.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.Uint64Message {
            return try ProtobufUnittest.Uint64Message.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasData {
                output += "\(indent) data: \(String(describing: data)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasData {
                    hashCode = (hashCode &* 31) &+ data.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var data:UInt64 {
                get {
                    return builderResult.data
                }
                set (value) {
                    builderResult.hasData = true
                    builderResult.data = value
                }
            }
            public var hasData:Bool {
                get {
                    return builderResult.hasData
                }
            }
            @discardableResult
            public func setData(_ value:UInt64) -> ProtobufUnittest.Uint64Message.Builder {
                self.data = value
                return self
            }
            @discardableResult
            public func clearData() -> ProtobufUnittest.Uint64Message.Builder{
                builderResult.hasData = false
                builderResult.data = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.Uint64Message.Builder {
                builderResult = ProtobufUnittest.Uint64Message()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.Uint64Message.Builder {
                return try ProtobufUnittest.Uint64Message.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.Uint64Message {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.Uint64Message {
                let returnMe:ProtobufUnittest.Uint64Message = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.Uint64Message) throws -> ProtobufUnittest.Uint64Message.Builder {
                if other == ProtobufUnittest.Uint64Message() {
                    return self
                }
                if other.hasData {
                    data = other.data
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Uint64Message.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Uint64Message.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:
                        data = try codedInputStream.readUInt64()

                    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 -> ProtobufUnittest.Uint64Message.Builder {
                let resultDecodedBuilder = ProtobufUnittest.Uint64Message.Builder()
                if let jsonValueData = jsonMap["data"] as? String {
                    resultDecodedBuilder.data = UInt64(jsonValueData)!
                } else if let jsonValueData = jsonMap["data"] as? UInt {
                    resultDecodedBuilder.data = UInt64(jsonValueData)
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.Uint64Message.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 ProtobufUnittest.Uint64Message.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class BoolMessage : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.BoolMessage.Builder

        public static func == (lhs: ProtobufUnittest.BoolMessage, rhs: ProtobufUnittest.BoolMessage) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasData == rhs.hasData) && (!lhs.hasData || lhs.data == rhs.data)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var data:Bool! = nil
        public fileprivate(set) var hasData:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasData {
                try codedOutputStream.writeBool(fieldNumber: 1, value:data)
            }
            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 hasData {
                serialize_size += data.computeBoolSize(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.BoolMessage.Builder {
            return ProtobufUnittest.BoolMessage.classBuilder() as! ProtobufUnittest.BoolMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.BoolMessage.Builder {
            return classBuilder() as! ProtobufUnittest.BoolMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.BoolMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.BoolMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.BoolMessage.Builder {
            return try ProtobufUnittest.BoolMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.BoolMessage) throws -> ProtobufUnittest.BoolMessage.Builder {
            return try ProtobufUnittest.BoolMessage.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasData {
                jsonMap["data"] = data
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.BoolMessage {
            return try ProtobufUnittest.BoolMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.BoolMessage {
            return try ProtobufUnittest.BoolMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasData {
                output += "\(indent) data: \(String(describing: data)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasData {
                    hashCode = (hashCode &* 31) &+ data.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var data:Bool {
                get {
                    return builderResult.data
                }
                set (value) {
                    builderResult.hasData = true
                    builderResult.data = value
                }
            }
            public var hasData:Bool {
                get {
                    return builderResult.hasData
                }
            }
            @discardableResult
            public func setData(_ value:Bool) -> ProtobufUnittest.BoolMessage.Builder {
                self.data = value
                return self
            }
            @discardableResult
            public func clearData() -> ProtobufUnittest.BoolMessage.Builder{
                builderResult.hasData = false
                builderResult.data = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.BoolMessage.Builder {
                builderResult = ProtobufUnittest.BoolMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.BoolMessage.Builder {
                return try ProtobufUnittest.BoolMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.BoolMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.BoolMessage {
                let returnMe:ProtobufUnittest.BoolMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.BoolMessage) throws -> ProtobufUnittest.BoolMessage.Builder {
                if other == ProtobufUnittest.BoolMessage() {
                    return self
                }
                if other.hasData {
                    data = other.data
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.BoolMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BoolMessage.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:
                        data = try codedInputStream.readBool()

                    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 -> ProtobufUnittest.BoolMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.BoolMessage.Builder()
                if let jsonValueData = jsonMap["data"] as? Bool {
                    resultDecodedBuilder.data = jsonValueData
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.BoolMessage.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 ProtobufUnittest.BoolMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test oneofs.
    final public class TestOneof : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestOneof.Builder

        public static func == (lhs: ProtobufUnittest.TestOneof, rhs: ProtobufUnittest.TestOneof) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasFooInt == rhs.hasFooInt) && (!lhs.hasFooInt || lhs.fooInt == rhs.fooInt)
            fieldCheck = fieldCheck && (lhs.hasFooString == rhs.hasFooString) && (!lhs.hasFooString || lhs.fooString == rhs.fooString)
            fieldCheck = fieldCheck && (lhs.hasFooMessage == rhs.hasFooMessage) && (!lhs.hasFooMessage || lhs.fooMessage == rhs.fooMessage)
            fieldCheck = fieldCheck && (lhs.hasFooGroup == rhs.hasFooGroup) && (!lhs.hasFooGroup || lhs.fooGroup == rhs.fooGroup)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class FooGroup : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestOneof.FooGroup.Builder

            public static func == (lhs: ProtobufUnittest.TestOneof.FooGroup, rhs: ProtobufUnittest.TestOneof.FooGroup) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
                fieldCheck = fieldCheck && (lhs.hasB == rhs.hasB) && (!lhs.hasB || lhs.b == rhs.b)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var a:Int32! = nil
            public fileprivate(set) var hasA:Bool = false

            public fileprivate(set) var b:String! = nil
            public fileprivate(set) var hasB:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasA {
                    try codedOutputStream.writeInt32(fieldNumber: 5, value:a)
                }
                if hasB {
                    try codedOutputStream.writeString(fieldNumber: 6, value:b)
                }
                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 hasA {
                    serialize_size += a.computeInt32Size(fieldNumber: 5)
                }
                if hasB {
                    serialize_size += b.computeStringSize(fieldNumber: 6)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                return ProtobufUnittest.TestOneof.FooGroup.classBuilder() as! ProtobufUnittest.TestOneof.FooGroup.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                return classBuilder() as! ProtobufUnittest.TestOneof.FooGroup.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestOneof.FooGroup.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestOneof.FooGroup.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                return try ProtobufUnittest.TestOneof.FooGroup.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestOneof.FooGroup) throws -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                return try ProtobufUnittest.TestOneof.FooGroup.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasA {
                    jsonMap["a"] = Int(a)
                }
                if hasB {
                    jsonMap["b"] = b
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestOneof.FooGroup {
                return try ProtobufUnittest.TestOneof.FooGroup.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof.FooGroup {
                return try ProtobufUnittest.TestOneof.FooGroup.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasA {
                    output += "\(indent) a: \(String(describing: a)) \n"
                }
                if hasB {
                    output += "\(indent) b: \(String(describing: b)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasA {
                        hashCode = (hashCode &* 31) &+ a.hashValue
                    }
                    if hasB {
                        hashCode = (hashCode &* 31) &+ b.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var a:Int32 {
                    get {
                        return builderResult.a
                    }
                    set (value) {
                        builderResult.hasA = true
                        builderResult.a = value
                    }
                }
                public var hasA:Bool {
                    get {
                        return builderResult.hasA
                    }
                }
                @discardableResult
                public func setA(_ value:Int32) -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                    self.a = value
                    return self
                }
                @discardableResult
                public func clearA() -> ProtobufUnittest.TestOneof.FooGroup.Builder{
                    builderResult.hasA = false
                    builderResult.a = nil
                    return self
                }
                public var b:String {
                    get {
                        return builderResult.b
                    }
                    set (value) {
                        builderResult.hasB = true
                        builderResult.b = value
                    }
                }
                public var hasB:Bool {
                    get {
                        return builderResult.hasB
                    }
                }
                @discardableResult
                public func setB(_ value:String) -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                    self.b = value
                    return self
                }
                @discardableResult
                public func clearB() -> ProtobufUnittest.TestOneof.FooGroup.Builder{
                    builderResult.hasB = false
                    builderResult.b = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                    builderResult = ProtobufUnittest.TestOneof.FooGroup()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                    return try ProtobufUnittest.TestOneof.FooGroup.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestOneof.FooGroup {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestOneof.FooGroup {
                    let returnMe:ProtobufUnittest.TestOneof.FooGroup = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestOneof.FooGroup) throws -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                    if other == ProtobufUnittest.TestOneof.FooGroup() {
                        return self
                    }
                    if other.hasA {
                        a = other.a
                    }
                    if other.hasB {
                        b = other.b
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof.FooGroup.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 40:
                            a = try codedInputStream.readInt32()

                        case 50:
                            b = try codedInputStream.readString()

                        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 -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestOneof.FooGroup.Builder()
                    if let jsonValueA = jsonMap["a"] as? Int {
                        resultDecodedBuilder.a = Int32(jsonValueA)
                    } else if let jsonValueA = jsonMap["a"] as? String {
                        resultDecodedBuilder.a = Int32(jsonValueA)!
                    }
                    if let jsonValueB = jsonMap["b"] as? String {
                        resultDecodedBuilder.b = jsonValueB
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof.FooGroup.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 ProtobufUnittest.TestOneof.FooGroup.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //OneOf declaration start

        public enum Foo {
            case oneOfFooNotSet

            public func checkOneOfIsSet() -> Bool {
                switch self {
                case .oneOfFooNotSet: return false
                default: return true
                }
            }
            case fooInt(Int32)

            public static func getFooInt(_ value:Foo) -> Int32? {
                switch value {
                case .fooInt(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getFooInt() -> Int32? {
                switch self {
                case .fooInt(let otherValue): return otherValue
                default: return nil
                }
            }
            case fooString(String)

            public static func getFooString(_ value:Foo) -> String? {
                switch value {
                case .fooString(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getFooString() -> String? {
                switch self {
                case .fooString(let otherValue): return otherValue
                default: return nil
                }
            }
            case fooMessage(ProtobufUnittest.TestAllTypes)

            public static func getFooMessage(_ value:Foo) -> ProtobufUnittest.TestAllTypes? {
                switch value {
                case .fooMessage(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getFooMessage() -> ProtobufUnittest.TestAllTypes? {
                switch self {
                case .fooMessage(let messageValue): return messageValue
                default: return nil
                }
            }
            case fooGroup(ProtobufUnittest.TestOneof.FooGroup)

            public static func getFooGroup(_ value:Foo) -> ProtobufUnittest.TestOneof.FooGroup? {
                switch value {
                case .fooGroup(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getFooGroup() -> ProtobufUnittest.TestOneof.FooGroup? {
                switch self {
                case .fooGroup(let messageValue): return messageValue
                default: return nil
                }
            }
        }
        //OneOf declaration end

        fileprivate var storageFoo:TestOneof.Foo =  TestOneof.Foo.oneOfFooNotSet
        public func getOneOfFoo() ->  TestOneof.Foo {
            let copyObjectFoo = storageFoo
            return copyObjectFoo
        }
        public fileprivate(set) var fooInt:Int32!{
            get {
                return TestOneof.Foo.getFooInt(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof.Foo.fooInt(newvalue)
            }
        }
        public fileprivate(set) var hasFooInt:Bool {
            get {
                return TestOneof.Foo.getFooInt(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooString:String!{
            get {
                return TestOneof.Foo.getFooString(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof.Foo.fooString(newvalue)
            }
        }
        public fileprivate(set) var hasFooString:Bool {
            get {
                return TestOneof.Foo.getFooString(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooMessage:ProtobufUnittest.TestAllTypes!{
            get {
                return TestOneof.Foo.getFooMessage(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof.Foo.fooMessage(newvalue)
            }
        }
        public fileprivate(set) var hasFooMessage:Bool {
            get {
                return TestOneof.Foo.getFooMessage(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooGroup:ProtobufUnittest.TestOneof.FooGroup!{
            get {
                return TestOneof.Foo.getFooGroup(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof.Foo.fooGroup(newvalue)
            }
        }
        public fileprivate(set) var hasFooGroup:Bool {
            get {
                return TestOneof.Foo.getFooGroup(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasFooInt {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:fooInt)
            }
            if hasFooString {
                try codedOutputStream.writeString(fieldNumber: 2, value:fooString)
            }
            if hasFooMessage {
                try codedOutputStream.writeMessage(fieldNumber: 3, value:fooMessage)
            }
            if hasFooGroup {
                try codedOutputStream.writeGroup(fieldNumber: 4, value:fooGroup)
            }
            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 hasFooInt {
                serialize_size += fooInt.computeInt32Size(fieldNumber: 1)
            }
            if hasFooString {
                serialize_size += fooString.computeStringSize(fieldNumber: 2)
            }
            if hasFooMessage {
                if let varSizefooMessage = fooMessage?.computeMessageSize(fieldNumber: 3) {
                    serialize_size += varSizefooMessage
                }
            }
            if hasFooGroup {
                if let varSizefooGroup = fooGroup?.computeGroupSize(fieldNumber: 4) {
                    serialize_size += varSizefooGroup
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestOneof.Builder {
            return ProtobufUnittest.TestOneof.classBuilder() as! ProtobufUnittest.TestOneof.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestOneof.Builder {
            return classBuilder() as! ProtobufUnittest.TestOneof.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestOneof.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestOneof.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestOneof.Builder {
            return try ProtobufUnittest.TestOneof.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestOneof) throws -> ProtobufUnittest.TestOneof.Builder {
            return try ProtobufUnittest.TestOneof.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasFooInt {
                jsonMap["fooInt"] = Int(fooInt)
            }
            if hasFooString {
                jsonMap["fooString"] = fooString
            }
            if hasFooMessage {
                jsonMap["fooMessage"] = try fooMessage.encode()
            }
            if hasFooGroup {
                jsonMap["foogroup"] = try fooGroup.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestOneof {
            return try ProtobufUnittest.TestOneof.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof {
            return try ProtobufUnittest.TestOneof.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasFooInt {
                output += "\(indent) fooInt: \(String(describing: fooInt)) \n"
            }
            if hasFooString {
                output += "\(indent) fooString: \(String(describing: fooString)) \n"
            }
            if hasFooMessage {
                output += "\(indent) fooMessage {\n"
                if let outDescFooMessage = fooMessage {
                    output += try outDescFooMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasFooGroup {
                output += "\(indent) fooGroup {\n"
                if let outDescFooGroup = fooGroup {
                    output += try outDescFooGroup.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasFooInt {
                    hashCode = (hashCode &* 31) &+ fooInt.hashValue
                }
                if hasFooString {
                    hashCode = (hashCode &* 31) &+ fooString.hashValue
                }
                if hasFooMessage {
                    if let hashValuefooMessage = fooMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefooMessage
                    }
                }
                if hasFooGroup {
                    if let hashValuefooGroup = fooGroup?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefooGroup
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public func setFoo(_ oneOf:TestOneof.Foo) ->  ProtobufUnittest.TestOneof.Builder {
                builderResult.storageFoo = oneOf
                return self
            }
            public var fooInt:Int32 {
                get {
                    return builderResult.fooInt
                }
                set (value) {
                    builderResult.hasFooInt = true
                    builderResult.fooInt = value
                }
            }
            public var hasFooInt:Bool {
                get {
                    return builderResult.hasFooInt
                }
            }
            @discardableResult
            public func setFooInt(_ value:Int32) -> ProtobufUnittest.TestOneof.Builder {
                self.fooInt = value
                return self
            }
            @discardableResult
            public func clearFooInt() -> ProtobufUnittest.TestOneof.Builder{
                builderResult.hasFooInt = false
                builderResult.fooInt = nil
                return self
            }
            public var fooString:String {
                get {
                    return builderResult.fooString
                }
                set (value) {
                    builderResult.hasFooString = true
                    builderResult.fooString = value
                }
            }
            public var hasFooString:Bool {
                get {
                    return builderResult.hasFooString
                }
            }
            @discardableResult
            public func setFooString(_ value:String) -> ProtobufUnittest.TestOneof.Builder {
                self.fooString = value
                return self
            }
            @discardableResult
            public func clearFooString() -> ProtobufUnittest.TestOneof.Builder{
                builderResult.hasFooString = false
                builderResult.fooString = nil
                return self
            }
            public var fooMessage:ProtobufUnittest.TestAllTypes! {
                get {
                    if fooMessageBuilder_ != nil {
                        builderResult.fooMessage = fooMessageBuilder_.getMessage()
                    }
                    return builderResult.fooMessage
                }
                set (value) {
                    builderResult.hasFooMessage = value != nil
                    builderResult.fooMessage = value
                }
            }
            public var hasFooMessage:Bool {
                get {
                    return builderResult.hasFooMessage
                }
            }
            fileprivate var fooMessageBuilder_:ProtobufUnittest.TestAllTypes.Builder! {
                didSet {
                    builderResult.hasFooMessage = true
                }
            }
            public func getFooMessageBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
                if fooMessageBuilder_ == nil {
                    fooMessageBuilder_ = ProtobufUnittest.TestAllTypes.Builder()
                    builderResult.fooMessage = fooMessageBuilder_.getMessage()
                    if fooMessage != nil {
                        try! fooMessageBuilder_.mergeFrom(other: fooMessage)
                    }
                }
                return fooMessageBuilder_
            }
            @discardableResult
            public func setFooMessage(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestOneof.Builder {
                self.fooMessage = value
                return self
            }
            @discardableResult
            public func mergeFooMessage(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestOneof.Builder {
                if builderResult.hasFooMessage {
                    builderResult.fooMessage = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.fooMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.fooMessage = value
                }
                builderResult.hasFooMessage = true
                return self
            }
            @discardableResult
            public func clearFooMessage() -> ProtobufUnittest.TestOneof.Builder {
                fooMessageBuilder_ = nil
                builderResult.hasFooMessage = false
                builderResult.fooMessage = nil
                return self
            }
            public var fooGroup:ProtobufUnittest.TestOneof.FooGroup! {
                get {
                    if fooGroupBuilder_ != nil {
                        builderResult.fooGroup = fooGroupBuilder_.getMessage()
                    }
                    return builderResult.fooGroup
                }
                set (value) {
                    builderResult.hasFooGroup = value != nil
                    builderResult.fooGroup = value
                }
            }
            public var hasFooGroup:Bool {
                get {
                    return builderResult.hasFooGroup
                }
            }
            fileprivate var fooGroupBuilder_:ProtobufUnittest.TestOneof.FooGroup.Builder! {
                didSet {
                    builderResult.hasFooGroup = true
                }
            }
            public func getFooGroupBuilder() -> ProtobufUnittest.TestOneof.FooGroup.Builder {
                if fooGroupBuilder_ == nil {
                    fooGroupBuilder_ = ProtobufUnittest.TestOneof.FooGroup.Builder()
                    builderResult.fooGroup = fooGroupBuilder_.getMessage()
                    if fooGroup != nil {
                        try! fooGroupBuilder_.mergeFrom(other: fooGroup)
                    }
                }
                return fooGroupBuilder_
            }
            @discardableResult
            public func setFooGroup(_ value:ProtobufUnittest.TestOneof.FooGroup!) -> ProtobufUnittest.TestOneof.Builder {
                self.fooGroup = value
                return self
            }
            @discardableResult
            public func mergeFooGroup(value:ProtobufUnittest.TestOneof.FooGroup) throws -> ProtobufUnittest.TestOneof.Builder {
                if builderResult.hasFooGroup {
                    builderResult.fooGroup = try ProtobufUnittest.TestOneof.FooGroup.builderWithPrototype(prototype:builderResult.fooGroup).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.fooGroup = value
                }
                builderResult.hasFooGroup = true
                return self
            }
            @discardableResult
            public func clearFooGroup() -> ProtobufUnittest.TestOneof.Builder {
                fooGroupBuilder_ = nil
                builderResult.hasFooGroup = false
                builderResult.fooGroup = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestOneof.Builder {
                builderResult = ProtobufUnittest.TestOneof()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestOneof.Builder {
                return try ProtobufUnittest.TestOneof.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestOneof {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestOneof {
                let returnMe:ProtobufUnittest.TestOneof = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestOneof) throws -> ProtobufUnittest.TestOneof.Builder {
                if other == ProtobufUnittest.TestOneof() {
                    return self
                }
                if other.hasFooInt {
                    fooInt = other.fooInt
                }
                if other.hasFooString {
                    fooString = other.fooString
                }
                if (other.hasFooMessage) {
                    try mergeFooMessage(value: other.fooMessage)
                }
                if (other.hasFooGroup) {
                    try mergeFooGroup(value: other.fooGroup)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof.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:
                        fooInt = try codedInputStream.readInt32()

                    case 18:
                        fooString = try codedInputStream.readString()

                    case 26:
                        let subBuilder:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                        if hasFooMessage {
                            try subBuilder.mergeFrom(other: fooMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        fooMessage = subBuilder.buildPartial()

                    case 35:
                        let subBuilder:ProtobufUnittest.TestOneof.FooGroup.Builder = ProtobufUnittest.TestOneof.FooGroup.Builder()
                        if hasFooGroup {
                            try subBuilder.mergeFrom(other: fooGroup)
                        }
                        try codedInputStream.readGroup(fieldNumber: 4, builder:subBuilder, extensionRegistry:extensionRegistry)
                        fooGroup = 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 -> ProtobufUnittest.TestOneof.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestOneof.Builder()
                if let jsonValueFooInt = jsonMap["fooInt"] as? Int {
                    resultDecodedBuilder.fooInt = Int32(jsonValueFooInt)
                } else if let jsonValueFooInt = jsonMap["fooInt"] as? String {
                    resultDecodedBuilder.fooInt = Int32(jsonValueFooInt)!
                }
                if let jsonValueFooString = jsonMap["fooString"] as? String {
                    resultDecodedBuilder.fooString = jsonValueFooString
                }
                if let jsonValueFooMessage = jsonMap["fooMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.fooMessage = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueFooMessage).build()

                }
                if let jsonValueFooGroup = jsonMap["foogroup"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.fooGroup = try ProtobufUnittest.TestOneof.FooGroup.Builder.decodeToBuilder(jsonMap:jsonValueFooGroup).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof.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 ProtobufUnittest.TestOneof.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestOneofBackwardsCompatible : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestOneofBackwardsCompatible.Builder

        public static func == (lhs: ProtobufUnittest.TestOneofBackwardsCompatible, rhs: ProtobufUnittest.TestOneofBackwardsCompatible) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasFooInt == rhs.hasFooInt) && (!lhs.hasFooInt || lhs.fooInt == rhs.fooInt)
            fieldCheck = fieldCheck && (lhs.hasFooString == rhs.hasFooString) && (!lhs.hasFooString || lhs.fooString == rhs.fooString)
            fieldCheck = fieldCheck && (lhs.hasFooMessage == rhs.hasFooMessage) && (!lhs.hasFooMessage || lhs.fooMessage == rhs.fooMessage)
            fieldCheck = fieldCheck && (lhs.hasFooGroup == rhs.hasFooGroup) && (!lhs.hasFooGroup || lhs.fooGroup == rhs.fooGroup)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class FooGroup : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder

            public static func == (lhs: ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup, rhs: ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
                fieldCheck = fieldCheck && (lhs.hasB == rhs.hasB) && (!lhs.hasB || lhs.b == rhs.b)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var a:Int32! = nil
            public fileprivate(set) var hasA:Bool = false

            public fileprivate(set) var b:String! = nil
            public fileprivate(set) var hasB:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasA {
                    try codedOutputStream.writeInt32(fieldNumber: 5, value:a)
                }
                if hasB {
                    try codedOutputStream.writeString(fieldNumber: 6, value:b)
                }
                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 hasA {
                    serialize_size += a.computeInt32Size(fieldNumber: 5)
                }
                if hasB {
                    serialize_size += b.computeStringSize(fieldNumber: 6)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                return ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.classBuilder() as! ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                return classBuilder() as! ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasA {
                    jsonMap["a"] = Int(a)
                }
                if hasB {
                    jsonMap["b"] = b
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
                return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
                return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasA {
                    output += "\(indent) a: \(String(describing: a)) \n"
                }
                if hasB {
                    output += "\(indent) b: \(String(describing: b)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasA {
                        hashCode = (hashCode &* 31) &+ a.hashValue
                    }
                    if hasB {
                        hashCode = (hashCode &* 31) &+ b.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var a:Int32 {
                    get {
                        return builderResult.a
                    }
                    set (value) {
                        builderResult.hasA = true
                        builderResult.a = value
                    }
                }
                public var hasA:Bool {
                    get {
                        return builderResult.hasA
                    }
                }
                @discardableResult
                public func setA(_ value:Int32) -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                    self.a = value
                    return self
                }
                @discardableResult
                public func clearA() -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder{
                    builderResult.hasA = false
                    builderResult.a = nil
                    return self
                }
                public var b:String {
                    get {
                        return builderResult.b
                    }
                    set (value) {
                        builderResult.hasB = true
                        builderResult.b = value
                    }
                }
                public var hasB:Bool {
                    get {
                        return builderResult.hasB
                    }
                }
                @discardableResult
                public func setB(_ value:String) -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                    self.b = value
                    return self
                }
                @discardableResult
                public func clearB() -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder{
                    builderResult.hasB = false
                    builderResult.b = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                    builderResult = ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                    return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
                    let returnMe:ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                    if other == ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup() {
                        return self
                    }
                    if other.hasA {
                        a = other.a
                    }
                    if other.hasB {
                        b = other.b
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.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 40:
                            a = try codedInputStream.readInt32()

                        case 50:
                            b = try codedInputStream.readString()

                        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 -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder()
                    if let jsonValueA = jsonMap["a"] as? Int {
                        resultDecodedBuilder.a = Int32(jsonValueA)
                    } else if let jsonValueA = jsonMap["a"] as? String {
                        resultDecodedBuilder.a = Int32(jsonValueA)!
                    }
                    if let jsonValueB = jsonMap["b"] as? String {
                        resultDecodedBuilder.b = jsonValueB
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.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 ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end

        public fileprivate(set) var fooInt:Int32! = nil
        public fileprivate(set) var hasFooInt:Bool = false

        public fileprivate(set) var fooString:String! = nil
        public fileprivate(set) var hasFooString:Bool = false

        public fileprivate(set) var fooMessage:ProtobufUnittest.TestAllTypes!
        public fileprivate(set) var hasFooMessage:Bool = false
        public fileprivate(set) var fooGroup:ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup!
        public fileprivate(set) var hasFooGroup:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasFooInt {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:fooInt)
            }
            if hasFooString {
                try codedOutputStream.writeString(fieldNumber: 2, value:fooString)
            }
            if hasFooMessage {
                try codedOutputStream.writeMessage(fieldNumber: 3, value:fooMessage)
            }
            if hasFooGroup {
                try codedOutputStream.writeGroup(fieldNumber: 4, value:fooGroup)
            }
            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 hasFooInt {
                serialize_size += fooInt.computeInt32Size(fieldNumber: 1)
            }
            if hasFooString {
                serialize_size += fooString.computeStringSize(fieldNumber: 2)
            }
            if hasFooMessage {
                if let varSizefooMessage = fooMessage?.computeMessageSize(fieldNumber: 3) {
                    serialize_size += varSizefooMessage
                }
            }
            if hasFooGroup {
                if let varSizefooGroup = fooGroup?.computeGroupSize(fieldNumber: 4) {
                    serialize_size += varSizefooGroup
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
            return ProtobufUnittest.TestOneofBackwardsCompatible.classBuilder() as! ProtobufUnittest.TestOneofBackwardsCompatible.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
            return classBuilder() as! ProtobufUnittest.TestOneofBackwardsCompatible.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestOneofBackwardsCompatible.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestOneofBackwardsCompatible.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
            return try ProtobufUnittest.TestOneofBackwardsCompatible.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestOneofBackwardsCompatible) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
            return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasFooInt {
                jsonMap["fooInt"] = Int(fooInt)
            }
            if hasFooString {
                jsonMap["fooString"] = fooString
            }
            if hasFooMessage {
                jsonMap["fooMessage"] = try fooMessage.encode()
            }
            if hasFooGroup {
                jsonMap["foogroup"] = try fooGroup.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestOneofBackwardsCompatible {
            return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneofBackwardsCompatible {
            return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasFooInt {
                output += "\(indent) fooInt: \(String(describing: fooInt)) \n"
            }
            if hasFooString {
                output += "\(indent) fooString: \(String(describing: fooString)) \n"
            }
            if hasFooMessage {
                output += "\(indent) fooMessage {\n"
                if let outDescFooMessage = fooMessage {
                    output += try outDescFooMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasFooGroup {
                output += "\(indent) fooGroup {\n"
                if let outDescFooGroup = fooGroup {
                    output += try outDescFooGroup.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasFooInt {
                    hashCode = (hashCode &* 31) &+ fooInt.hashValue
                }
                if hasFooString {
                    hashCode = (hashCode &* 31) &+ fooString.hashValue
                }
                if hasFooMessage {
                    if let hashValuefooMessage = fooMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefooMessage
                    }
                }
                if hasFooGroup {
                    if let hashValuefooGroup = fooGroup?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefooGroup
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var fooInt:Int32 {
                get {
                    return builderResult.fooInt
                }
                set (value) {
                    builderResult.hasFooInt = true
                    builderResult.fooInt = value
                }
            }
            public var hasFooInt:Bool {
                get {
                    return builderResult.hasFooInt
                }
            }
            @discardableResult
            public func setFooInt(_ value:Int32) -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                self.fooInt = value
                return self
            }
            @discardableResult
            public func clearFooInt() -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder{
                builderResult.hasFooInt = false
                builderResult.fooInt = nil
                return self
            }
            public var fooString:String {
                get {
                    return builderResult.fooString
                }
                set (value) {
                    builderResult.hasFooString = true
                    builderResult.fooString = value
                }
            }
            public var hasFooString:Bool {
                get {
                    return builderResult.hasFooString
                }
            }
            @discardableResult
            public func setFooString(_ value:String) -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                self.fooString = value
                return self
            }
            @discardableResult
            public func clearFooString() -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder{
                builderResult.hasFooString = false
                builderResult.fooString = nil
                return self
            }
            public var fooMessage:ProtobufUnittest.TestAllTypes! {
                get {
                    if fooMessageBuilder_ != nil {
                        builderResult.fooMessage = fooMessageBuilder_.getMessage()
                    }
                    return builderResult.fooMessage
                }
                set (value) {
                    builderResult.hasFooMessage = value != nil
                    builderResult.fooMessage = value
                }
            }
            public var hasFooMessage:Bool {
                get {
                    return builderResult.hasFooMessage
                }
            }
            fileprivate var fooMessageBuilder_:ProtobufUnittest.TestAllTypes.Builder! {
                didSet {
                    builderResult.hasFooMessage = true
                }
            }
            public func getFooMessageBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
                if fooMessageBuilder_ == nil {
                    fooMessageBuilder_ = ProtobufUnittest.TestAllTypes.Builder()
                    builderResult.fooMessage = fooMessageBuilder_.getMessage()
                    if fooMessage != nil {
                        try! fooMessageBuilder_.mergeFrom(other: fooMessage)
                    }
                }
                return fooMessageBuilder_
            }
            @discardableResult
            public func setFooMessage(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                self.fooMessage = value
                return self
            }
            @discardableResult
            public func mergeFooMessage(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                if builderResult.hasFooMessage {
                    builderResult.fooMessage = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.fooMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.fooMessage = value
                }
                builderResult.hasFooMessage = true
                return self
            }
            @discardableResult
            public func clearFooMessage() -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                fooMessageBuilder_ = nil
                builderResult.hasFooMessage = false
                builderResult.fooMessage = nil
                return self
            }
            public var fooGroup:ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup! {
                get {
                    if fooGroupBuilder_ != nil {
                        builderResult.fooGroup = fooGroupBuilder_.getMessage()
                    }
                    return builderResult.fooGroup
                }
                set (value) {
                    builderResult.hasFooGroup = value != nil
                    builderResult.fooGroup = value
                }
            }
            public var hasFooGroup:Bool {
                get {
                    return builderResult.hasFooGroup
                }
            }
            fileprivate var fooGroupBuilder_:ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder! {
                didSet {
                    builderResult.hasFooGroup = true
                }
            }
            public func getFooGroupBuilder() -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder {
                if fooGroupBuilder_ == nil {
                    fooGroupBuilder_ = ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder()
                    builderResult.fooGroup = fooGroupBuilder_.getMessage()
                    if fooGroup != nil {
                        try! fooGroupBuilder_.mergeFrom(other: fooGroup)
                    }
                }
                return fooGroupBuilder_
            }
            @discardableResult
            public func setFooGroup(_ value:ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup!) -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                self.fooGroup = value
                return self
            }
            @discardableResult
            public func mergeFooGroup(value:ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                if builderResult.hasFooGroup {
                    builderResult.fooGroup = try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.builderWithPrototype(prototype:builderResult.fooGroup).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.fooGroup = value
                }
                builderResult.hasFooGroup = true
                return self
            }
            @discardableResult
            public func clearFooGroup() -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                fooGroupBuilder_ = nil
                builderResult.hasFooGroup = false
                builderResult.fooGroup = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                builderResult = ProtobufUnittest.TestOneofBackwardsCompatible()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                return try ProtobufUnittest.TestOneofBackwardsCompatible.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestOneofBackwardsCompatible {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestOneofBackwardsCompatible {
                let returnMe:ProtobufUnittest.TestOneofBackwardsCompatible = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestOneofBackwardsCompatible) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                if other == ProtobufUnittest.TestOneofBackwardsCompatible() {
                    return self
                }
                if other.hasFooInt {
                    fooInt = other.fooInt
                }
                if other.hasFooString {
                    fooString = other.fooString
                }
                if (other.hasFooMessage) {
                    try mergeFooMessage(value: other.fooMessage)
                }
                if (other.hasFooGroup) {
                    try mergeFooGroup(value: other.fooGroup)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.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:
                        fooInt = try codedInputStream.readInt32()

                    case 18:
                        fooString = try codedInputStream.readString()

                    case 26:
                        let subBuilder:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                        if hasFooMessage {
                            try subBuilder.mergeFrom(other: fooMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        fooMessage = subBuilder.buildPartial()

                    case 35:
                        let subBuilder:ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder = ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder()
                        if hasFooGroup {
                            try subBuilder.mergeFrom(other: fooGroup)
                        }
                        try codedInputStream.readGroup(fieldNumber: 4, builder:subBuilder, extensionRegistry:extensionRegistry)
                        fooGroup = 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 -> ProtobufUnittest.TestOneofBackwardsCompatible.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestOneofBackwardsCompatible.Builder()
                if let jsonValueFooInt = jsonMap["fooInt"] as? Int {
                    resultDecodedBuilder.fooInt = Int32(jsonValueFooInt)
                } else if let jsonValueFooInt = jsonMap["fooInt"] as? String {
                    resultDecodedBuilder.fooInt = Int32(jsonValueFooInt)!
                }
                if let jsonValueFooString = jsonMap["fooString"] as? String {
                    resultDecodedBuilder.fooString = jsonValueFooString
                }
                if let jsonValueFooMessage = jsonMap["fooMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.fooMessage = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueFooMessage).build()

                }
                if let jsonValueFooGroup = jsonMap["foogroup"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.fooGroup = try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder.decodeToBuilder(jsonMap:jsonValueFooGroup).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.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 ProtobufUnittest.TestOneofBackwardsCompatible.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestOneof2 : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestOneof2.Builder

        public static func == (lhs: ProtobufUnittest.TestOneof2, rhs: ProtobufUnittest.TestOneof2) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasFooInt == rhs.hasFooInt) && (!lhs.hasFooInt || lhs.fooInt == rhs.fooInt)
            fieldCheck = fieldCheck && (lhs.hasFooString == rhs.hasFooString) && (!lhs.hasFooString || lhs.fooString == rhs.fooString)
            fieldCheck = fieldCheck && (lhs.hasFooCord == rhs.hasFooCord) && (!lhs.hasFooCord || lhs.fooCord == rhs.fooCord)
            fieldCheck = fieldCheck && (lhs.hasFooStringPiece == rhs.hasFooStringPiece) && (!lhs.hasFooStringPiece || lhs.fooStringPiece == rhs.fooStringPiece)
            fieldCheck = fieldCheck && (lhs.hasFooBytes == rhs.hasFooBytes) && (!lhs.hasFooBytes || lhs.fooBytes == rhs.fooBytes)
            fieldCheck = fieldCheck && (lhs.hasFooEnum == rhs.hasFooEnum) && (!lhs.hasFooEnum || lhs.fooEnum == rhs.fooEnum)
            fieldCheck = fieldCheck && (lhs.hasFooMessage == rhs.hasFooMessage) && (!lhs.hasFooMessage || lhs.fooMessage == rhs.fooMessage)
            fieldCheck = fieldCheck && (lhs.hasFooGroup == rhs.hasFooGroup) && (!lhs.hasFooGroup || lhs.fooGroup == rhs.fooGroup)
            fieldCheck = fieldCheck && (lhs.hasFooLazyMessage == rhs.hasFooLazyMessage) && (!lhs.hasFooLazyMessage || lhs.fooLazyMessage == rhs.fooLazyMessage)
            fieldCheck = fieldCheck && (lhs.hasBarInt == rhs.hasBarInt) && (!lhs.hasBarInt || lhs.barInt == rhs.barInt)
            fieldCheck = fieldCheck && (lhs.hasBarString == rhs.hasBarString) && (!lhs.hasBarString || lhs.barString == rhs.barString)
            fieldCheck = fieldCheck && (lhs.hasBarCord == rhs.hasBarCord) && (!lhs.hasBarCord || lhs.barCord == rhs.barCord)
            fieldCheck = fieldCheck && (lhs.hasBarStringPiece == rhs.hasBarStringPiece) && (!lhs.hasBarStringPiece || lhs.barStringPiece == rhs.barStringPiece)
            fieldCheck = fieldCheck && (lhs.hasBarBytes == rhs.hasBarBytes) && (!lhs.hasBarBytes || lhs.barBytes == rhs.barBytes)
            fieldCheck = fieldCheck && (lhs.hasBarEnum == rhs.hasBarEnum) && (!lhs.hasBarEnum || lhs.barEnum == rhs.barEnum)
            fieldCheck = fieldCheck && (lhs.hasBazInt == rhs.hasBazInt) && (!lhs.hasBazInt || lhs.bazInt == rhs.bazInt)
            fieldCheck = fieldCheck && (lhs.hasBazString == rhs.hasBazString) && (!lhs.hasBazString || lhs.bazString == rhs.bazString)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class FooGroup : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestOneof2.FooGroup.Builder

            public static func == (lhs: ProtobufUnittest.TestOneof2.FooGroup, rhs: ProtobufUnittest.TestOneof2.FooGroup) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
                fieldCheck = fieldCheck && (lhs.hasB == rhs.hasB) && (!lhs.hasB || lhs.b == rhs.b)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var a:Int32! = nil
            public fileprivate(set) var hasA:Bool = false

            public fileprivate(set) var b:String! = nil
            public fileprivate(set) var hasB:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasA {
                    try codedOutputStream.writeInt32(fieldNumber: 9, value:a)
                }
                if hasB {
                    try codedOutputStream.writeString(fieldNumber: 10, value:b)
                }
                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 hasA {
                    serialize_size += a.computeInt32Size(fieldNumber: 9)
                }
                if hasB {
                    serialize_size += b.computeStringSize(fieldNumber: 10)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                return ProtobufUnittest.TestOneof2.FooGroup.classBuilder() as! ProtobufUnittest.TestOneof2.FooGroup.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                return classBuilder() as! ProtobufUnittest.TestOneof2.FooGroup.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestOneof2.FooGroup.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestOneof2.FooGroup.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                return try ProtobufUnittest.TestOneof2.FooGroup.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestOneof2.FooGroup) throws -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                return try ProtobufUnittest.TestOneof2.FooGroup.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasA {
                    jsonMap["a"] = Int(a)
                }
                if hasB {
                    jsonMap["b"] = b
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestOneof2.FooGroup {
                return try ProtobufUnittest.TestOneof2.FooGroup.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof2.FooGroup {
                return try ProtobufUnittest.TestOneof2.FooGroup.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasA {
                    output += "\(indent) a: \(String(describing: a)) \n"
                }
                if hasB {
                    output += "\(indent) b: \(String(describing: b)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasA {
                        hashCode = (hashCode &* 31) &+ a.hashValue
                    }
                    if hasB {
                        hashCode = (hashCode &* 31) &+ b.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var a:Int32 {
                    get {
                        return builderResult.a
                    }
                    set (value) {
                        builderResult.hasA = true
                        builderResult.a = value
                    }
                }
                public var hasA:Bool {
                    get {
                        return builderResult.hasA
                    }
                }
                @discardableResult
                public func setA(_ value:Int32) -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                    self.a = value
                    return self
                }
                @discardableResult
                public func clearA() -> ProtobufUnittest.TestOneof2.FooGroup.Builder{
                    builderResult.hasA = false
                    builderResult.a = nil
                    return self
                }
                public var b:String {
                    get {
                        return builderResult.b
                    }
                    set (value) {
                        builderResult.hasB = true
                        builderResult.b = value
                    }
                }
                public var hasB:Bool {
                    get {
                        return builderResult.hasB
                    }
                }
                @discardableResult
                public func setB(_ value:String) -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                    self.b = value
                    return self
                }
                @discardableResult
                public func clearB() -> ProtobufUnittest.TestOneof2.FooGroup.Builder{
                    builderResult.hasB = false
                    builderResult.b = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                    builderResult = ProtobufUnittest.TestOneof2.FooGroup()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                    return try ProtobufUnittest.TestOneof2.FooGroup.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestOneof2.FooGroup {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestOneof2.FooGroup {
                    let returnMe:ProtobufUnittest.TestOneof2.FooGroup = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestOneof2.FooGroup) throws -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                    if other == ProtobufUnittest.TestOneof2.FooGroup() {
                        return self
                    }
                    if other.hasA {
                        a = other.a
                    }
                    if other.hasB {
                        b = other.b
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2.FooGroup.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 72:
                            a = try codedInputStream.readInt32()

                        case 82:
                            b = try codedInputStream.readString()

                        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 -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestOneof2.FooGroup.Builder()
                    if let jsonValueA = jsonMap["a"] as? Int {
                        resultDecodedBuilder.a = Int32(jsonValueA)
                    } else if let jsonValueA = jsonMap["a"] as? String {
                        resultDecodedBuilder.a = Int32(jsonValueA)!
                    }
                    if let jsonValueB = jsonMap["b"] as? String {
                        resultDecodedBuilder.b = jsonValueB
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof2.FooGroup.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 ProtobufUnittest.TestOneof2.FooGroup.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //Nested type declaration start

        final public class NestedMessage : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestOneof2.NestedMessage.Builder

            public static func == (lhs: ProtobufUnittest.TestOneof2.NestedMessage, rhs: ProtobufUnittest.TestOneof2.NestedMessage) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasQuxInt == rhs.hasQuxInt) && (!lhs.hasQuxInt || lhs.quxInt == rhs.quxInt)
                fieldCheck = fieldCheck && (lhs.corgeInt == rhs.corgeInt)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var quxInt:Int64! = nil
            public fileprivate(set) var hasQuxInt:Bool = false

            public fileprivate(set) var corgeInt:Array<Int32> = Array<Int32>()
            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasQuxInt {
                    try codedOutputStream.writeInt64(fieldNumber: 1, value:quxInt)
                }
                if !corgeInt.isEmpty {
                    for oneValuecorgeInt in corgeInt {
                        try codedOutputStream.writeInt32(fieldNumber: 2, value:oneValuecorgeInt)
                    }
                }
                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 hasQuxInt {
                    serialize_size += quxInt.computeInt64Size(fieldNumber: 1)
                }
                var dataSizeCorgeInt:Int32 = 0
                for oneValuecorgeInt in corgeInt {
                    dataSizeCorgeInt += oneValuecorgeInt.computeInt32SizeNoTag()
                }
                serialize_size += dataSizeCorgeInt
                serialize_size += 1 * Int32(corgeInt.count)
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                return ProtobufUnittest.TestOneof2.NestedMessage.classBuilder() as! ProtobufUnittest.TestOneof2.NestedMessage.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                return classBuilder() as! ProtobufUnittest.TestOneof2.NestedMessage.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestOneof2.NestedMessage.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestOneof2.NestedMessage.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                return try ProtobufUnittest.TestOneof2.NestedMessage.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestOneof2.NestedMessage) throws -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                return try ProtobufUnittest.TestOneof2.NestedMessage.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasQuxInt {
                    jsonMap["quxInt"] = "\(quxInt!)"
                }
                if !corgeInt.isEmpty {
                    var jsonArrayCorgeInt:Array<Int> = []
                    for oneValueCorgeInt in corgeInt {
                        jsonArrayCorgeInt.append(Int(oneValueCorgeInt))
                    }
                    jsonMap["corgeInt"] = jsonArrayCorgeInt
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestOneof2.NestedMessage {
                return try ProtobufUnittest.TestOneof2.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof2.NestedMessage {
                return try ProtobufUnittest.TestOneof2.NestedMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasQuxInt {
                    output += "\(indent) quxInt: \(String(describing: quxInt)) \n"
                }
                var corgeIntElementIndex:Int = 0
                for oneValueCorgeInt in corgeInt  {
                    output += "\(indent) corgeInt[\(corgeIntElementIndex)]: \(oneValueCorgeInt)\n"
                    corgeIntElementIndex += 1
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasQuxInt {
                        hashCode = (hashCode &* 31) &+ quxInt.hashValue
                    }
                    for oneValueCorgeInt in corgeInt {
                        hashCode = (hashCode &* 31) &+ oneValueCorgeInt.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var quxInt:Int64 {
                    get {
                        return builderResult.quxInt
                    }
                    set (value) {
                        builderResult.hasQuxInt = true
                        builderResult.quxInt = value
                    }
                }
                public var hasQuxInt:Bool {
                    get {
                        return builderResult.hasQuxInt
                    }
                }
                @discardableResult
                public func setQuxInt(_ value:Int64) -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                    self.quxInt = value
                    return self
                }
                @discardableResult
                public func clearQuxInt() -> ProtobufUnittest.TestOneof2.NestedMessage.Builder{
                    builderResult.hasQuxInt = false
                    builderResult.quxInt = nil
                    return self
                }
                public var corgeInt:Array<Int32> {
                    get {
                        return builderResult.corgeInt
                    }
                    set (array) {
                        builderResult.corgeInt = array
                    }
                }
                @discardableResult
                public func setCorgeInt(_ value:Array<Int32>) -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                    self.corgeInt = value
                    return self
                }
                @discardableResult
                public func clearCorgeInt() -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                    builderResult.corgeInt.removeAll(keepingCapacity: false)
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                    builderResult = ProtobufUnittest.TestOneof2.NestedMessage()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                    return try ProtobufUnittest.TestOneof2.NestedMessage.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestOneof2.NestedMessage {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestOneof2.NestedMessage {
                    let returnMe:ProtobufUnittest.TestOneof2.NestedMessage = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestOneof2.NestedMessage) throws -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                    if other == ProtobufUnittest.TestOneof2.NestedMessage() {
                        return self
                    }
                    if other.hasQuxInt {
                        quxInt = other.quxInt
                    }
                    if !other.corgeInt.isEmpty {
                        builderResult.corgeInt += other.corgeInt
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2.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:
                            quxInt = try codedInputStream.readInt64()

                        case 16:
                            corgeInt += [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 -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestOneof2.NestedMessage.Builder()
                    if let jsonValueQuxInt = jsonMap["quxInt"] as? String {
                        resultDecodedBuilder.quxInt = Int64(jsonValueQuxInt)!
                    } else if let jsonValueQuxInt = jsonMap["quxInt"] as? Int {
                        resultDecodedBuilder.quxInt = Int64(jsonValueQuxInt)
                    }
                    if let jsonValueCorgeInt = jsonMap["corgeInt"] as? Array<Int> {
                        var jsonArrayCorgeInt:Array<Int32> = []
                        for oneValueCorgeInt in jsonValueCorgeInt {
                            jsonArrayCorgeInt.append(Int32(oneValueCorgeInt))
                        }
                        resultDecodedBuilder.corgeInt = jsonArrayCorgeInt
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof2.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 ProtobufUnittest.TestOneof2.NestedMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //OneOf declaration start

        public enum Foo {
            case oneOfFooNotSet

            public func checkOneOfIsSet() -> Bool {
                switch self {
                case .oneOfFooNotSet: return false
                default: return true
                }
            }
            case fooInt(Int32)

            public static func getFooInt(_ value:Foo) -> Int32? {
                switch value {
                case .fooInt(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getFooInt() -> Int32? {
                switch self {
                case .fooInt(let otherValue): return otherValue
                default: return nil
                }
            }
            case fooString(String)

            public static func getFooString(_ value:Foo) -> String? {
                switch value {
                case .fooString(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getFooString() -> String? {
                switch self {
                case .fooString(let otherValue): return otherValue
                default: return nil
                }
            }
            case fooCord(String)

            public static func getFooCord(_ value:Foo) -> String? {
                switch value {
                case .fooCord(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getFooCord() -> String? {
                switch self {
                case .fooCord(let otherValue): return otherValue
                default: return nil
                }
            }
            case fooStringPiece(String)

            public static func getFooStringPiece(_ value:Foo) -> String? {
                switch value {
                case .fooStringPiece(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getFooStringPiece() -> String? {
                switch self {
                case .fooStringPiece(let otherValue): return otherValue
                default: return nil
                }
            }
            case fooBytes(Data)

            public static func getFooBytes(_ value:Foo) -> Data? {
                switch value {
                case .fooBytes(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getFooBytes() -> Data? {
                switch self {
                case .fooBytes(let otherValue): return otherValue
                default: return nil
                }
            }
            case fooEnum(ProtobufUnittest.TestOneof2.NestedEnum)

            public static func getFooEnum(_ value:Foo) -> ProtobufUnittest.TestOneof2.NestedEnum? {
                switch value {
                case .fooEnum(let enumValue): return enumValue
                default: return nil
                }
            }
            public func getFooEnum() -> ProtobufUnittest.TestOneof2.NestedEnum? {
                switch self {
                case .fooEnum(let enumValue): return enumValue
                default: return nil
                }
            }
            case fooMessage(ProtobufUnittest.TestOneof2.NestedMessage)

            public static func getFooMessage(_ value:Foo) -> ProtobufUnittest.TestOneof2.NestedMessage? {
                switch value {
                case .fooMessage(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getFooMessage() -> ProtobufUnittest.TestOneof2.NestedMessage? {
                switch self {
                case .fooMessage(let messageValue): return messageValue
                default: return nil
                }
            }
            case fooGroup(ProtobufUnittest.TestOneof2.FooGroup)

            public static func getFooGroup(_ value:Foo) -> ProtobufUnittest.TestOneof2.FooGroup? {
                switch value {
                case .fooGroup(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getFooGroup() -> ProtobufUnittest.TestOneof2.FooGroup? {
                switch self {
                case .fooGroup(let messageValue): return messageValue
                default: return nil
                }
            }
            case fooLazyMessage(ProtobufUnittest.TestOneof2.NestedMessage)

            public static func getFooLazyMessage(_ value:Foo) -> ProtobufUnittest.TestOneof2.NestedMessage? {
                switch value {
                case .fooLazyMessage(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getFooLazyMessage() -> ProtobufUnittest.TestOneof2.NestedMessage? {
                switch self {
                case .fooLazyMessage(let messageValue): return messageValue
                default: return nil
                }
            }
        }
        //OneOf declaration end

        fileprivate var storageFoo:TestOneof2.Foo =  TestOneof2.Foo.oneOfFooNotSet
        public func getOneOfFoo() ->  TestOneof2.Foo {
            let copyObjectFoo = storageFoo
            return copyObjectFoo
        }


        //OneOf declaration start

        public enum Bar {
            case oneOfBarNotSet

            public func checkOneOfIsSet() -> Bool {
                switch self {
                case .oneOfBarNotSet: return false
                default: return true
                }
            }
            case barInt(Int32)

            public static func getBarInt(_ value:Bar) -> Int32? {
                switch value {
                case .barInt(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getBarInt() -> Int32? {
                switch self {
                case .barInt(let otherValue): return otherValue
                default: return nil
                }
            }
            case barString(String)

            public static func getBarString(_ value:Bar) -> String? {
                switch value {
                case .barString(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getBarString() -> String? {
                switch self {
                case .barString(let otherValue): return otherValue
                default: return nil
                }
            }
            case barCord(String)

            public static func getBarCord(_ value:Bar) -> String? {
                switch value {
                case .barCord(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getBarCord() -> String? {
                switch self {
                case .barCord(let otherValue): return otherValue
                default: return nil
                }
            }
            case barStringPiece(String)

            public static func getBarStringPiece(_ value:Bar) -> String? {
                switch value {
                case .barStringPiece(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getBarStringPiece() -> String? {
                switch self {
                case .barStringPiece(let otherValue): return otherValue
                default: return nil
                }
            }
            case barBytes(Data)

            public static func getBarBytes(_ value:Bar) -> Data? {
                switch value {
                case .barBytes(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getBarBytes() -> Data? {
                switch self {
                case .barBytes(let otherValue): return otherValue
                default: return nil
                }
            }
            case barEnum(ProtobufUnittest.TestOneof2.NestedEnum)

            public static func getBarEnum(_ value:Bar) -> ProtobufUnittest.TestOneof2.NestedEnum? {
                switch value {
                case .barEnum(let enumValue): return enumValue
                default: return nil
                }
            }
            public func getBarEnum() -> ProtobufUnittest.TestOneof2.NestedEnum? {
                switch self {
                case .barEnum(let enumValue): return enumValue
                default: return nil
                }
            }
        }
        //OneOf declaration end

        fileprivate var storageBar:TestOneof2.Bar =  TestOneof2.Bar.oneOfBarNotSet
        public func getOneOfBar() ->  TestOneof2.Bar {
            let copyObjectBar = storageBar
            return copyObjectBar
        }


            //Enum type declaration start 

            public enum NestedEnum:Int32, GeneratedEnum {
                case foo = 1
                case bar = 2
                case baz = 3
                public func toString() -> String {
                    switch self {
                    case .foo: return "FOO"
                    case .bar: return "BAR"
                    case .baz: return "BAZ"
                    }
                }
                public static func fromString(_ str:String) throws -> ProtobufUnittest.TestOneof2.NestedEnum {
                    switch str {
                    case "FOO":    return .foo
                    case "BAR":    return .bar
                    case "BAZ":    return .baz
                    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 .foo: return ".foo"
                    case .bar: return ".bar"
                    case .baz: return ".baz"
                    }
                }
                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 

        public fileprivate(set) var fooInt:Int32!{
            get {
                return TestOneof2.Foo.getFooInt(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof2.Foo.fooInt(newvalue)
            }
        }
        public fileprivate(set) var hasFooInt:Bool {
            get {
                return TestOneof2.Foo.getFooInt(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooString:String!{
            get {
                return TestOneof2.Foo.getFooString(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof2.Foo.fooString(newvalue)
            }
        }
        public fileprivate(set) var hasFooString:Bool {
            get {
                return TestOneof2.Foo.getFooString(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooCord:String!{
            get {
                return TestOneof2.Foo.getFooCord(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof2.Foo.fooCord(newvalue)
            }
        }
        public fileprivate(set) var hasFooCord:Bool {
            get {
                return TestOneof2.Foo.getFooCord(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooStringPiece:String!{
            get {
                return TestOneof2.Foo.getFooStringPiece(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof2.Foo.fooStringPiece(newvalue)
            }
        }
        public fileprivate(set) var hasFooStringPiece:Bool {
            get {
                return TestOneof2.Foo.getFooStringPiece(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooBytes:Data!{
            get {
                return TestOneof2.Foo.getFooBytes(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof2.Foo.fooBytes(newvalue)
            }
        }
        public fileprivate(set) var hasFooBytes:Bool {
            get {
                return TestOneof2.Foo.getFooBytes(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooEnum:ProtobufUnittest.TestOneof2.NestedEnum!{
            get {
                return TestOneof2.Foo.getFooEnum(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof2.Foo.fooEnum(newvalue)
            }
        }
        public fileprivate(set) var hasFooEnum:Bool {
            get {
                return TestOneof2.Foo.getFooEnum(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooMessage:ProtobufUnittest.TestOneof2.NestedMessage!{
            get {
                return TestOneof2.Foo.getFooMessage(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof2.Foo.fooMessage(newvalue)
            }
        }
        public fileprivate(set) var hasFooMessage:Bool {
            get {
                return TestOneof2.Foo.getFooMessage(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooGroup:ProtobufUnittest.TestOneof2.FooGroup!{
            get {
                return TestOneof2.Foo.getFooGroup(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof2.Foo.fooGroup(newvalue)
            }
        }
        public fileprivate(set) var hasFooGroup:Bool {
            get {
                return TestOneof2.Foo.getFooGroup(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooLazyMessage:ProtobufUnittest.TestOneof2.NestedMessage!{
            get {
                return TestOneof2.Foo.getFooLazyMessage(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestOneof2.Foo.fooLazyMessage(newvalue)
            }
        }
        public fileprivate(set) var hasFooLazyMessage:Bool {
            get {
                return TestOneof2.Foo.getFooLazyMessage(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var barInt:Int32!{
            get {
                return TestOneof2.Bar.getBarInt(storageBar)
            }
            set (newvalue) {
                storageBar = TestOneof2.Bar.barInt(newvalue)
            }
        }
        public fileprivate(set) var hasBarInt:Bool {
            get {
                return TestOneof2.Bar.getBarInt(storageBar) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var barString:String!{
            get {
                return TestOneof2.Bar.getBarString(storageBar)
            }
            set (newvalue) {
                storageBar = TestOneof2.Bar.barString(newvalue)
            }
        }
        public fileprivate(set) var hasBarString:Bool {
            get {
                return TestOneof2.Bar.getBarString(storageBar) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var barCord:String!{
            get {
                return TestOneof2.Bar.getBarCord(storageBar)
            }
            set (newvalue) {
                storageBar = TestOneof2.Bar.barCord(newvalue)
            }
        }
        public fileprivate(set) var hasBarCord:Bool {
            get {
                return TestOneof2.Bar.getBarCord(storageBar) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var barStringPiece:String!{
            get {
                return TestOneof2.Bar.getBarStringPiece(storageBar)
            }
            set (newvalue) {
                storageBar = TestOneof2.Bar.barStringPiece(newvalue)
            }
        }
        public fileprivate(set) var hasBarStringPiece:Bool {
            get {
                return TestOneof2.Bar.getBarStringPiece(storageBar) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var barBytes:Data!{
            get {
                return TestOneof2.Bar.getBarBytes(storageBar)
            }
            set (newvalue) {
                storageBar = TestOneof2.Bar.barBytes(newvalue)
            }
        }
        public fileprivate(set) var hasBarBytes:Bool {
            get {
                return TestOneof2.Bar.getBarBytes(storageBar) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var barEnum:ProtobufUnittest.TestOneof2.NestedEnum!{
            get {
                return TestOneof2.Bar.getBarEnum(storageBar)
            }
            set (newvalue) {
                storageBar = TestOneof2.Bar.barEnum(newvalue)
            }
        }
        public fileprivate(set) var hasBarEnum:Bool {
            get {
                return TestOneof2.Bar.getBarEnum(storageBar) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var bazInt:Int32! = nil
        public fileprivate(set) var hasBazInt:Bool = false

        public fileprivate(set) var bazString:String! = "BAZ"
        public fileprivate(set) var hasBazString:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasFooInt {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:fooInt)
            }
            if hasFooString {
                try codedOutputStream.writeString(fieldNumber: 2, value:fooString)
            }
            if hasFooCord {
                try codedOutputStream.writeString(fieldNumber: 3, value:fooCord)
            }
            if hasFooStringPiece {
                try codedOutputStream.writeString(fieldNumber: 4, value:fooStringPiece)
            }
            if hasFooBytes {
                try codedOutputStream.writeData(fieldNumber: 5, value:fooBytes)
            }
            if hasFooEnum {
                try codedOutputStream.writeEnum(fieldNumber: 6, value:fooEnum.rawValue)
            }
            if hasFooMessage {
                try codedOutputStream.writeMessage(fieldNumber: 7, value:fooMessage)
            }
            if hasFooGroup {
                try codedOutputStream.writeGroup(fieldNumber: 8, value:fooGroup)
            }
            if hasFooLazyMessage {
                try codedOutputStream.writeMessage(fieldNumber: 11, value:fooLazyMessage)
            }
            if hasBarInt {
                try codedOutputStream.writeInt32(fieldNumber: 12, value:barInt)
            }
            if hasBarString {
                try codedOutputStream.writeString(fieldNumber: 13, value:barString)
            }
            if hasBarCord {
                try codedOutputStream.writeString(fieldNumber: 14, value:barCord)
            }
            if hasBarStringPiece {
                try codedOutputStream.writeString(fieldNumber: 15, value:barStringPiece)
            }
            if hasBarBytes {
                try codedOutputStream.writeData(fieldNumber: 16, value:barBytes)
            }
            if hasBarEnum {
                try codedOutputStream.writeEnum(fieldNumber: 17, value:barEnum.rawValue)
            }
            if hasBazInt {
                try codedOutputStream.writeInt32(fieldNumber: 18, value:bazInt)
            }
            if hasBazString {
                try codedOutputStream.writeString(fieldNumber: 19, value:bazString)
            }
            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 hasFooInt {
                serialize_size += fooInt.computeInt32Size(fieldNumber: 1)
            }
            if hasFooString {
                serialize_size += fooString.computeStringSize(fieldNumber: 2)
            }
            if hasFooCord {
                serialize_size += fooCord.computeStringSize(fieldNumber: 3)
            }
            if hasFooStringPiece {
                serialize_size += fooStringPiece.computeStringSize(fieldNumber: 4)
            }
            if hasFooBytes {
                serialize_size += fooBytes.computeDataSize(fieldNumber: 5)
            }
            if (hasFooEnum) {
                serialize_size += fooEnum.rawValue.computeEnumSize(fieldNumber: 6)
            }
            if hasFooMessage {
                if let varSizefooMessage = fooMessage?.computeMessageSize(fieldNumber: 7) {
                    serialize_size += varSizefooMessage
                }
            }
            if hasFooGroup {
                if let varSizefooGroup = fooGroup?.computeGroupSize(fieldNumber: 8) {
                    serialize_size += varSizefooGroup
                }
            }
            if hasFooLazyMessage {
                if let varSizefooLazyMessage = fooLazyMessage?.computeMessageSize(fieldNumber: 11) {
                    serialize_size += varSizefooLazyMessage
                }
            }
            if hasBarInt {
                serialize_size += barInt.computeInt32Size(fieldNumber: 12)
            }
            if hasBarString {
                serialize_size += barString.computeStringSize(fieldNumber: 13)
            }
            if hasBarCord {
                serialize_size += barCord.computeStringSize(fieldNumber: 14)
            }
            if hasBarStringPiece {
                serialize_size += barStringPiece.computeStringSize(fieldNumber: 15)
            }
            if hasBarBytes {
                serialize_size += barBytes.computeDataSize(fieldNumber: 16)
            }
            if (hasBarEnum) {
                serialize_size += barEnum.rawValue.computeEnumSize(fieldNumber: 17)
            }
            if hasBazInt {
                serialize_size += bazInt.computeInt32Size(fieldNumber: 18)
            }
            if hasBazString {
                serialize_size += bazString.computeStringSize(fieldNumber: 19)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestOneof2.Builder {
            return ProtobufUnittest.TestOneof2.classBuilder() as! ProtobufUnittest.TestOneof2.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestOneof2.Builder {
            return classBuilder() as! ProtobufUnittest.TestOneof2.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestOneof2.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestOneof2.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestOneof2.Builder {
            return try ProtobufUnittest.TestOneof2.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestOneof2) throws -> ProtobufUnittest.TestOneof2.Builder {
            return try ProtobufUnittest.TestOneof2.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasFooInt {
                jsonMap["fooInt"] = Int(fooInt)
            }
            if hasFooString {
                jsonMap["fooString"] = fooString
            }
            if hasFooCord {
                jsonMap["fooCord"] = fooCord
            }
            if hasFooStringPiece {
                jsonMap["fooStringPiece"] = fooStringPiece
            }
            if hasFooBytes {
                jsonMap["fooBytes"] = fooBytes.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
            }
            if hasFooEnum {
                jsonMap["fooEnum"] = fooEnum.toString()
            }
            if hasFooMessage {
                jsonMap["fooMessage"] = try fooMessage.encode()
            }
            if hasFooGroup {
                jsonMap["foogroup"] = try fooGroup.encode()
            }
            if hasFooLazyMessage {
                jsonMap["fooLazyMessage"] = try fooLazyMessage.encode()
            }
            if hasBarInt {
                jsonMap["barInt"] = Int(barInt)
            }
            if hasBarString {
                jsonMap["barString"] = barString
            }
            if hasBarCord {
                jsonMap["barCord"] = barCord
            }
            if hasBarStringPiece {
                jsonMap["barStringPiece"] = barStringPiece
            }
            if hasBarBytes {
                jsonMap["barBytes"] = barBytes.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
            }
            if hasBarEnum {
                jsonMap["barEnum"] = barEnum.toString()
            }
            if hasBazInt {
                jsonMap["bazInt"] = Int(bazInt)
            }
            if hasBazString {
                jsonMap["bazString"] = bazString
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestOneof2 {
            return try ProtobufUnittest.TestOneof2.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof2 {
            return try ProtobufUnittest.TestOneof2.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasFooInt {
                output += "\(indent) fooInt: \(String(describing: fooInt)) \n"
            }
            if hasFooString {
                output += "\(indent) fooString: \(String(describing: fooString)) \n"
            }
            if hasFooCord {
                output += "\(indent) fooCord: \(String(describing: fooCord)) \n"
            }
            if hasFooStringPiece {
                output += "\(indent) fooStringPiece: \(String(describing: fooStringPiece)) \n"
            }
            if hasFooBytes {
                output += "\(indent) fooBytes: \(String(describing: fooBytes)) \n"
            }
            if (hasFooEnum) {
                output += "\(indent) fooEnum: \(fooEnum.description)\n"
            }
            if hasFooMessage {
                output += "\(indent) fooMessage {\n"
                if let outDescFooMessage = fooMessage {
                    output += try outDescFooMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasFooGroup {
                output += "\(indent) fooGroup {\n"
                if let outDescFooGroup = fooGroup {
                    output += try outDescFooGroup.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasFooLazyMessage {
                output += "\(indent) fooLazyMessage {\n"
                if let outDescFooLazyMessage = fooLazyMessage {
                    output += try outDescFooLazyMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasBarInt {
                output += "\(indent) barInt: \(String(describing: barInt)) \n"
            }
            if hasBarString {
                output += "\(indent) barString: \(String(describing: barString)) \n"
            }
            if hasBarCord {
                output += "\(indent) barCord: \(String(describing: barCord)) \n"
            }
            if hasBarStringPiece {
                output += "\(indent) barStringPiece: \(String(describing: barStringPiece)) \n"
            }
            if hasBarBytes {
                output += "\(indent) barBytes: \(String(describing: barBytes)) \n"
            }
            if (hasBarEnum) {
                output += "\(indent) barEnum: \(barEnum.description)\n"
            }
            if hasBazInt {
                output += "\(indent) bazInt: \(String(describing: bazInt)) \n"
            }
            if hasBazString {
                output += "\(indent) bazString: \(String(describing: bazString)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasFooInt {
                    hashCode = (hashCode &* 31) &+ fooInt.hashValue
                }
                if hasFooString {
                    hashCode = (hashCode &* 31) &+ fooString.hashValue
                }
                if hasFooCord {
                    hashCode = (hashCode &* 31) &+ fooCord.hashValue
                }
                if hasFooStringPiece {
                    hashCode = (hashCode &* 31) &+ fooStringPiece.hashValue
                }
                if hasFooBytes {
                    hashCode = (hashCode &* 31) &+ fooBytes.hashValue
                }
                if hasFooEnum {
                     hashCode = (hashCode &* 31) &+ fooEnum.hashValue
                }
                if hasFooMessage {
                    if let hashValuefooMessage = fooMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefooMessage
                    }
                }
                if hasFooGroup {
                    if let hashValuefooGroup = fooGroup?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefooGroup
                    }
                }
                if hasFooLazyMessage {
                    if let hashValuefooLazyMessage = fooLazyMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefooLazyMessage
                    }
                }
                if hasBarInt {
                    hashCode = (hashCode &* 31) &+ barInt.hashValue
                }
                if hasBarString {
                    hashCode = (hashCode &* 31) &+ barString.hashValue
                }
                if hasBarCord {
                    hashCode = (hashCode &* 31) &+ barCord.hashValue
                }
                if hasBarStringPiece {
                    hashCode = (hashCode &* 31) &+ barStringPiece.hashValue
                }
                if hasBarBytes {
                    hashCode = (hashCode &* 31) &+ barBytes.hashValue
                }
                if hasBarEnum {
                     hashCode = (hashCode &* 31) &+ barEnum.hashValue
                }
                if hasBazInt {
                    hashCode = (hashCode &* 31) &+ bazInt.hashValue
                }
                if hasBazString {
                    hashCode = (hashCode &* 31) &+ bazString.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public func setFoo(_ oneOf:TestOneof2.Foo) ->  ProtobufUnittest.TestOneof2.Builder {
                builderResult.storageFoo = oneOf
                return self
            }
            public func setBar(_ oneOf:TestOneof2.Bar) ->  ProtobufUnittest.TestOneof2.Builder {
                builderResult.storageBar = oneOf
                return self
            }
            public var fooInt:Int32 {
                get {
                    return builderResult.fooInt
                }
                set (value) {
                    builderResult.hasFooInt = true
                    builderResult.fooInt = value
                }
            }
            public var hasFooInt:Bool {
                get {
                    return builderResult.hasFooInt
                }
            }
            @discardableResult
            public func setFooInt(_ value:Int32) -> ProtobufUnittest.TestOneof2.Builder {
                self.fooInt = value
                return self
            }
            @discardableResult
            public func clearFooInt() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasFooInt = false
                builderResult.fooInt = nil
                return self
            }
            public var fooString:String {
                get {
                    return builderResult.fooString
                }
                set (value) {
                    builderResult.hasFooString = true
                    builderResult.fooString = value
                }
            }
            public var hasFooString:Bool {
                get {
                    return builderResult.hasFooString
                }
            }
            @discardableResult
            public func setFooString(_ value:String) -> ProtobufUnittest.TestOneof2.Builder {
                self.fooString = value
                return self
            }
            @discardableResult
            public func clearFooString() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasFooString = false
                builderResult.fooString = nil
                return self
            }
            public var fooCord:String {
                get {
                    return builderResult.fooCord
                }
                set (value) {
                    builderResult.hasFooCord = true
                    builderResult.fooCord = value
                }
            }
            public var hasFooCord:Bool {
                get {
                    return builderResult.hasFooCord
                }
            }
            @discardableResult
            public func setFooCord(_ value:String) -> ProtobufUnittest.TestOneof2.Builder {
                self.fooCord = value
                return self
            }
            @discardableResult
            public func clearFooCord() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasFooCord = false
                builderResult.fooCord = nil
                return self
            }
            public var fooStringPiece:String {
                get {
                    return builderResult.fooStringPiece
                }
                set (value) {
                    builderResult.hasFooStringPiece = true
                    builderResult.fooStringPiece = value
                }
            }
            public var hasFooStringPiece:Bool {
                get {
                    return builderResult.hasFooStringPiece
                }
            }
            @discardableResult
            public func setFooStringPiece(_ value:String) -> ProtobufUnittest.TestOneof2.Builder {
                self.fooStringPiece = value
                return self
            }
            @discardableResult
            public func clearFooStringPiece() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasFooStringPiece = false
                builderResult.fooStringPiece = nil
                return self
            }
            public var fooBytes:Data {
                get {
                    return builderResult.fooBytes
                }
                set (value) {
                    builderResult.hasFooBytes = true
                    builderResult.fooBytes = value
                }
            }
            public var hasFooBytes:Bool {
                get {
                    return builderResult.hasFooBytes
                }
            }
            @discardableResult
            public func setFooBytes(_ value:Data) -> ProtobufUnittest.TestOneof2.Builder {
                self.fooBytes = value
                return self
            }
            @discardableResult
            public func clearFooBytes() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasFooBytes = false
                builderResult.fooBytes = nil
                return self
            }
                public var fooEnum:ProtobufUnittest.TestOneof2.NestedEnum {
                    get {
                        return builderResult.fooEnum
                    }
                    set (value) {
                        builderResult.hasFooEnum = true
                        builderResult.fooEnum = value
                    }
                }
                public var hasFooEnum:Bool{
                    get {
                        return builderResult.hasFooEnum
                    }
                }
            @discardableResult
                public func setFooEnum(_ value:ProtobufUnittest.TestOneof2.NestedEnum) -> ProtobufUnittest.TestOneof2.Builder {
                  self.fooEnum = value
                  return self
                }
            @discardableResult
                public func clearFooEnum() -> ProtobufUnittest.TestOneof2.Builder {
                   builderResult.hasFooEnum = false
                   builderResult.fooEnum = .foo
                   return self
                }
            public var fooMessage:ProtobufUnittest.TestOneof2.NestedMessage! {
                get {
                    if fooMessageBuilder_ != nil {
                        builderResult.fooMessage = fooMessageBuilder_.getMessage()
                    }
                    return builderResult.fooMessage
                }
                set (value) {
                    builderResult.hasFooMessage = value != nil
                    builderResult.fooMessage = value
                }
            }
            public var hasFooMessage:Bool {
                get {
                    return builderResult.hasFooMessage
                }
            }
            fileprivate var fooMessageBuilder_:ProtobufUnittest.TestOneof2.NestedMessage.Builder! {
                didSet {
                    builderResult.hasFooMessage = true
                }
            }
            public func getFooMessageBuilder() -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                if fooMessageBuilder_ == nil {
                    fooMessageBuilder_ = ProtobufUnittest.TestOneof2.NestedMessage.Builder()
                    builderResult.fooMessage = fooMessageBuilder_.getMessage()
                    if fooMessage != nil {
                        try! fooMessageBuilder_.mergeFrom(other: fooMessage)
                    }
                }
                return fooMessageBuilder_
            }
            @discardableResult
            public func setFooMessage(_ value:ProtobufUnittest.TestOneof2.NestedMessage!) -> ProtobufUnittest.TestOneof2.Builder {
                self.fooMessage = value
                return self
            }
            @discardableResult
            public func mergeFooMessage(value:ProtobufUnittest.TestOneof2.NestedMessage) throws -> ProtobufUnittest.TestOneof2.Builder {
                if builderResult.hasFooMessage {
                    builderResult.fooMessage = try ProtobufUnittest.TestOneof2.NestedMessage.builderWithPrototype(prototype:builderResult.fooMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.fooMessage = value
                }
                builderResult.hasFooMessage = true
                return self
            }
            @discardableResult
            public func clearFooMessage() -> ProtobufUnittest.TestOneof2.Builder {
                fooMessageBuilder_ = nil
                builderResult.hasFooMessage = false
                builderResult.fooMessage = nil
                return self
            }
            public var fooGroup:ProtobufUnittest.TestOneof2.FooGroup! {
                get {
                    if fooGroupBuilder_ != nil {
                        builderResult.fooGroup = fooGroupBuilder_.getMessage()
                    }
                    return builderResult.fooGroup
                }
                set (value) {
                    builderResult.hasFooGroup = value != nil
                    builderResult.fooGroup = value
                }
            }
            public var hasFooGroup:Bool {
                get {
                    return builderResult.hasFooGroup
                }
            }
            fileprivate var fooGroupBuilder_:ProtobufUnittest.TestOneof2.FooGroup.Builder! {
                didSet {
                    builderResult.hasFooGroup = true
                }
            }
            public func getFooGroupBuilder() -> ProtobufUnittest.TestOneof2.FooGroup.Builder {
                if fooGroupBuilder_ == nil {
                    fooGroupBuilder_ = ProtobufUnittest.TestOneof2.FooGroup.Builder()
                    builderResult.fooGroup = fooGroupBuilder_.getMessage()
                    if fooGroup != nil {
                        try! fooGroupBuilder_.mergeFrom(other: fooGroup)
                    }
                }
                return fooGroupBuilder_
            }
            @discardableResult
            public func setFooGroup(_ value:ProtobufUnittest.TestOneof2.FooGroup!) -> ProtobufUnittest.TestOneof2.Builder {
                self.fooGroup = value
                return self
            }
            @discardableResult
            public func mergeFooGroup(value:ProtobufUnittest.TestOneof2.FooGroup) throws -> ProtobufUnittest.TestOneof2.Builder {
                if builderResult.hasFooGroup {
                    builderResult.fooGroup = try ProtobufUnittest.TestOneof2.FooGroup.builderWithPrototype(prototype:builderResult.fooGroup).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.fooGroup = value
                }
                builderResult.hasFooGroup = true
                return self
            }
            @discardableResult
            public func clearFooGroup() -> ProtobufUnittest.TestOneof2.Builder {
                fooGroupBuilder_ = nil
                builderResult.hasFooGroup = false
                builderResult.fooGroup = nil
                return self
            }
            public var fooLazyMessage:ProtobufUnittest.TestOneof2.NestedMessage! {
                get {
                    if fooLazyMessageBuilder_ != nil {
                        builderResult.fooLazyMessage = fooLazyMessageBuilder_.getMessage()
                    }
                    return builderResult.fooLazyMessage
                }
                set (value) {
                    builderResult.hasFooLazyMessage = value != nil
                    builderResult.fooLazyMessage = value
                }
            }
            public var hasFooLazyMessage:Bool {
                get {
                    return builderResult.hasFooLazyMessage
                }
            }
            fileprivate var fooLazyMessageBuilder_:ProtobufUnittest.TestOneof2.NestedMessage.Builder! {
                didSet {
                    builderResult.hasFooLazyMessage = true
                }
            }
            public func getFooLazyMessageBuilder() -> ProtobufUnittest.TestOneof2.NestedMessage.Builder {
                if fooLazyMessageBuilder_ == nil {
                    fooLazyMessageBuilder_ = ProtobufUnittest.TestOneof2.NestedMessage.Builder()
                    builderResult.fooLazyMessage = fooLazyMessageBuilder_.getMessage()
                    if fooLazyMessage != nil {
                        try! fooLazyMessageBuilder_.mergeFrom(other: fooLazyMessage)
                    }
                }
                return fooLazyMessageBuilder_
            }
            @discardableResult
            public func setFooLazyMessage(_ value:ProtobufUnittest.TestOneof2.NestedMessage!) -> ProtobufUnittest.TestOneof2.Builder {
                self.fooLazyMessage = value
                return self
            }
            @discardableResult
            public func mergeFooLazyMessage(value:ProtobufUnittest.TestOneof2.NestedMessage) throws -> ProtobufUnittest.TestOneof2.Builder {
                if builderResult.hasFooLazyMessage {
                    builderResult.fooLazyMessage = try ProtobufUnittest.TestOneof2.NestedMessage.builderWithPrototype(prototype:builderResult.fooLazyMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.fooLazyMessage = value
                }
                builderResult.hasFooLazyMessage = true
                return self
            }
            @discardableResult
            public func clearFooLazyMessage() -> ProtobufUnittest.TestOneof2.Builder {
                fooLazyMessageBuilder_ = nil
                builderResult.hasFooLazyMessage = false
                builderResult.fooLazyMessage = nil
                return self
            }
            public var barInt:Int32 {
                get {
                    return builderResult.barInt
                }
                set (value) {
                    builderResult.hasBarInt = true
                    builderResult.barInt = value
                }
            }
            public var hasBarInt:Bool {
                get {
                    return builderResult.hasBarInt
                }
            }
            @discardableResult
            public func setBarInt(_ value:Int32) -> ProtobufUnittest.TestOneof2.Builder {
                self.barInt = value
                return self
            }
            @discardableResult
            public func clearBarInt() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasBarInt = false
                builderResult.barInt = Int32(5)
                return self
            }
            public var barString:String {
                get {
                    return builderResult.barString
                }
                set (value) {
                    builderResult.hasBarString = true
                    builderResult.barString = value
                }
            }
            public var hasBarString:Bool {
                get {
                    return builderResult.hasBarString
                }
            }
            @discardableResult
            public func setBarString(_ value:String) -> ProtobufUnittest.TestOneof2.Builder {
                self.barString = value
                return self
            }
            @discardableResult
            public func clearBarString() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasBarString = false
                builderResult.barString = "STRING"
                return self
            }
            public var barCord:String {
                get {
                    return builderResult.barCord
                }
                set (value) {
                    builderResult.hasBarCord = true
                    builderResult.barCord = value
                }
            }
            public var hasBarCord:Bool {
                get {
                    return builderResult.hasBarCord
                }
            }
            @discardableResult
            public func setBarCord(_ value:String) -> ProtobufUnittest.TestOneof2.Builder {
                self.barCord = value
                return self
            }
            @discardableResult
            public func clearBarCord() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasBarCord = false
                builderResult.barCord = "CORD"
                return self
            }
            public var barStringPiece:String {
                get {
                    return builderResult.barStringPiece
                }
                set (value) {
                    builderResult.hasBarStringPiece = true
                    builderResult.barStringPiece = value
                }
            }
            public var hasBarStringPiece:Bool {
                get {
                    return builderResult.hasBarStringPiece
                }
            }
            @discardableResult
            public func setBarStringPiece(_ value:String) -> ProtobufUnittest.TestOneof2.Builder {
                self.barStringPiece = value
                return self
            }
            @discardableResult
            public func clearBarStringPiece() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasBarStringPiece = false
                builderResult.barStringPiece = "SPIECE"
                return self
            }
            public var barBytes:Data {
                get {
                    return builderResult.barBytes
                }
                set (value) {
                    builderResult.hasBarBytes = true
                    builderResult.barBytes = value
                }
            }
            public var hasBarBytes:Bool {
                get {
                    return builderResult.hasBarBytes
                }
            }
            @discardableResult
            public func setBarBytes(_ value:Data) -> ProtobufUnittest.TestOneof2.Builder {
                self.barBytes = value
                return self
            }
            @discardableResult
            public func clearBarBytes() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasBarBytes = false
                builderResult.barBytes = Data(bytes:([UInt8]() + "BYTES".utf8), count:5)
                return self
            }
                public var barEnum:ProtobufUnittest.TestOneof2.NestedEnum {
                    get {
                        return builderResult.barEnum
                    }
                    set (value) {
                        builderResult.hasBarEnum = true
                        builderResult.barEnum = value
                    }
                }
                public var hasBarEnum:Bool{
                    get {
                        return builderResult.hasBarEnum
                    }
                }
            @discardableResult
                public func setBarEnum(_ value:ProtobufUnittest.TestOneof2.NestedEnum) -> ProtobufUnittest.TestOneof2.Builder {
                  self.barEnum = value
                  return self
                }
            @discardableResult
                public func clearBarEnum() -> ProtobufUnittest.TestOneof2.Builder {
                   builderResult.hasBarEnum = false
                   builderResult.barEnum = .bar
                   return self
                }
            public var bazInt:Int32 {
                get {
                    return builderResult.bazInt
                }
                set (value) {
                    builderResult.hasBazInt = true
                    builderResult.bazInt = value
                }
            }
            public var hasBazInt:Bool {
                get {
                    return builderResult.hasBazInt
                }
            }
            @discardableResult
            public func setBazInt(_ value:Int32) -> ProtobufUnittest.TestOneof2.Builder {
                self.bazInt = value
                return self
            }
            @discardableResult
            public func clearBazInt() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasBazInt = false
                builderResult.bazInt = nil
                return self
            }
            public var bazString:String {
                get {
                    return builderResult.bazString
                }
                set (value) {
                    builderResult.hasBazString = true
                    builderResult.bazString = value
                }
            }
            public var hasBazString:Bool {
                get {
                    return builderResult.hasBazString
                }
            }
            @discardableResult
            public func setBazString(_ value:String) -> ProtobufUnittest.TestOneof2.Builder {
                self.bazString = value
                return self
            }
            @discardableResult
            public func clearBazString() -> ProtobufUnittest.TestOneof2.Builder{
                builderResult.hasBazString = false
                builderResult.bazString = "BAZ"
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestOneof2.Builder {
                builderResult = ProtobufUnittest.TestOneof2()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestOneof2.Builder {
                return try ProtobufUnittest.TestOneof2.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestOneof2 {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestOneof2 {
                let returnMe:ProtobufUnittest.TestOneof2 = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestOneof2) throws -> ProtobufUnittest.TestOneof2.Builder {
                if other == ProtobufUnittest.TestOneof2() {
                    return self
                }
                if other.hasFooInt {
                    fooInt = other.fooInt
                }
                if other.hasFooString {
                    fooString = other.fooString
                }
                if other.hasFooCord {
                    fooCord = other.fooCord
                }
                if other.hasFooStringPiece {
                    fooStringPiece = other.fooStringPiece
                }
                if other.hasFooBytes {
                    fooBytes = other.fooBytes
                }
                if other.hasFooEnum {
                    fooEnum = other.fooEnum
                }
                if (other.hasFooMessage) {
                    try mergeFooMessage(value: other.fooMessage)
                }
                if (other.hasFooGroup) {
                    try mergeFooGroup(value: other.fooGroup)
                }
                if (other.hasFooLazyMessage) {
                    try mergeFooLazyMessage(value: other.fooLazyMessage)
                }
                if other.hasBarInt {
                    barInt = other.barInt
                }
                if other.hasBarString {
                    barString = other.barString
                }
                if other.hasBarCord {
                    barCord = other.barCord
                }
                if other.hasBarStringPiece {
                    barStringPiece = other.barStringPiece
                }
                if other.hasBarBytes {
                    barBytes = other.barBytes
                }
                if other.hasBarEnum {
                    barEnum = other.barEnum
                }
                if other.hasBazInt {
                    bazInt = other.bazInt
                }
                if other.hasBazString {
                    bazString = other.bazString
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof2.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2.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:
                        fooInt = try codedInputStream.readInt32()

                    case 18:
                        fooString = try codedInputStream.readString()

                    case 26:
                        fooCord = try codedInputStream.readString()

                    case 34:
                        fooStringPiece = try codedInputStream.readString()

                    case 42:
                        fooBytes = try codedInputStream.readData()

                    case 48:
                        let valueIntfooEnum = try codedInputStream.readEnum()
                        if let enumsfooEnum = ProtobufUnittest.TestOneof2.NestedEnum(rawValue:valueIntfooEnum){
                            fooEnum = enumsfooEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 6, value:Int64(valueIntfooEnum))
                        }

                    case 58:
                        let subBuilder:ProtobufUnittest.TestOneof2.NestedMessage.Builder = ProtobufUnittest.TestOneof2.NestedMessage.Builder()
                        if hasFooMessage {
                            try subBuilder.mergeFrom(other: fooMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        fooMessage = subBuilder.buildPartial()

                    case 67:
                        let subBuilder:ProtobufUnittest.TestOneof2.FooGroup.Builder = ProtobufUnittest.TestOneof2.FooGroup.Builder()
                        if hasFooGroup {
                            try subBuilder.mergeFrom(other: fooGroup)
                        }
                        try codedInputStream.readGroup(fieldNumber: 8, builder:subBuilder, extensionRegistry:extensionRegistry)
                        fooGroup = subBuilder.buildPartial()

                    case 90:
                        let subBuilder:ProtobufUnittest.TestOneof2.NestedMessage.Builder = ProtobufUnittest.TestOneof2.NestedMessage.Builder()
                        if hasFooLazyMessage {
                            try subBuilder.mergeFrom(other: fooLazyMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        fooLazyMessage = subBuilder.buildPartial()

                    case 96:
                        barInt = try codedInputStream.readInt32()

                    case 106:
                        barString = try codedInputStream.readString()

                    case 114:
                        barCord = try codedInputStream.readString()

                    case 122:
                        barStringPiece = try codedInputStream.readString()

                    case 130:
                        barBytes = try codedInputStream.readData()

                    case 136:
                        let valueIntbarEnum = try codedInputStream.readEnum()
                        if let enumsbarEnum = ProtobufUnittest.TestOneof2.NestedEnum(rawValue:valueIntbarEnum){
                            barEnum = enumsbarEnum
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 17, value:Int64(valueIntbarEnum))
                        }

                    case 144:
                        bazInt = try codedInputStream.readInt32()

                    case 154:
                        bazString = try codedInputStream.readString()

                    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 -> ProtobufUnittest.TestOneof2.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestOneof2.Builder()
                if let jsonValueFooInt = jsonMap["fooInt"] as? Int {
                    resultDecodedBuilder.fooInt = Int32(jsonValueFooInt)
                } else if let jsonValueFooInt = jsonMap["fooInt"] as? String {
                    resultDecodedBuilder.fooInt = Int32(jsonValueFooInt)!
                }
                if let jsonValueFooString = jsonMap["fooString"] as? String {
                    resultDecodedBuilder.fooString = jsonValueFooString
                }
                if let jsonValueFooCord = jsonMap["fooCord"] as? String {
                    resultDecodedBuilder.fooCord = jsonValueFooCord
                }
                if let jsonValueFooStringPiece = jsonMap["fooStringPiece"] as? String {
                    resultDecodedBuilder.fooStringPiece = jsonValueFooStringPiece
                }
                if let jsonValueFooBytes = jsonMap["fooBytes"] as? String {
                    resultDecodedBuilder.fooBytes = Data(base64Encoded:jsonValueFooBytes, options: Data.Base64DecodingOptions(rawValue:0))!
                }
                if let jsonValueFooEnum = jsonMap["fooEnum"] as? String {
                    resultDecodedBuilder.fooEnum = try ProtobufUnittest.TestOneof2.NestedEnum.fromString(jsonValueFooEnum)
                }
                if let jsonValueFooMessage = jsonMap["fooMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.fooMessage = try ProtobufUnittest.TestOneof2.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonValueFooMessage).build()

                }
                if let jsonValueFooGroup = jsonMap["foogroup"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.fooGroup = try ProtobufUnittest.TestOneof2.FooGroup.Builder.decodeToBuilder(jsonMap:jsonValueFooGroup).build()

                }
                if let jsonValueFooLazyMessage = jsonMap["fooLazyMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.fooLazyMessage = try ProtobufUnittest.TestOneof2.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonValueFooLazyMessage).build()

                }
                if let jsonValueBarInt = jsonMap["barInt"] as? Int {
                    resultDecodedBuilder.barInt = Int32(jsonValueBarInt)
                } else if let jsonValueBarInt = jsonMap["barInt"] as? String {
                    resultDecodedBuilder.barInt = Int32(jsonValueBarInt)!
                }
                if let jsonValueBarString = jsonMap["barString"] as? String {
                    resultDecodedBuilder.barString = jsonValueBarString
                }
                if let jsonValueBarCord = jsonMap["barCord"] as? String {
                    resultDecodedBuilder.barCord = jsonValueBarCord
                }
                if let jsonValueBarStringPiece = jsonMap["barStringPiece"] as? String {
                    resultDecodedBuilder.barStringPiece = jsonValueBarStringPiece
                }
                if let jsonValueBarBytes = jsonMap["barBytes"] as? String {
                    resultDecodedBuilder.barBytes = Data(base64Encoded:jsonValueBarBytes, options: Data.Base64DecodingOptions(rawValue:0))!
                }
                if let jsonValueBarEnum = jsonMap["barEnum"] as? String {
                    resultDecodedBuilder.barEnum = try ProtobufUnittest.TestOneof2.NestedEnum.fromString(jsonValueBarEnum)
                }
                if let jsonValueBazInt = jsonMap["bazInt"] as? Int {
                    resultDecodedBuilder.bazInt = Int32(jsonValueBazInt)
                } else if let jsonValueBazInt = jsonMap["bazInt"] as? String {
                    resultDecodedBuilder.bazInt = Int32(jsonValueBazInt)!
                }
                if let jsonValueBazString = jsonMap["bazString"] as? String {
                    resultDecodedBuilder.bazString = jsonValueBazString
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestOneof2.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 ProtobufUnittest.TestOneof2.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestRequiredOneof : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestRequiredOneof.Builder

        public static func == (lhs: ProtobufUnittest.TestRequiredOneof, rhs: ProtobufUnittest.TestRequiredOneof) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasFooInt == rhs.hasFooInt) && (!lhs.hasFooInt || lhs.fooInt == rhs.fooInt)
            fieldCheck = fieldCheck && (lhs.hasFooString == rhs.hasFooString) && (!lhs.hasFooString || lhs.fooString == rhs.fooString)
            fieldCheck = fieldCheck && (lhs.hasFooMessage == rhs.hasFooMessage) && (!lhs.hasFooMessage || lhs.fooMessage == rhs.fooMessage)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class NestedMessage : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder

            public static func == (lhs: ProtobufUnittest.TestRequiredOneof.NestedMessage, rhs: ProtobufUnittest.TestRequiredOneof.NestedMessage) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasRequiredDouble == rhs.hasRequiredDouble) && (!lhs.hasRequiredDouble || lhs.requiredDouble == rhs.requiredDouble)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var requiredDouble:Double! = nil
            public fileprivate(set) var hasRequiredDouble:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
                if !hasRequiredDouble {
                    throw ProtocolBuffersError.invalidProtocolBuffer("Uninitialized Message \(ProtobufUnittest.TestRequiredOneof.NestedMessage.self): field \"requiredDouble\" mark required")
                }
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasRequiredDouble {
                    try codedOutputStream.writeDouble(fieldNumber: 1, value:requiredDouble)
                }
                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 hasRequiredDouble {
                    serialize_size += requiredDouble.computeDoubleSize(fieldNumber: 1)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                return ProtobufUnittest.TestRequiredOneof.NestedMessage.classBuilder() as! ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                return classBuilder() as! ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                return try ProtobufUnittest.TestRequiredOneof.NestedMessage.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestRequiredOneof.NestedMessage) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasRequiredDouble {
                    jsonMap["requiredDouble"] = Double(requiredDouble)
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
                return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
                return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasRequiredDouble {
                    output += "\(indent) requiredDouble: \(String(describing: requiredDouble)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasRequiredDouble {
                        hashCode = (hashCode &* 31) &+ requiredDouble.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var requiredDouble:Double {
                    get {
                        return builderResult.requiredDouble
                    }
                    set (value) {
                        builderResult.hasRequiredDouble = true
                        builderResult.requiredDouble = value
                    }
                }
                public var hasRequiredDouble:Bool {
                    get {
                        return builderResult.hasRequiredDouble
                    }
                }
                @discardableResult
                public func setRequiredDouble(_ value:Double) -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                    self.requiredDouble = value
                    return self
                }
                @discardableResult
                public func clearRequiredDouble() -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder{
                    builderResult.hasRequiredDouble = false
                    builderResult.requiredDouble = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                    builderResult = ProtobufUnittest.TestRequiredOneof.NestedMessage()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                    return try ProtobufUnittest.TestRequiredOneof.NestedMessage.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
                    let returnMe:ProtobufUnittest.TestRequiredOneof.NestedMessage = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestRequiredOneof.NestedMessage) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                    if other == ProtobufUnittest.TestRequiredOneof.NestedMessage() {
                        return self
                    }
                    if other.hasRequiredDouble {
                        requiredDouble = other.requiredDouble
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredOneof.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 9:
                            requiredDouble = try codedInputStream.readDouble()

                        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 -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder()
                    if let jsonValueRequiredDouble = jsonMap["requiredDouble"] as? Double {
                        resultDecodedBuilder.requiredDouble = Double(jsonValueRequiredDouble)
                    } else if let jsonValueRequiredDouble = jsonMap["requiredDouble"] as? String {
                        resultDecodedBuilder.requiredDouble = Double(jsonValueRequiredDouble)!
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRequiredOneof.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 ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //OneOf declaration start

        public enum Foo {
            case oneOfFooNotSet

            public func checkOneOfIsSet() -> Bool {
                switch self {
                case .oneOfFooNotSet: return false
                default: return true
                }
            }
            case fooInt(Int32)

            public static func getFooInt(_ value:Foo) -> Int32? {
                switch value {
                case .fooInt(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getFooInt() -> Int32? {
                switch self {
                case .fooInt(let otherValue): return otherValue
                default: return nil
                }
            }
            case fooString(String)

            public static func getFooString(_ value:Foo) -> String? {
                switch value {
                case .fooString(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getFooString() -> String? {
                switch self {
                case .fooString(let otherValue): return otherValue
                default: return nil
                }
            }
            case fooMessage(ProtobufUnittest.TestRequiredOneof.NestedMessage)

            public static func getFooMessage(_ value:Foo) -> ProtobufUnittest.TestRequiredOneof.NestedMessage? {
                switch value {
                case .fooMessage(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getFooMessage() -> ProtobufUnittest.TestRequiredOneof.NestedMessage? {
                switch self {
                case .fooMessage(let messageValue): return messageValue
                default: return nil
                }
            }
        }
        //OneOf declaration end

        fileprivate var storageFoo:TestRequiredOneof.Foo =  TestRequiredOneof.Foo.oneOfFooNotSet
        public func getOneOfFoo() ->  TestRequiredOneof.Foo {
            let copyObjectFoo = storageFoo
            return copyObjectFoo
        }
        public fileprivate(set) var fooInt:Int32!{
            get {
                return TestRequiredOneof.Foo.getFooInt(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestRequiredOneof.Foo.fooInt(newvalue)
            }
        }
        public fileprivate(set) var hasFooInt:Bool {
            get {
                return TestRequiredOneof.Foo.getFooInt(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooString:String!{
            get {
                return TestRequiredOneof.Foo.getFooString(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestRequiredOneof.Foo.fooString(newvalue)
            }
        }
        public fileprivate(set) var hasFooString:Bool {
            get {
                return TestRequiredOneof.Foo.getFooString(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var fooMessage:ProtobufUnittest.TestRequiredOneof.NestedMessage!{
            get {
                return TestRequiredOneof.Foo.getFooMessage(storageFoo)
            }
            set (newvalue) {
                storageFoo = TestRequiredOneof.Foo.fooMessage(newvalue)
            }
        }
        public fileprivate(set) var hasFooMessage:Bool {
            get {
                return TestRequiredOneof.Foo.getFooMessage(storageFoo) != nil
            }
            set(newValue) {
            }
        }
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            if hasFooMessage {
                try fooMessage.isInitialized()
            }
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasFooInt {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:fooInt)
            }
            if hasFooString {
                try codedOutputStream.writeString(fieldNumber: 2, value:fooString)
            }
            if hasFooMessage {
                try codedOutputStream.writeMessage(fieldNumber: 3, value:fooMessage)
            }
            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 hasFooInt {
                serialize_size += fooInt.computeInt32Size(fieldNumber: 1)
            }
            if hasFooString {
                serialize_size += fooString.computeStringSize(fieldNumber: 2)
            }
            if hasFooMessage {
                if let varSizefooMessage = fooMessage?.computeMessageSize(fieldNumber: 3) {
                    serialize_size += varSizefooMessage
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestRequiredOneof.Builder {
            return ProtobufUnittest.TestRequiredOneof.classBuilder() as! ProtobufUnittest.TestRequiredOneof.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestRequiredOneof.Builder {
            return classBuilder() as! ProtobufUnittest.TestRequiredOneof.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRequiredOneof.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRequiredOneof.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestRequiredOneof.Builder {
            return try ProtobufUnittest.TestRequiredOneof.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestRequiredOneof) throws -> ProtobufUnittest.TestRequiredOneof.Builder {
            return try ProtobufUnittest.TestRequiredOneof.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasFooInt {
                jsonMap["fooInt"] = Int(fooInt)
            }
            if hasFooString {
                jsonMap["fooString"] = fooString
            }
            if hasFooMessage {
                jsonMap["fooMessage"] = try fooMessage.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestRequiredOneof {
            return try ProtobufUnittest.TestRequiredOneof.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRequiredOneof {
            return try ProtobufUnittest.TestRequiredOneof.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasFooInt {
                output += "\(indent) fooInt: \(String(describing: fooInt)) \n"
            }
            if hasFooString {
                output += "\(indent) fooString: \(String(describing: fooString)) \n"
            }
            if hasFooMessage {
                output += "\(indent) fooMessage {\n"
                if let outDescFooMessage = fooMessage {
                    output += try outDescFooMessage.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasFooInt {
                    hashCode = (hashCode &* 31) &+ fooInt.hashValue
                }
                if hasFooString {
                    hashCode = (hashCode &* 31) &+ fooString.hashValue
                }
                if hasFooMessage {
                    if let hashValuefooMessage = fooMessage?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefooMessage
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public func setFoo(_ oneOf:TestRequiredOneof.Foo) ->  ProtobufUnittest.TestRequiredOneof.Builder {
                builderResult.storageFoo = oneOf
                return self
            }
            public var fooInt:Int32 {
                get {
                    return builderResult.fooInt
                }
                set (value) {
                    builderResult.hasFooInt = true
                    builderResult.fooInt = value
                }
            }
            public var hasFooInt:Bool {
                get {
                    return builderResult.hasFooInt
                }
            }
            @discardableResult
            public func setFooInt(_ value:Int32) -> ProtobufUnittest.TestRequiredOneof.Builder {
                self.fooInt = value
                return self
            }
            @discardableResult
            public func clearFooInt() -> ProtobufUnittest.TestRequiredOneof.Builder{
                builderResult.hasFooInt = false
                builderResult.fooInt = nil
                return self
            }
            public var fooString:String {
                get {
                    return builderResult.fooString
                }
                set (value) {
                    builderResult.hasFooString = true
                    builderResult.fooString = value
                }
            }
            public var hasFooString:Bool {
                get {
                    return builderResult.hasFooString
                }
            }
            @discardableResult
            public func setFooString(_ value:String) -> ProtobufUnittest.TestRequiredOneof.Builder {
                self.fooString = value
                return self
            }
            @discardableResult
            public func clearFooString() -> ProtobufUnittest.TestRequiredOneof.Builder{
                builderResult.hasFooString = false
                builderResult.fooString = nil
                return self
            }
            public var fooMessage:ProtobufUnittest.TestRequiredOneof.NestedMessage! {
                get {
                    if fooMessageBuilder_ != nil {
                        builderResult.fooMessage = fooMessageBuilder_.getMessage()
                    }
                    return builderResult.fooMessage
                }
                set (value) {
                    builderResult.hasFooMessage = value != nil
                    builderResult.fooMessage = value
                }
            }
            public var hasFooMessage:Bool {
                get {
                    return builderResult.hasFooMessage
                }
            }
            fileprivate var fooMessageBuilder_:ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder! {
                didSet {
                    builderResult.hasFooMessage = true
                }
            }
            public func getFooMessageBuilder() -> ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder {
                if fooMessageBuilder_ == nil {
                    fooMessageBuilder_ = ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder()
                    builderResult.fooMessage = fooMessageBuilder_.getMessage()
                    if fooMessage != nil {
                        try! fooMessageBuilder_.mergeFrom(other: fooMessage)
                    }
                }
                return fooMessageBuilder_
            }
            @discardableResult
            public func setFooMessage(_ value:ProtobufUnittest.TestRequiredOneof.NestedMessage!) -> ProtobufUnittest.TestRequiredOneof.Builder {
                self.fooMessage = value
                return self
            }
            @discardableResult
            public func mergeFooMessage(value:ProtobufUnittest.TestRequiredOneof.NestedMessage) throws -> ProtobufUnittest.TestRequiredOneof.Builder {
                if builderResult.hasFooMessage {
                    builderResult.fooMessage = try ProtobufUnittest.TestRequiredOneof.NestedMessage.builderWithPrototype(prototype:builderResult.fooMessage).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.fooMessage = value
                }
                builderResult.hasFooMessage = true
                return self
            }
            @discardableResult
            public func clearFooMessage() -> ProtobufUnittest.TestRequiredOneof.Builder {
                fooMessageBuilder_ = nil
                builderResult.hasFooMessage = false
                builderResult.fooMessage = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestRequiredOneof.Builder {
                builderResult = ProtobufUnittest.TestRequiredOneof()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestRequiredOneof.Builder {
                return try ProtobufUnittest.TestRequiredOneof.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestRequiredOneof {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestRequiredOneof {
                let returnMe:ProtobufUnittest.TestRequiredOneof = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestRequiredOneof) throws -> ProtobufUnittest.TestRequiredOneof.Builder {
                if other == ProtobufUnittest.TestRequiredOneof() {
                    return self
                }
                if other.hasFooInt {
                    fooInt = other.fooInt
                }
                if other.hasFooString {
                    fooString = other.fooString
                }
                if (other.hasFooMessage) {
                    try mergeFooMessage(value: other.fooMessage)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRequiredOneof.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredOneof.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:
                        fooInt = try codedInputStream.readInt32()

                    case 18:
                        fooString = try codedInputStream.readString()

                    case 26:
                        let subBuilder:ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder = ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder()
                        if hasFooMessage {
                            try subBuilder.mergeFrom(other: fooMessage)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        fooMessage = 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 -> ProtobufUnittest.TestRequiredOneof.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestRequiredOneof.Builder()
                if let jsonValueFooInt = jsonMap["fooInt"] as? Int {
                    resultDecodedBuilder.fooInt = Int32(jsonValueFooInt)
                } else if let jsonValueFooInt = jsonMap["fooInt"] as? String {
                    resultDecodedBuilder.fooInt = Int32(jsonValueFooInt)!
                }
                if let jsonValueFooString = jsonMap["fooString"] as? String {
                    resultDecodedBuilder.fooString = jsonValueFooString
                }
                if let jsonValueFooMessage = jsonMap["fooMessage"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.fooMessage = try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder.decodeToBuilder(jsonMap:jsonValueFooMessage).build()

                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRequiredOneof.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 ProtobufUnittest.TestRequiredOneof.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

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

        public static func == (lhs: ProtobufUnittest.TestPackedTypes, rhs: ProtobufUnittest.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<ProtobufUnittest.ForeignEnum> = Array<ProtobufUnittest.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() -> ProtobufUnittest.TestPackedTypes.Builder {
            return ProtobufUnittest.TestPackedTypes.classBuilder() as! ProtobufUnittest.TestPackedTypes.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestPackedTypes.Builder {
            return classBuilder() as! ProtobufUnittest.TestPackedTypes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestPackedTypes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestPackedTypes.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestPackedTypes.Builder {
            return try ProtobufUnittest.TestPackedTypes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestPackedTypes) throws -> ProtobufUnittest.TestPackedTypes.Builder {
            return try ProtobufUnittest.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 -> ProtobufUnittest.TestPackedTypes {
            return try ProtobufUnittest.TestPackedTypes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestPackedTypes {
            return try ProtobufUnittest.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 "ProtobufUnittest.TestPackedTypes"
        }
        override public func className() -> String {
            return "ProtobufUnittest.TestPackedTypes"
        }
        //Meta information declaration end

        final public class Builder : GeneratedMessageBuilder {
            fileprivate var builderResult:ProtobufUnittest.TestPackedTypes = ProtobufUnittest.TestPackedTypes()
            public func getMessage() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedInt32 = value
                return self
            }
            @discardableResult
            public func clearPackedInt32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedInt64 = value
                return self
            }
            @discardableResult
            public func clearPackedInt64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedUint32 = value
                return self
            }
            @discardableResult
            public func clearPackedUint32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedUint64 = value
                return self
            }
            @discardableResult
            public func clearPackedUint64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedSint32 = value
                return self
            }
            @discardableResult
            public func clearPackedSint32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedSint64 = value
                return self
            }
            @discardableResult
            public func clearPackedSint64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedFixed32 = value
                return self
            }
            @discardableResult
            public func clearPackedFixed32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedFixed64 = value
                return self
            }
            @discardableResult
            public func clearPackedFixed64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedSfixed32 = value
                return self
            }
            @discardableResult
            public func clearPackedSfixed32() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedSfixed64 = value
                return self
            }
            @discardableResult
            public func clearPackedSfixed64() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedFloat = value
                return self
            }
            @discardableResult
            public func clearPackedFloat() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedDouble = value
                return self
            }
            @discardableResult
            public func clearPackedDouble() -> ProtobufUnittest.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>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedBool = value
                return self
            }
            @discardableResult
            public func clearPackedBool() -> ProtobufUnittest.TestPackedTypes.Builder {
                builderResult.packedBool.removeAll(keepingCapacity: false)
                return self
            }
            public var packedEnum:Array<ProtobufUnittest.ForeignEnum> {
                get {
                    return builderResult.packedEnum
                }
                set (value) {
                    builderResult.packedEnum = value
                }
            }
            @discardableResult
            public func setPackedEnum(_ value:Array<ProtobufUnittest.ForeignEnum>) -> ProtobufUnittest.TestPackedTypes.Builder {
                self.packedEnum = value
                return self
            }
            @discardableResult
            public func clearPackedEnum() -> ProtobufUnittest.TestPackedTypes.Builder {
                builderResult.packedEnum.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestPackedTypes.Builder {
                builderResult = ProtobufUnittest.TestPackedTypes()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestPackedTypes.Builder {
                return try ProtobufUnittest.TestPackedTypes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestPackedTypes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestPackedTypes {
                let returnMe:ProtobufUnittest.TestPackedTypes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestPackedTypes) throws -> ProtobufUnittest.TestPackedTypes.Builder {
                if other == ProtobufUnittest.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 -> ProtobufUnittest.TestPackedTypes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.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 = ProtobufUnittest.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 -> ProtobufUnittest.TestPackedTypes.Builder {
                let resultDecodedBuilder = ProtobufUnittest.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<ProtobufUnittest.ForeignEnum> = []
                    for oneValuePackedEnum in jsonValuePackedEnum {
                        let enumFromStringPackedEnum = try ProtobufUnittest.ForeignEnum.fromString(oneValuePackedEnum)
                        jsonArrayPackedEnum.append(enumFromStringPackedEnum)
                    }
                    resultDecodedBuilder.packedEnum = jsonArrayPackedEnum
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.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 ProtobufUnittest.TestPackedTypes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// A message with the same fields as TestPackedTypes, but without packing. Used
    /// to test packed <-> unpacked wire compatibility.
    final public class TestUnpackedTypes : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestUnpackedTypes.Builder

        public static func == (lhs: ProtobufUnittest.TestUnpackedTypes, rhs: ProtobufUnittest.TestUnpackedTypes) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.unpackedInt32 == rhs.unpackedInt32)
            fieldCheck = fieldCheck && (lhs.unpackedInt64 == rhs.unpackedInt64)
            fieldCheck = fieldCheck && (lhs.unpackedUint32 == rhs.unpackedUint32)
            fieldCheck = fieldCheck && (lhs.unpackedUint64 == rhs.unpackedUint64)
            fieldCheck = fieldCheck && (lhs.unpackedSint32 == rhs.unpackedSint32)
            fieldCheck = fieldCheck && (lhs.unpackedSint64 == rhs.unpackedSint64)
            fieldCheck = fieldCheck && (lhs.unpackedFixed32 == rhs.unpackedFixed32)
            fieldCheck = fieldCheck && (lhs.unpackedFixed64 == rhs.unpackedFixed64)
            fieldCheck = fieldCheck && (lhs.unpackedSfixed32 == rhs.unpackedSfixed32)
            fieldCheck = fieldCheck && (lhs.unpackedSfixed64 == rhs.unpackedSfixed64)
            fieldCheck = fieldCheck && (lhs.unpackedFloat == rhs.unpackedFloat)
            fieldCheck = fieldCheck && (lhs.unpackedDouble == rhs.unpackedDouble)
            fieldCheck = fieldCheck && (lhs.unpackedBool == rhs.unpackedBool)
            fieldCheck = fieldCheck && (lhs.unpackedEnum == rhs.unpackedEnum)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var unpackedInt32:Array<Int32> = Array<Int32>()
        public fileprivate(set) var unpackedInt64:Array<Int64> = Array<Int64>()
        public fileprivate(set) var unpackedUint32:Array<UInt32> = Array<UInt32>()
        public fileprivate(set) var unpackedUint64:Array<UInt64> = Array<UInt64>()
        public fileprivate(set) var unpackedSint32:Array<Int32> = Array<Int32>()
        public fileprivate(set) var unpackedSint64:Array<Int64> = Array<Int64>()
        public fileprivate(set) var unpackedFixed32:Array<UInt32> = Array<UInt32>()
        public fileprivate(set) var unpackedFixed64:Array<UInt64> = Array<UInt64>()
        public fileprivate(set) var unpackedSfixed32:Array<Int32> = Array<Int32>()
        public fileprivate(set) var unpackedSfixed64:Array<Int64> = Array<Int64>()
        public fileprivate(set) var unpackedFloat:Array<Float> = Array<Float>()
        public fileprivate(set) var unpackedDouble:Array<Double> = Array<Double>()
        public fileprivate(set) var unpackedBool:Array<Bool> = Array<Bool>()
        private var unpackedEnumMemoizedSerializedSize:Int32 = 0
        public fileprivate(set) var unpackedEnum:Array<ProtobufUnittest.ForeignEnum> = Array<ProtobufUnittest.ForeignEnum>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if !unpackedInt32.isEmpty {
                for oneValueunpackedInt32 in unpackedInt32 {
                    try codedOutputStream.writeInt32(fieldNumber: 90, value:oneValueunpackedInt32)
                }
            }
            if !unpackedInt64.isEmpty {
                for oneValueunpackedInt64 in unpackedInt64 {
                    try codedOutputStream.writeInt64(fieldNumber: 91, value:oneValueunpackedInt64)
                }
            }
            if !unpackedUint32.isEmpty {
                for oneValueunpackedUint32 in unpackedUint32 {
                    try codedOutputStream.writeUInt32(fieldNumber: 92, value:oneValueunpackedUint32)
                }
            }
            if !unpackedUint64.isEmpty {
                for oneValueunpackedUint64 in unpackedUint64 {
                    try codedOutputStream.writeUInt64(fieldNumber: 93, value:oneValueunpackedUint64)
                }
            }
            if !unpackedSint32.isEmpty {
                for oneValueunpackedSint32 in unpackedSint32 {
                    try codedOutputStream.writeSInt32(fieldNumber: 94, value:oneValueunpackedSint32)
                }
            }
            if !unpackedSint64.isEmpty {
                for oneValueunpackedSint64 in unpackedSint64 {
                    try codedOutputStream.writeSInt64(fieldNumber: 95, value:oneValueunpackedSint64)
                }
            }
            if !unpackedFixed32.isEmpty {
                for oneValueunpackedFixed32 in unpackedFixed32 {
                    try codedOutputStream.writeFixed32(fieldNumber: 96, value:oneValueunpackedFixed32)
                }
            }
            if !unpackedFixed64.isEmpty {
                for oneValueunpackedFixed64 in unpackedFixed64 {
                    try codedOutputStream.writeFixed64(fieldNumber: 97, value:oneValueunpackedFixed64)
                }
            }
            if !unpackedSfixed32.isEmpty {
                for oneValueunpackedSfixed32 in unpackedSfixed32 {
                    try codedOutputStream.writeSFixed32(fieldNumber: 98, value:oneValueunpackedSfixed32)
                }
            }
            if !unpackedSfixed64.isEmpty {
                for oneValueunpackedSfixed64 in unpackedSfixed64 {
                    try codedOutputStream.writeSFixed64(fieldNumber: 99, value:oneValueunpackedSfixed64)
                }
            }
            if !unpackedFloat.isEmpty {
                for oneValueunpackedFloat in unpackedFloat {
                    try codedOutputStream.writeFloat(fieldNumber: 100, value:oneValueunpackedFloat)
                }
            }
            if !unpackedDouble.isEmpty {
                for oneValueunpackedDouble in unpackedDouble {
                    try codedOutputStream.writeDouble(fieldNumber: 101, value:oneValueunpackedDouble)
                }
            }
            if !unpackedBool.isEmpty {
                for oneValueunpackedBool in unpackedBool {
                    try codedOutputStream.writeBool(fieldNumber: 102, value:oneValueunpackedBool)
                }
            }
            for oneValueOfunpackedEnum in unpackedEnum {
                  try codedOutputStream.writeEnum(fieldNumber: 103, value:oneValueOfunpackedEnum.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 dataSizeUnpackedInt32:Int32 = 0
            for oneValueunpackedInt32 in unpackedInt32 {
                dataSizeUnpackedInt32 += oneValueunpackedInt32.computeInt32SizeNoTag()
            }
            serialize_size += dataSizeUnpackedInt32
            serialize_size += 2 * Int32(unpackedInt32.count)
            var dataSizeUnpackedInt64:Int32 = 0
            for oneValueunpackedInt64 in unpackedInt64 {
                dataSizeUnpackedInt64 += oneValueunpackedInt64.computeInt64SizeNoTag()
            }
            serialize_size += dataSizeUnpackedInt64
            serialize_size += 2 * Int32(unpackedInt64.count)
            var dataSizeUnpackedUint32:Int32 = 0
            for oneValueunpackedUint32 in unpackedUint32 {
                dataSizeUnpackedUint32 += oneValueunpackedUint32.computeUInt32SizeNoTag()
            }
            serialize_size += dataSizeUnpackedUint32
            serialize_size += 2 * Int32(unpackedUint32.count)
            var dataSizeUnpackedUint64:Int32 = 0
            for oneValueunpackedUint64 in unpackedUint64 {
                dataSizeUnpackedUint64 += oneValueunpackedUint64.computeUInt64SizeNoTag()
            }
            serialize_size += dataSizeUnpackedUint64
            serialize_size += 2 * Int32(unpackedUint64.count)
            var dataSizeUnpackedSint32:Int32 = 0
            for oneValueunpackedSint32 in unpackedSint32 {
                dataSizeUnpackedSint32 += oneValueunpackedSint32.computeSInt32SizeNoTag()
            }
            serialize_size += dataSizeUnpackedSint32
            serialize_size += 2 * Int32(unpackedSint32.count)
            var dataSizeUnpackedSint64:Int32 = 0
            for oneValueunpackedSint64 in unpackedSint64 {
                dataSizeUnpackedSint64 += oneValueunpackedSint64.computeSInt64SizeNoTag()
            }
            serialize_size += dataSizeUnpackedSint64
            serialize_size += 2 * Int32(unpackedSint64.count)
            var dataSizeUnpackedFixed32:Int32 = 0
            dataSizeUnpackedFixed32 = 4 * Int32(unpackedFixed32.count)
            serialize_size += dataSizeUnpackedFixed32
            serialize_size += 2 * Int32(unpackedFixed32.count)
            var dataSizeUnpackedFixed64:Int32 = 0
            dataSizeUnpackedFixed64 = 8 * Int32(unpackedFixed64.count)
            serialize_size += dataSizeUnpackedFixed64
            serialize_size += 2 * Int32(unpackedFixed64.count)
            var dataSizeUnpackedSfixed32:Int32 = 0
            dataSizeUnpackedSfixed32 = 4 * Int32(unpackedSfixed32.count)
            serialize_size += dataSizeUnpackedSfixed32
            serialize_size += 2 * Int32(unpackedSfixed32.count)
            var dataSizeUnpackedSfixed64:Int32 = 0
            dataSizeUnpackedSfixed64 = 8 * Int32(unpackedSfixed64.count)
            serialize_size += dataSizeUnpackedSfixed64
            serialize_size += 2 * Int32(unpackedSfixed64.count)
            var dataSizeUnpackedFloat:Int32 = 0
            dataSizeUnpackedFloat = 4 * Int32(unpackedFloat.count)
            serialize_size += dataSizeUnpackedFloat
            serialize_size += 2 * Int32(unpackedFloat.count)
            var dataSizeUnpackedDouble:Int32 = 0
            dataSizeUnpackedDouble = 8 * Int32(unpackedDouble.count)
            serialize_size += dataSizeUnpackedDouble
            serialize_size += 2 * Int32(unpackedDouble.count)
            var dataSizeUnpackedBool:Int32 = 0
            dataSizeUnpackedBool = 1 * Int32(unpackedBool.count)
            serialize_size += dataSizeUnpackedBool
            serialize_size += 2 * Int32(unpackedBool.count)
            var dataSizeunpackedEnum:Int32 = 0
            for oneValueOfunpackedEnum in unpackedEnum {
                dataSizeunpackedEnum += oneValueOfunpackedEnum.rawValue.computeEnumSizeNoTag()
            }
            serialize_size += dataSizeunpackedEnum
            serialize_size += (2 * Int32(unpackedEnum.count))
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestUnpackedTypes.Builder {
            return ProtobufUnittest.TestUnpackedTypes.classBuilder() as! ProtobufUnittest.TestUnpackedTypes.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestUnpackedTypes.Builder {
            return classBuilder() as! ProtobufUnittest.TestUnpackedTypes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestUnpackedTypes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestUnpackedTypes.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestUnpackedTypes.Builder {
            return try ProtobufUnittest.TestUnpackedTypes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestUnpackedTypes) throws -> ProtobufUnittest.TestUnpackedTypes.Builder {
            return try ProtobufUnittest.TestUnpackedTypes.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if !unpackedInt32.isEmpty {
                var jsonArrayUnpackedInt32:Array<Int> = []
                for oneValueUnpackedInt32 in unpackedInt32 {
                    jsonArrayUnpackedInt32.append(Int(oneValueUnpackedInt32))
                }
                jsonMap["unpackedInt32"] = jsonArrayUnpackedInt32
            }
            if !unpackedInt64.isEmpty {
                var jsonArrayUnpackedInt64:Array<String> = []
                for oneValueUnpackedInt64 in unpackedInt64 {
                    jsonArrayUnpackedInt64.append("\(oneValueUnpackedInt64)")
                }
                jsonMap["unpackedInt64"] = jsonArrayUnpackedInt64
            }
            if !unpackedUint32.isEmpty {
                var jsonArrayUnpackedUint32:Array<UInt> = []
                for oneValueUnpackedUint32 in unpackedUint32 {
                    jsonArrayUnpackedUint32.append(UInt(oneValueUnpackedUint32))
                }
                jsonMap["unpackedUint32"] = jsonArrayUnpackedUint32
            }
            if !unpackedUint64.isEmpty {
                var jsonArrayUnpackedUint64:Array<String> = []
                for oneValueUnpackedUint64 in unpackedUint64 {
                    jsonArrayUnpackedUint64.append("\(oneValueUnpackedUint64)")
                }
                jsonMap["unpackedUint64"] = jsonArrayUnpackedUint64
            }
            if !unpackedSint32.isEmpty {
                var jsonArrayUnpackedSint32:Array<Int> = []
                for oneValueUnpackedSint32 in unpackedSint32 {
                    jsonArrayUnpackedSint32.append(Int(oneValueUnpackedSint32))
                }
                jsonMap["unpackedSint32"] = jsonArrayUnpackedSint32
            }
            if !unpackedSint64.isEmpty {
                var jsonArrayUnpackedSint64:Array<String> = []
                for oneValueUnpackedSint64 in unpackedSint64 {
                    jsonArrayUnpackedSint64.append("\(oneValueUnpackedSint64)")
                }
                jsonMap["unpackedSint64"] = jsonArrayUnpackedSint64
            }
            if !unpackedFixed32.isEmpty {
                var jsonArrayUnpackedFixed32:Array<UInt> = []
                for oneValueUnpackedFixed32 in unpackedFixed32 {
                    jsonArrayUnpackedFixed32.append(UInt(oneValueUnpackedFixed32))
                }
                jsonMap["unpackedFixed32"] = jsonArrayUnpackedFixed32
            }
            if !unpackedFixed64.isEmpty {
                var jsonArrayUnpackedFixed64:Array<String> = []
                for oneValueUnpackedFixed64 in unpackedFixed64 {
                    jsonArrayUnpackedFixed64.append("\(oneValueUnpackedFixed64)")
                }
                jsonMap["unpackedFixed64"] = jsonArrayUnpackedFixed64
            }
            if !unpackedSfixed32.isEmpty {
                var jsonArrayUnpackedSfixed32:Array<Int> = []
                for oneValueUnpackedSfixed32 in unpackedSfixed32 {
                    jsonArrayUnpackedSfixed32.append(Int(oneValueUnpackedSfixed32))
                }
                jsonMap["unpackedSfixed32"] = jsonArrayUnpackedSfixed32
            }
            if !unpackedSfixed64.isEmpty {
                var jsonArrayUnpackedSfixed64:Array<String> = []
                for oneValueUnpackedSfixed64 in unpackedSfixed64 {
                    jsonArrayUnpackedSfixed64.append("\(oneValueUnpackedSfixed64)")
                }
                jsonMap["unpackedSfixed64"] = jsonArrayUnpackedSfixed64
            }
            if !unpackedFloat.isEmpty {
                var jsonArrayUnpackedFloat:Array<Float> = []
                for oneValueUnpackedFloat in unpackedFloat {
                    jsonArrayUnpackedFloat.append(Float(oneValueUnpackedFloat))
                }
                jsonMap["unpackedFloat"] = jsonArrayUnpackedFloat
            }
            if !unpackedDouble.isEmpty {
                var jsonArrayUnpackedDouble:Array<Double> = []
                for oneValueUnpackedDouble in unpackedDouble {
                    jsonArrayUnpackedDouble.append(Double(oneValueUnpackedDouble))
                }
                jsonMap["unpackedDouble"] = jsonArrayUnpackedDouble
            }
            if !unpackedBool.isEmpty {
                var jsonArrayUnpackedBool:Array<Bool> = []
                for oneValueUnpackedBool in unpackedBool {
                    jsonArrayUnpackedBool.append(oneValueUnpackedBool)
                }
                jsonMap["unpackedBool"] = jsonArrayUnpackedBool
            }
            if !unpackedEnum.isEmpty {
                var jsonArrayUnpackedEnum:Array<String> = []
                for oneValueUnpackedEnum in unpackedEnum {
                    jsonArrayUnpackedEnum.append(oneValueUnpackedEnum.toString())
                }
                jsonMap["unpackedEnum"] = jsonArrayUnpackedEnum
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestUnpackedTypes {
            return try ProtobufUnittest.TestUnpackedTypes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestUnpackedTypes {
            return try ProtobufUnittest.TestUnpackedTypes.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            var unpackedInt32ElementIndex:Int = 0
            for oneValueUnpackedInt32 in unpackedInt32  {
                output += "\(indent) unpackedInt32[\(unpackedInt32ElementIndex)]: \(oneValueUnpackedInt32)\n"
                unpackedInt32ElementIndex += 1
            }
            var unpackedInt64ElementIndex:Int = 0
            for oneValueUnpackedInt64 in unpackedInt64  {
                output += "\(indent) unpackedInt64[\(unpackedInt64ElementIndex)]: \(oneValueUnpackedInt64)\n"
                unpackedInt64ElementIndex += 1
            }
            var unpackedUint32ElementIndex:Int = 0
            for oneValueUnpackedUint32 in unpackedUint32  {
                output += "\(indent) unpackedUint32[\(unpackedUint32ElementIndex)]: \(oneValueUnpackedUint32)\n"
                unpackedUint32ElementIndex += 1
            }
            var unpackedUint64ElementIndex:Int = 0
            for oneValueUnpackedUint64 in unpackedUint64  {
                output += "\(indent) unpackedUint64[\(unpackedUint64ElementIndex)]: \(oneValueUnpackedUint64)\n"
                unpackedUint64ElementIndex += 1
            }
            var unpackedSint32ElementIndex:Int = 0
            for oneValueUnpackedSint32 in unpackedSint32  {
                output += "\(indent) unpackedSint32[\(unpackedSint32ElementIndex)]: \(oneValueUnpackedSint32)\n"
                unpackedSint32ElementIndex += 1
            }
            var unpackedSint64ElementIndex:Int = 0
            for oneValueUnpackedSint64 in unpackedSint64  {
                output += "\(indent) unpackedSint64[\(unpackedSint64ElementIndex)]: \(oneValueUnpackedSint64)\n"
                unpackedSint64ElementIndex += 1
            }
            var unpackedFixed32ElementIndex:Int = 0
            for oneValueUnpackedFixed32 in unpackedFixed32  {
                output += "\(indent) unpackedFixed32[\(unpackedFixed32ElementIndex)]: \(oneValueUnpackedFixed32)\n"
                unpackedFixed32ElementIndex += 1
            }
            var unpackedFixed64ElementIndex:Int = 0
            for oneValueUnpackedFixed64 in unpackedFixed64  {
                output += "\(indent) unpackedFixed64[\(unpackedFixed64ElementIndex)]: \(oneValueUnpackedFixed64)\n"
                unpackedFixed64ElementIndex += 1
            }
            var unpackedSfixed32ElementIndex:Int = 0
            for oneValueUnpackedSfixed32 in unpackedSfixed32  {
                output += "\(indent) unpackedSfixed32[\(unpackedSfixed32ElementIndex)]: \(oneValueUnpackedSfixed32)\n"
                unpackedSfixed32ElementIndex += 1
            }
            var unpackedSfixed64ElementIndex:Int = 0
            for oneValueUnpackedSfixed64 in unpackedSfixed64  {
                output += "\(indent) unpackedSfixed64[\(unpackedSfixed64ElementIndex)]: \(oneValueUnpackedSfixed64)\n"
                unpackedSfixed64ElementIndex += 1
            }
            var unpackedFloatElementIndex:Int = 0
            for oneValueUnpackedFloat in unpackedFloat  {
                output += "\(indent) unpackedFloat[\(unpackedFloatElementIndex)]: \(oneValueUnpackedFloat)\n"
                unpackedFloatElementIndex += 1
            }
            var unpackedDoubleElementIndex:Int = 0
            for oneValueUnpackedDouble in unpackedDouble  {
                output += "\(indent) unpackedDouble[\(unpackedDoubleElementIndex)]: \(oneValueUnpackedDouble)\n"
                unpackedDoubleElementIndex += 1
            }
            var unpackedBoolElementIndex:Int = 0
            for oneValueUnpackedBool in unpackedBool  {
                output += "\(indent) unpackedBool[\(unpackedBoolElementIndex)]: \(oneValueUnpackedBool)\n"
                unpackedBoolElementIndex += 1
            }
            var unpackedEnumElementIndex:Int = 0
            for oneValueOfunpackedEnum in unpackedEnum {
                output += "\(indent) unpackedEnum[\(unpackedEnumElementIndex)]: \(oneValueOfunpackedEnum.description)\n"
                unpackedEnumElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                for oneValueUnpackedInt32 in unpackedInt32 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedInt32.hashValue
                }
                for oneValueUnpackedInt64 in unpackedInt64 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedInt64.hashValue
                }
                for oneValueUnpackedUint32 in unpackedUint32 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedUint32.hashValue
                }
                for oneValueUnpackedUint64 in unpackedUint64 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedUint64.hashValue
                }
                for oneValueUnpackedSint32 in unpackedSint32 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedSint32.hashValue
                }
                for oneValueUnpackedSint64 in unpackedSint64 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedSint64.hashValue
                }
                for oneValueUnpackedFixed32 in unpackedFixed32 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedFixed32.hashValue
                }
                for oneValueUnpackedFixed64 in unpackedFixed64 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedFixed64.hashValue
                }
                for oneValueUnpackedSfixed32 in unpackedSfixed32 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedSfixed32.hashValue
                }
                for oneValueUnpackedSfixed64 in unpackedSfixed64 {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedSfixed64.hashValue
                }
                for oneValueUnpackedFloat in unpackedFloat {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedFloat.hashValue
                }
                for oneValueUnpackedDouble in unpackedDouble {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedDouble.hashValue
                }
                for oneValueUnpackedBool in unpackedBool {
                    hashCode = (hashCode &* 31) &+ oneValueUnpackedBool.hashValue
                }
                for oneValueOfunpackedEnum in unpackedEnum {
                    hashCode = (hashCode &* 31) &+ oneValueOfunpackedEnum.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var unpackedInt32:Array<Int32> {
                get {
                    return builderResult.unpackedInt32
                }
                set (array) {
                    builderResult.unpackedInt32 = array
                }
            }
            @discardableResult
            public func setUnpackedInt32(_ value:Array<Int32>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedInt32 = value
                return self
            }
            @discardableResult
            public func clearUnpackedInt32() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedInt32.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedInt64:Array<Int64> {
                get {
                    return builderResult.unpackedInt64
                }
                set (array) {
                    builderResult.unpackedInt64 = array
                }
            }
            @discardableResult
            public func setUnpackedInt64(_ value:Array<Int64>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedInt64 = value
                return self
            }
            @discardableResult
            public func clearUnpackedInt64() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedInt64.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedUint32:Array<UInt32> {
                get {
                    return builderResult.unpackedUint32
                }
                set (array) {
                    builderResult.unpackedUint32 = array
                }
            }
            @discardableResult
            public func setUnpackedUint32(_ value:Array<UInt32>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedUint32 = value
                return self
            }
            @discardableResult
            public func clearUnpackedUint32() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedUint32.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedUint64:Array<UInt64> {
                get {
                    return builderResult.unpackedUint64
                }
                set (array) {
                    builderResult.unpackedUint64 = array
                }
            }
            @discardableResult
            public func setUnpackedUint64(_ value:Array<UInt64>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedUint64 = value
                return self
            }
            @discardableResult
            public func clearUnpackedUint64() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedUint64.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedSint32:Array<Int32> {
                get {
                    return builderResult.unpackedSint32
                }
                set (array) {
                    builderResult.unpackedSint32 = array
                }
            }
            @discardableResult
            public func setUnpackedSint32(_ value:Array<Int32>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedSint32 = value
                return self
            }
            @discardableResult
            public func clearUnpackedSint32() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedSint32.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedSint64:Array<Int64> {
                get {
                    return builderResult.unpackedSint64
                }
                set (array) {
                    builderResult.unpackedSint64 = array
                }
            }
            @discardableResult
            public func setUnpackedSint64(_ value:Array<Int64>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedSint64 = value
                return self
            }
            @discardableResult
            public func clearUnpackedSint64() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedSint64.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedFixed32:Array<UInt32> {
                get {
                    return builderResult.unpackedFixed32
                }
                set (array) {
                    builderResult.unpackedFixed32 = array
                }
            }
            @discardableResult
            public func setUnpackedFixed32(_ value:Array<UInt32>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedFixed32 = value
                return self
            }
            @discardableResult
            public func clearUnpackedFixed32() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedFixed32.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedFixed64:Array<UInt64> {
                get {
                    return builderResult.unpackedFixed64
                }
                set (array) {
                    builderResult.unpackedFixed64 = array
                }
            }
            @discardableResult
            public func setUnpackedFixed64(_ value:Array<UInt64>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedFixed64 = value
                return self
            }
            @discardableResult
            public func clearUnpackedFixed64() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedFixed64.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedSfixed32:Array<Int32> {
                get {
                    return builderResult.unpackedSfixed32
                }
                set (array) {
                    builderResult.unpackedSfixed32 = array
                }
            }
            @discardableResult
            public func setUnpackedSfixed32(_ value:Array<Int32>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedSfixed32 = value
                return self
            }
            @discardableResult
            public func clearUnpackedSfixed32() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedSfixed32.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedSfixed64:Array<Int64> {
                get {
                    return builderResult.unpackedSfixed64
                }
                set (array) {
                    builderResult.unpackedSfixed64 = array
                }
            }
            @discardableResult
            public func setUnpackedSfixed64(_ value:Array<Int64>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedSfixed64 = value
                return self
            }
            @discardableResult
            public func clearUnpackedSfixed64() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedSfixed64.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedFloat:Array<Float> {
                get {
                    return builderResult.unpackedFloat
                }
                set (array) {
                    builderResult.unpackedFloat = array
                }
            }
            @discardableResult
            public func setUnpackedFloat(_ value:Array<Float>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedFloat = value
                return self
            }
            @discardableResult
            public func clearUnpackedFloat() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedFloat.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedDouble:Array<Double> {
                get {
                    return builderResult.unpackedDouble
                }
                set (array) {
                    builderResult.unpackedDouble = array
                }
            }
            @discardableResult
            public func setUnpackedDouble(_ value:Array<Double>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedDouble = value
                return self
            }
            @discardableResult
            public func clearUnpackedDouble() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedDouble.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedBool:Array<Bool> {
                get {
                    return builderResult.unpackedBool
                }
                set (array) {
                    builderResult.unpackedBool = array
                }
            }
            @discardableResult
            public func setUnpackedBool(_ value:Array<Bool>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedBool = value
                return self
            }
            @discardableResult
            public func clearUnpackedBool() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedBool.removeAll(keepingCapacity: false)
                return self
            }
            public var unpackedEnum:Array<ProtobufUnittest.ForeignEnum> {
                get {
                    return builderResult.unpackedEnum
                }
                set (value) {
                    builderResult.unpackedEnum = value
                }
            }
            @discardableResult
            public func setUnpackedEnum(_ value:Array<ProtobufUnittest.ForeignEnum>) -> ProtobufUnittest.TestUnpackedTypes.Builder {
                self.unpackedEnum = value
                return self
            }
            @discardableResult
            public func clearUnpackedEnum() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult.unpackedEnum.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestUnpackedTypes.Builder {
                builderResult = ProtobufUnittest.TestUnpackedTypes()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestUnpackedTypes.Builder {
                return try ProtobufUnittest.TestUnpackedTypes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestUnpackedTypes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestUnpackedTypes {
                let returnMe:ProtobufUnittest.TestUnpackedTypes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestUnpackedTypes) throws -> ProtobufUnittest.TestUnpackedTypes.Builder {
                if other == ProtobufUnittest.TestUnpackedTypes() {
                    return self
                }
                if !other.unpackedInt32.isEmpty {
                    builderResult.unpackedInt32 += other.unpackedInt32
                }
                if !other.unpackedInt64.isEmpty {
                    builderResult.unpackedInt64 += other.unpackedInt64
                }
                if !other.unpackedUint32.isEmpty {
                    builderResult.unpackedUint32 += other.unpackedUint32
                }
                if !other.unpackedUint64.isEmpty {
                    builderResult.unpackedUint64 += other.unpackedUint64
                }
                if !other.unpackedSint32.isEmpty {
                    builderResult.unpackedSint32 += other.unpackedSint32
                }
                if !other.unpackedSint64.isEmpty {
                    builderResult.unpackedSint64 += other.unpackedSint64
                }
                if !other.unpackedFixed32.isEmpty {
                    builderResult.unpackedFixed32 += other.unpackedFixed32
                }
                if !other.unpackedFixed64.isEmpty {
                    builderResult.unpackedFixed64 += other.unpackedFixed64
                }
                if !other.unpackedSfixed32.isEmpty {
                    builderResult.unpackedSfixed32 += other.unpackedSfixed32
                }
                if !other.unpackedSfixed64.isEmpty {
                    builderResult.unpackedSfixed64 += other.unpackedSfixed64
                }
                if !other.unpackedFloat.isEmpty {
                    builderResult.unpackedFloat += other.unpackedFloat
                }
                if !other.unpackedDouble.isEmpty {
                    builderResult.unpackedDouble += other.unpackedDouble
                }
                if !other.unpackedBool.isEmpty {
                    builderResult.unpackedBool += other.unpackedBool
                }
                if !other.unpackedEnum.isEmpty {
                     builderResult.unpackedEnum += other.unpackedEnum
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestUnpackedTypes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.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 720:
                        unpackedInt32 += [try codedInputStream.readInt32()]

                    case 728:
                        unpackedInt64 += [try codedInputStream.readInt64()]

                    case 736:
                        unpackedUint32 += [try codedInputStream.readUInt32()]

                    case 744:
                        unpackedUint64 += [try codedInputStream.readUInt64()]

                    case 752:
                        unpackedSint32 += [try codedInputStream.readSInt32()]

                    case 760:
                        unpackedSint64 += [try codedInputStream.readSInt64()]

                    case 773:
                        unpackedFixed32 += [try codedInputStream.readFixed32()]

                    case 777:
                        unpackedFixed64 += [try codedInputStream.readFixed64()]

                    case 789:
                        unpackedSfixed32 += [try codedInputStream.readSFixed32()]

                    case 793:
                        unpackedSfixed64 += [try codedInputStream.readSFixed64()]

                    case 805:
                        unpackedFloat += [try codedInputStream.readFloat()]

                    case 809:
                        unpackedDouble += [try codedInputStream.readDouble()]

                    case 816:
                        unpackedBool += [try codedInputStream.readBool()]

                    case 824:
                        let valueIntunpackedEnum = try codedInputStream.readEnum()
                        if let enumsunpackedEnum = ProtobufUnittest.ForeignEnum(rawValue:valueIntunpackedEnum) {
                            builderResult.unpackedEnum.append(enumsunpackedEnum)
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 103, value:Int64(valueIntunpackedEnum))
                        }

                    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 -> ProtobufUnittest.TestUnpackedTypes.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestUnpackedTypes.Builder()
                if let jsonValueUnpackedInt32 = jsonMap["unpackedInt32"] as? Array<Int> {
                    var jsonArrayUnpackedInt32:Array<Int32> = []
                    for oneValueUnpackedInt32 in jsonValueUnpackedInt32 {
                        jsonArrayUnpackedInt32.append(Int32(oneValueUnpackedInt32))
                    }
                    resultDecodedBuilder.unpackedInt32 = jsonArrayUnpackedInt32
                }
                if let jsonValueUnpackedInt64 = jsonMap["unpackedInt64"] as? Array<String> {
                    var jsonArrayUnpackedInt64:Array<Int64> = []
                    for oneValueUnpackedInt64 in jsonValueUnpackedInt64 {
                        jsonArrayUnpackedInt64.append(Int64(oneValueUnpackedInt64)!)
                    }
                    resultDecodedBuilder.unpackedInt64 = jsonArrayUnpackedInt64
                }
                if let jsonValueUnpackedUint32 = jsonMap["unpackedUint32"] as? Array<UInt> {
                    var jsonArrayUnpackedUint32:Array<UInt32> = []
                    for oneValueUnpackedUint32 in jsonValueUnpackedUint32 {
                        jsonArrayUnpackedUint32.append(UInt32(oneValueUnpackedUint32))
                    }
                    resultDecodedBuilder.unpackedUint32 = jsonArrayUnpackedUint32
                }
                if let jsonValueUnpackedUint64 = jsonMap["unpackedUint64"] as? Array<String> {
                    var jsonArrayUnpackedUint64:Array<UInt64> = []
                    for oneValueUnpackedUint64 in jsonValueUnpackedUint64 {
                        jsonArrayUnpackedUint64.append(UInt64(oneValueUnpackedUint64)!)
                    }
                    resultDecodedBuilder.unpackedUint64 = jsonArrayUnpackedUint64
                }
                if let jsonValueUnpackedSint32 = jsonMap["unpackedSint32"] as? Array<Int> {
                    var jsonArrayUnpackedSint32:Array<Int32> = []
                    for oneValueUnpackedSint32 in jsonValueUnpackedSint32 {
                        jsonArrayUnpackedSint32.append(Int32(oneValueUnpackedSint32))
                    }
                    resultDecodedBuilder.unpackedSint32 = jsonArrayUnpackedSint32
                }
                if let jsonValueUnpackedSint64 = jsonMap["unpackedSint64"] as? Array<String> {
                    var jsonArrayUnpackedSint64:Array<Int64> = []
                    for oneValueUnpackedSint64 in jsonValueUnpackedSint64 {
                        jsonArrayUnpackedSint64.append(Int64(oneValueUnpackedSint64)!)
                    }
                    resultDecodedBuilder.unpackedSint64 = jsonArrayUnpackedSint64
                }
                if let jsonValueUnpackedFixed32 = jsonMap["unpackedFixed32"] as? Array<UInt> {
                    var jsonArrayUnpackedFixed32:Array<UInt32> = []
                    for oneValueUnpackedFixed32 in jsonValueUnpackedFixed32 {
                        jsonArrayUnpackedFixed32.append(UInt32(oneValueUnpackedFixed32))
                    }
                    resultDecodedBuilder.unpackedFixed32 = jsonArrayUnpackedFixed32
                }
                if let jsonValueUnpackedFixed64 = jsonMap["unpackedFixed64"] as? Array<String> {
                    var jsonArrayUnpackedFixed64:Array<UInt64> = []
                    for oneValueUnpackedFixed64 in jsonValueUnpackedFixed64 {
                        jsonArrayUnpackedFixed64.append(UInt64(oneValueUnpackedFixed64)!)
                    }
                    resultDecodedBuilder.unpackedFixed64 = jsonArrayUnpackedFixed64
                }
                if let jsonValueUnpackedSfixed32 = jsonMap["unpackedSfixed32"] as? Array<Int> {
                    var jsonArrayUnpackedSfixed32:Array<Int32> = []
                    for oneValueUnpackedSfixed32 in jsonValueUnpackedSfixed32 {
                        jsonArrayUnpackedSfixed32.append(Int32(oneValueUnpackedSfixed32))
                    }
                    resultDecodedBuilder.unpackedSfixed32 = jsonArrayUnpackedSfixed32
                }
                if let jsonValueUnpackedSfixed64 = jsonMap["unpackedSfixed64"] as? Array<String> {
                    var jsonArrayUnpackedSfixed64:Array<Int64> = []
                    for oneValueUnpackedSfixed64 in jsonValueUnpackedSfixed64 {
                        jsonArrayUnpackedSfixed64.append(Int64(oneValueUnpackedSfixed64)!)
                    }
                    resultDecodedBuilder.unpackedSfixed64 = jsonArrayUnpackedSfixed64
                }
                if let jsonValueUnpackedFloat = jsonMap["unpackedFloat"] as? Array<Float> {
                    var jsonArrayUnpackedFloat:Array<Float> = []
                    for oneValueUnpackedFloat in jsonValueUnpackedFloat {
                        jsonArrayUnpackedFloat.append(Float(oneValueUnpackedFloat))
                    }
                    resultDecodedBuilder.unpackedFloat = jsonArrayUnpackedFloat
                }
                if let jsonValueUnpackedDouble = jsonMap["unpackedDouble"] as? Array<Double> {
                    var jsonArrayUnpackedDouble:Array<Double> = []
                    for oneValueUnpackedDouble in jsonValueUnpackedDouble {
                        jsonArrayUnpackedDouble.append(Double(oneValueUnpackedDouble))
                    }
                    resultDecodedBuilder.unpackedDouble = jsonArrayUnpackedDouble
                }
                if let jsonValueUnpackedBool = jsonMap["unpackedBool"] as? Array<Bool> {
                    var jsonArrayUnpackedBool:Array<Bool> = []
                    for oneValueUnpackedBool in jsonValueUnpackedBool {
                        jsonArrayUnpackedBool.append(oneValueUnpackedBool)
                    }
                    resultDecodedBuilder.unpackedBool = jsonArrayUnpackedBool
                }
                if let jsonValueUnpackedEnum = jsonMap["unpackedEnum"] as? Array<String> {
                    var jsonArrayUnpackedEnum:Array<ProtobufUnittest.ForeignEnum> = []
                    for oneValueUnpackedEnum in jsonValueUnpackedEnum {
                        let enumFromStringUnpackedEnum = try ProtobufUnittest.ForeignEnum.fromString(oneValueUnpackedEnum)
                        jsonArrayUnpackedEnum.append(enumFromStringUnpackedEnum)
                    }
                    resultDecodedBuilder.unpackedEnum = jsonArrayUnpackedEnum
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.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 ProtobufUnittest.TestUnpackedTypes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestPackedExtensions : ExtendableMessage {
        public typealias BuilderType = ProtobufUnittest.TestPackedExtensions.Builder

        public static func == (lhs: ProtobufUnittest.TestPackedExtensions, rhs: ProtobufUnittest.TestPackedExtensions) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:1, endExclusive:536870912)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            try extensionsAreInitialized()}
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:1, endExclusive:536870912)
            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 += extensionsSerializedSize()
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestPackedExtensions.Builder {
            return ProtobufUnittest.TestPackedExtensions.classBuilder() as! ProtobufUnittest.TestPackedExtensions.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestPackedExtensions.Builder {
            return classBuilder() as! ProtobufUnittest.TestPackedExtensions.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestPackedExtensions.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestPackedExtensions.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestPackedExtensions.Builder {
            return try ProtobufUnittest.TestPackedExtensions.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestPackedExtensions) throws -> ProtobufUnittest.TestPackedExtensions.Builder {
            return try ProtobufUnittest.TestPackedExtensions.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 -> ProtobufUnittest.TestPackedExtensions {
            return try ProtobufUnittest.TestPackedExtensions.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestPackedExtensions {
            return try ProtobufUnittest.TestPackedExtensions.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            output += try getExtensionDescription(startInclusive:1, endExclusive:536870912, indent:indent)
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 1, endExclusive:536870912))
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

        final public class Builder : ExtendableMessageBuilder {
            fileprivate var builderResult:ProtobufUnittest.TestPackedExtensions = ProtobufUnittest.TestPackedExtensions()
            public func getMessage() -> ProtobufUnittest.TestPackedExtensions {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            override public var internalGetResult:ExtendableMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestPackedExtensions.Builder {
                builderResult = ProtobufUnittest.TestPackedExtensions()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestPackedExtensions.Builder {
                return try ProtobufUnittest.TestPackedExtensions.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestPackedExtensions {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestPackedExtensions {
                let returnMe:ProtobufUnittest.TestPackedExtensions = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestPackedExtensions) throws -> ProtobufUnittest.TestPackedExtensions.Builder {
                if other == ProtobufUnittest.TestPackedExtensions() {
                    return self
                }
                try mergeExtensionFields(other: other)
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestPackedExtensions.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestPackedExtensions.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 -> ProtobufUnittest.TestPackedExtensions.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestPackedExtensions.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestPackedExtensions.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 ProtobufUnittest.TestPackedExtensions.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestUnpackedExtensions : ExtendableMessage {
        public typealias BuilderType = ProtobufUnittest.TestUnpackedExtensions.Builder

        public static func == (lhs: ProtobufUnittest.TestUnpackedExtensions, rhs: ProtobufUnittest.TestUnpackedExtensions) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:1, endExclusive:536870912)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            try extensionsAreInitialized()}
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:1, endExclusive:536870912)
            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 += extensionsSerializedSize()
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestUnpackedExtensions.Builder {
            return ProtobufUnittest.TestUnpackedExtensions.classBuilder() as! ProtobufUnittest.TestUnpackedExtensions.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestUnpackedExtensions.Builder {
            return classBuilder() as! ProtobufUnittest.TestUnpackedExtensions.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestUnpackedExtensions.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestUnpackedExtensions.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestUnpackedExtensions.Builder {
            return try ProtobufUnittest.TestUnpackedExtensions.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestUnpackedExtensions) throws -> ProtobufUnittest.TestUnpackedExtensions.Builder {
            return try ProtobufUnittest.TestUnpackedExtensions.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 -> ProtobufUnittest.TestUnpackedExtensions {
            return try ProtobufUnittest.TestUnpackedExtensions.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestUnpackedExtensions {
            return try ProtobufUnittest.TestUnpackedExtensions.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            output += try getExtensionDescription(startInclusive:1, endExclusive:536870912, indent:indent)
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 1, endExclusive:536870912))
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

        final public class Builder : ExtendableMessageBuilder {
            fileprivate var builderResult:ProtobufUnittest.TestUnpackedExtensions = ProtobufUnittest.TestUnpackedExtensions()
            public func getMessage() -> ProtobufUnittest.TestUnpackedExtensions {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            override public var internalGetResult:ExtendableMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestUnpackedExtensions.Builder {
                builderResult = ProtobufUnittest.TestUnpackedExtensions()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestUnpackedExtensions.Builder {
                return try ProtobufUnittest.TestUnpackedExtensions.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestUnpackedExtensions {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestUnpackedExtensions {
                let returnMe:ProtobufUnittest.TestUnpackedExtensions = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestUnpackedExtensions) throws -> ProtobufUnittest.TestUnpackedExtensions.Builder {
                if other == ProtobufUnittest.TestUnpackedExtensions() {
                    return self
                }
                try mergeExtensionFields(other: other)
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestUnpackedExtensions.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestUnpackedExtensions.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 -> ProtobufUnittest.TestUnpackedExtensions.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestUnpackedExtensions.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestUnpackedExtensions.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 ProtobufUnittest.TestUnpackedExtensions.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Used by ExtensionSetTest/DynamicExtensions.  The test actually builds
    /// a set of extensions to TestAllExtensions dynamically, based on the fields
    /// of this message type.
    final public class TestDynamicExtensions : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestDynamicExtensions.Builder

        public static func == (lhs: ProtobufUnittest.TestDynamicExtensions, rhs: ProtobufUnittest.TestDynamicExtensions) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasScalarExtension == rhs.hasScalarExtension) && (!lhs.hasScalarExtension || lhs.scalarExtension == rhs.scalarExtension)
            fieldCheck = fieldCheck && (lhs.hasEnumExtension == rhs.hasEnumExtension) && (!lhs.hasEnumExtension || lhs.enumExtension == rhs.enumExtension)
            fieldCheck = fieldCheck && (lhs.hasDynamicEnumExtension == rhs.hasDynamicEnumExtension) && (!lhs.hasDynamicEnumExtension || lhs.dynamicEnumExtension == rhs.dynamicEnumExtension)
            fieldCheck = fieldCheck && (lhs.hasMessageExtension == rhs.hasMessageExtension) && (!lhs.hasMessageExtension || lhs.messageExtension == rhs.messageExtension)
            fieldCheck = fieldCheck && (lhs.hasDynamicMessageExtension == rhs.hasDynamicMessageExtension) && (!lhs.hasDynamicMessageExtension || lhs.dynamicMessageExtension == rhs.dynamicMessageExtension)
            fieldCheck = fieldCheck && (lhs.repeatedExtension == rhs.repeatedExtension)
            fieldCheck = fieldCheck && (lhs.packedExtension == rhs.packedExtension)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class DynamicMessageType : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder

            public static func == (lhs: ProtobufUnittest.TestDynamicExtensions.DynamicMessageType, rhs: ProtobufUnittest.TestDynamicExtensions.DynamicMessageType) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasDynamicField == rhs.hasDynamicField) && (!lhs.hasDynamicField || lhs.dynamicField == rhs.dynamicField)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var dynamicField:Int32! = nil
            public fileprivate(set) var hasDynamicField:Bool = false

            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasDynamicField {
                    try codedOutputStream.writeInt32(fieldNumber: 2100, value:dynamicField)
                }
                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 hasDynamicField {
                    serialize_size += dynamicField.computeInt32Size(fieldNumber: 2100)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                return ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.classBuilder() as! ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                return classBuilder() as! ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestDynamicExtensions.DynamicMessageType) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasDynamicField {
                    jsonMap["dynamicField"] = Int(dynamicField)
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
                return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
                return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasDynamicField {
                    output += "\(indent) dynamicField: \(String(describing: dynamicField)) \n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasDynamicField {
                        hashCode = (hashCode &* 31) &+ dynamicField.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var dynamicField:Int32 {
                    get {
                        return builderResult.dynamicField
                    }
                    set (value) {
                        builderResult.hasDynamicField = true
                        builderResult.dynamicField = value
                    }
                }
                public var hasDynamicField:Bool {
                    get {
                        return builderResult.hasDynamicField
                    }
                }
                @discardableResult
                public func setDynamicField(_ value:Int32) -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                    self.dynamicField = value
                    return self
                }
                @discardableResult
                public func clearDynamicField() -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder{
                    builderResult.hasDynamicField = false
                    builderResult.dynamicField = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                    builderResult = ProtobufUnittest.TestDynamicExtensions.DynamicMessageType()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                    return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
                    let returnMe:ProtobufUnittest.TestDynamicExtensions.DynamicMessageType = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestDynamicExtensions.DynamicMessageType) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                    if other == ProtobufUnittest.TestDynamicExtensions.DynamicMessageType() {
                        return self
                    }
                    if other.hasDynamicField {
                        dynamicField = other.dynamicField
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.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 16800:
                            dynamicField = 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 -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder()
                    if let jsonValueDynamicField = jsonMap["dynamicField"] as? Int {
                        resultDecodedBuilder.dynamicField = Int32(jsonValueDynamicField)
                    } else if let jsonValueDynamicField = jsonMap["dynamicField"] as? String {
                        resultDecodedBuilder.dynamicField = Int32(jsonValueDynamicField)!
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.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 ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



            //Enum type declaration start 

            public enum DynamicEnumType:Int32, GeneratedEnum {
                case dynamicFoo = 2200
                case dynamicBar = 2201
                case dynamicBaz = 2202
                public func toString() -> String {
                    switch self {
                    case .dynamicFoo: return "DYNAMIC_FOO"
                    case .dynamicBar: return "DYNAMIC_BAR"
                    case .dynamicBaz: return "DYNAMIC_BAZ"
                    }
                }
                public static func fromString(_ str:String) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicEnumType {
                    switch str {
                    case "DYNAMIC_FOO":    return .dynamicFoo
                    case "DYNAMIC_BAR":    return .dynamicBar
                    case "DYNAMIC_BAZ":    return .dynamicBaz
                    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 .dynamicFoo: return ".dynamicFoo"
                    case .dynamicBar: return ".dynamicBar"
                    case .dynamicBaz: return ".dynamicBaz"
                    }
                }
                public var hashValue:Int {
                    return self.rawValue.hashValue
                }
                public static func ==(lhs:DynamicEnumType, rhs:DynamicEnumType) -> Bool {
                    return lhs.hashValue == rhs.hashValue
                }
            }

            //Enum type declaration end 

        public fileprivate(set) var scalarExtension:UInt32! = nil
        public fileprivate(set) var hasScalarExtension:Bool = false

        public fileprivate(set) var enumExtension:ProtobufUnittest.ForeignEnum = ProtobufUnittest.ForeignEnum.foreignFoo
        public fileprivate(set) var hasEnumExtension:Bool = false
        public fileprivate(set) var dynamicEnumExtension:ProtobufUnittest.TestDynamicExtensions.DynamicEnumType = ProtobufUnittest.TestDynamicExtensions.DynamicEnumType.dynamicFoo
        public fileprivate(set) var hasDynamicEnumExtension:Bool = false
        public fileprivate(set) var messageExtension:ProtobufUnittest.ForeignMessage!
        public fileprivate(set) var hasMessageExtension:Bool = false
        public fileprivate(set) var dynamicMessageExtension:ProtobufUnittest.TestDynamicExtensions.DynamicMessageType!
        public fileprivate(set) var hasDynamicMessageExtension:Bool = false
        public fileprivate(set) var repeatedExtension:Array<String> = Array<String>()
        public fileprivate(set) var packedExtension:Array<Int32> = Array<Int32>()
        private var packedExtensionMemoizedSerializedSize:Int32 = -1
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasScalarExtension {
                try codedOutputStream.writeFixed32(fieldNumber: 2000, value:scalarExtension)
            }
            if hasEnumExtension {
                try codedOutputStream.writeEnum(fieldNumber: 2001, value:enumExtension.rawValue)
            }
            if hasDynamicEnumExtension {
                try codedOutputStream.writeEnum(fieldNumber: 2002, value:dynamicEnumExtension.rawValue)
            }
            if hasMessageExtension {
                try codedOutputStream.writeMessage(fieldNumber: 2003, value:messageExtension)
            }
            if hasDynamicMessageExtension {
                try codedOutputStream.writeMessage(fieldNumber: 2004, value:dynamicMessageExtension)
            }
            if !repeatedExtension.isEmpty {
                for oneValuerepeatedExtension in repeatedExtension {
                    try codedOutputStream.writeString(fieldNumber: 2005, value:oneValuerepeatedExtension)
                }
            }
            if !packedExtension.isEmpty {
                try codedOutputStream.writeRawVarint32(value: 16050)
                try codedOutputStream.writeRawVarint32(value: packedExtensionMemoizedSerializedSize)
                for oneValuepackedExtension in packedExtension {
                    try codedOutputStream.writeSInt32NoTag(value: oneValuepackedExtension)
                }
            }
            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 hasScalarExtension {
                serialize_size += scalarExtension.computeFixed32Size(fieldNumber: 2000)
            }
            if (hasEnumExtension) {
                serialize_size += enumExtension.rawValue.computeEnumSize(fieldNumber: 2001)
            }
            if (hasDynamicEnumExtension) {
                serialize_size += dynamicEnumExtension.rawValue.computeEnumSize(fieldNumber: 2002)
            }
            if hasMessageExtension {
                if let varSizemessageExtension = messageExtension?.computeMessageSize(fieldNumber: 2003) {
                    serialize_size += varSizemessageExtension
                }
            }
            if hasDynamicMessageExtension {
                if let varSizedynamicMessageExtension = dynamicMessageExtension?.computeMessageSize(fieldNumber: 2004) {
                    serialize_size += varSizedynamicMessageExtension
                }
            }
            var dataSizeRepeatedExtension:Int32 = 0
            for oneValuerepeatedExtension in repeatedExtension {
                dataSizeRepeatedExtension += oneValuerepeatedExtension.computeStringSizeNoTag()
            }
            serialize_size += dataSizeRepeatedExtension
            serialize_size += 2 * Int32(repeatedExtension.count)
            var dataSizePackedExtension:Int32 = 0
            for oneValuepackedExtension in packedExtension {
                dataSizePackedExtension += oneValuepackedExtension.computeSInt32SizeNoTag()
            }
            serialize_size += dataSizePackedExtension
            if !packedExtension.isEmpty {
                serialize_size += 2
                serialize_size += dataSizePackedExtension.computeInt32SizeNoTag()
            }
            packedExtensionMemoizedSerializedSize = dataSizePackedExtension
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestDynamicExtensions.Builder {
            return ProtobufUnittest.TestDynamicExtensions.classBuilder() as! ProtobufUnittest.TestDynamicExtensions.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestDynamicExtensions.Builder {
            return classBuilder() as! ProtobufUnittest.TestDynamicExtensions.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestDynamicExtensions.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestDynamicExtensions.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestDynamicExtensions.Builder {
            return try ProtobufUnittest.TestDynamicExtensions.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestDynamicExtensions) throws -> ProtobufUnittest.TestDynamicExtensions.Builder {
            return try ProtobufUnittest.TestDynamicExtensions.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasScalarExtension {
                jsonMap["scalarExtension"] = UInt(scalarExtension)
            }
            if hasEnumExtension {
                jsonMap["enumExtension"] = enumExtension.toString()
            }
            if hasDynamicEnumExtension {
                jsonMap["dynamicEnumExtension"] = dynamicEnumExtension.toString()
            }
            if hasMessageExtension {
                jsonMap["messageExtension"] = try messageExtension.encode()
            }
            if hasDynamicMessageExtension {
                jsonMap["dynamicMessageExtension"] = try dynamicMessageExtension.encode()
            }
            if !repeatedExtension.isEmpty {
                var jsonArrayRepeatedExtension:Array<String> = []
                for oneValueRepeatedExtension in repeatedExtension {
                    jsonArrayRepeatedExtension.append(oneValueRepeatedExtension)
                }
                jsonMap["repeatedExtension"] = jsonArrayRepeatedExtension
            }
            if !packedExtension.isEmpty {
                var jsonArrayPackedExtension:Array<Int> = []
                for oneValuePackedExtension in packedExtension {
                    jsonArrayPackedExtension.append(Int(oneValuePackedExtension))
                }
                jsonMap["packedExtension"] = jsonArrayPackedExtension
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestDynamicExtensions {
            return try ProtobufUnittest.TestDynamicExtensions.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDynamicExtensions {
            return try ProtobufUnittest.TestDynamicExtensions.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasScalarExtension {
                output += "\(indent) scalarExtension: \(String(describing: scalarExtension)) \n"
            }
            if (hasEnumExtension) {
                output += "\(indent) enumExtension: \(enumExtension.description)\n"
            }
            if (hasDynamicEnumExtension) {
                output += "\(indent) dynamicEnumExtension: \(dynamicEnumExtension.description)\n"
            }
            if hasMessageExtension {
                output += "\(indent) messageExtension {\n"
                if let outDescMessageExtension = messageExtension {
                    output += try outDescMessageExtension.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasDynamicMessageExtension {
                output += "\(indent) dynamicMessageExtension {\n"
                if let outDescDynamicMessageExtension = dynamicMessageExtension {
                    output += try outDescDynamicMessageExtension.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            var repeatedExtensionElementIndex:Int = 0
            for oneValueRepeatedExtension in repeatedExtension  {
                output += "\(indent) repeatedExtension[\(repeatedExtensionElementIndex)]: \(oneValueRepeatedExtension)\n"
                repeatedExtensionElementIndex += 1
            }
            var packedExtensionElementIndex:Int = 0
            for oneValuePackedExtension in packedExtension  {
                output += "\(indent) packedExtension[\(packedExtensionElementIndex)]: \(oneValuePackedExtension)\n"
                packedExtensionElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasScalarExtension {
                    hashCode = (hashCode &* 31) &+ scalarExtension.hashValue
                }
                if hasEnumExtension {
                     hashCode = (hashCode &* 31) &+ enumExtension.hashValue
                }
                if hasDynamicEnumExtension {
                     hashCode = (hashCode &* 31) &+ dynamicEnumExtension.hashValue
                }
                if hasMessageExtension {
                    if let hashValuemessageExtension = messageExtension?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuemessageExtension
                    }
                }
                if hasDynamicMessageExtension {
                    if let hashValuedynamicMessageExtension = dynamicMessageExtension?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuedynamicMessageExtension
                    }
                }
                for oneValueRepeatedExtension in repeatedExtension {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedExtension.hashValue
                }
                for oneValuePackedExtension in packedExtension {
                    hashCode = (hashCode &* 31) &+ oneValuePackedExtension.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var scalarExtension:UInt32 {
                get {
                    return builderResult.scalarExtension
                }
                set (value) {
                    builderResult.hasScalarExtension = true
                    builderResult.scalarExtension = value
                }
            }
            public var hasScalarExtension:Bool {
                get {
                    return builderResult.hasScalarExtension
                }
            }
            @discardableResult
            public func setScalarExtension(_ value:UInt32) -> ProtobufUnittest.TestDynamicExtensions.Builder {
                self.scalarExtension = value
                return self
            }
            @discardableResult
            public func clearScalarExtension() -> ProtobufUnittest.TestDynamicExtensions.Builder{
                builderResult.hasScalarExtension = false
                builderResult.scalarExtension = nil
                return self
            }
                public var enumExtension:ProtobufUnittest.ForeignEnum {
                    get {
                        return builderResult.enumExtension
                    }
                    set (value) {
                        builderResult.hasEnumExtension = true
                        builderResult.enumExtension = value
                    }
                }
                public var hasEnumExtension:Bool{
                    get {
                        return builderResult.hasEnumExtension
                    }
                }
            @discardableResult
                public func setEnumExtension(_ value:ProtobufUnittest.ForeignEnum) -> ProtobufUnittest.TestDynamicExtensions.Builder {
                  self.enumExtension = value
                  return self
                }
            @discardableResult
                public func clearEnumExtension() -> ProtobufUnittest.TestDynamicExtensions.Builder {
                   builderResult.hasEnumExtension = false
                   builderResult.enumExtension = .foreignFoo
                   return self
                }
                public var dynamicEnumExtension:ProtobufUnittest.TestDynamicExtensions.DynamicEnumType {
                    get {
                        return builderResult.dynamicEnumExtension
                    }
                    set (value) {
                        builderResult.hasDynamicEnumExtension = true
                        builderResult.dynamicEnumExtension = value
                    }
                }
                public var hasDynamicEnumExtension:Bool{
                    get {
                        return builderResult.hasDynamicEnumExtension
                    }
                }
            @discardableResult
                public func setDynamicEnumExtension(_ value:ProtobufUnittest.TestDynamicExtensions.DynamicEnumType) -> ProtobufUnittest.TestDynamicExtensions.Builder {
                  self.dynamicEnumExtension = value
                  return self
                }
            @discardableResult
                public func clearDynamicEnumExtension() -> ProtobufUnittest.TestDynamicExtensions.Builder {
                   builderResult.hasDynamicEnumExtension = false
                   builderResult.dynamicEnumExtension = .dynamicFoo
                   return self
                }
            public var messageExtension:ProtobufUnittest.ForeignMessage! {
                get {
                    if messageExtensionBuilder_ != nil {
                        builderResult.messageExtension = messageExtensionBuilder_.getMessage()
                    }
                    return builderResult.messageExtension
                }
                set (value) {
                    builderResult.hasMessageExtension = value != nil
                    builderResult.messageExtension = value
                }
            }
            public var hasMessageExtension:Bool {
                get {
                    return builderResult.hasMessageExtension
                }
            }
            fileprivate var messageExtensionBuilder_:ProtobufUnittest.ForeignMessage.Builder! {
                didSet {
                    builderResult.hasMessageExtension = true
                }
            }
            public func getMessageExtensionBuilder() -> ProtobufUnittest.ForeignMessage.Builder {
                if messageExtensionBuilder_ == nil {
                    messageExtensionBuilder_ = ProtobufUnittest.ForeignMessage.Builder()
                    builderResult.messageExtension = messageExtensionBuilder_.getMessage()
                    if messageExtension != nil {
                        try! messageExtensionBuilder_.mergeFrom(other: messageExtension)
                    }
                }
                return messageExtensionBuilder_
            }
            @discardableResult
            public func setMessageExtension(_ value:ProtobufUnittest.ForeignMessage!) -> ProtobufUnittest.TestDynamicExtensions.Builder {
                self.messageExtension = value
                return self
            }
            @discardableResult
            public func mergeMessageExtension(value:ProtobufUnittest.ForeignMessage) throws -> ProtobufUnittest.TestDynamicExtensions.Builder {
                if builderResult.hasMessageExtension {
                    builderResult.messageExtension = try ProtobufUnittest.ForeignMessage.builderWithPrototype(prototype:builderResult.messageExtension).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.messageExtension = value
                }
                builderResult.hasMessageExtension = true
                return self
            }
            @discardableResult
            public func clearMessageExtension() -> ProtobufUnittest.TestDynamicExtensions.Builder {
                messageExtensionBuilder_ = nil
                builderResult.hasMessageExtension = false
                builderResult.messageExtension = nil
                return self
            }
            public var dynamicMessageExtension:ProtobufUnittest.TestDynamicExtensions.DynamicMessageType! {
                get {
                    if dynamicMessageExtensionBuilder_ != nil {
                        builderResult.dynamicMessageExtension = dynamicMessageExtensionBuilder_.getMessage()
                    }
                    return builderResult.dynamicMessageExtension
                }
                set (value) {
                    builderResult.hasDynamicMessageExtension = value != nil
                    builderResult.dynamicMessageExtension = value
                }
            }
            public var hasDynamicMessageExtension:Bool {
                get {
                    return builderResult.hasDynamicMessageExtension
                }
            }
            fileprivate var dynamicMessageExtensionBuilder_:ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder! {
                didSet {
                    builderResult.hasDynamicMessageExtension = true
                }
            }
            public func getDynamicMessageExtensionBuilder() -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder {
                if dynamicMessageExtensionBuilder_ == nil {
                    dynamicMessageExtensionBuilder_ = ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder()
                    builderResult.dynamicMessageExtension = dynamicMessageExtensionBuilder_.getMessage()
                    if dynamicMessageExtension != nil {
                        try! dynamicMessageExtensionBuilder_.mergeFrom(other: dynamicMessageExtension)
                    }
                }
                return dynamicMessageExtensionBuilder_
            }
            @discardableResult
            public func setDynamicMessageExtension(_ value:ProtobufUnittest.TestDynamicExtensions.DynamicMessageType!) -> ProtobufUnittest.TestDynamicExtensions.Builder {
                self.dynamicMessageExtension = value
                return self
            }
            @discardableResult
            public func mergeDynamicMessageExtension(value:ProtobufUnittest.TestDynamicExtensions.DynamicMessageType) throws -> ProtobufUnittest.TestDynamicExtensions.Builder {
                if builderResult.hasDynamicMessageExtension {
                    builderResult.dynamicMessageExtension = try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.builderWithPrototype(prototype:builderResult.dynamicMessageExtension).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.dynamicMessageExtension = value
                }
                builderResult.hasDynamicMessageExtension = true
                return self
            }
            @discardableResult
            public func clearDynamicMessageExtension() -> ProtobufUnittest.TestDynamicExtensions.Builder {
                dynamicMessageExtensionBuilder_ = nil
                builderResult.hasDynamicMessageExtension = false
                builderResult.dynamicMessageExtension = nil
                return self
            }
            public var repeatedExtension:Array<String> {
                get {
                    return builderResult.repeatedExtension
                }
                set (array) {
                    builderResult.repeatedExtension = array
                }
            }
            @discardableResult
            public func setRepeatedExtension(_ value:Array<String>) -> ProtobufUnittest.TestDynamicExtensions.Builder {
                self.repeatedExtension = value
                return self
            }
            @discardableResult
            public func clearRepeatedExtension() -> ProtobufUnittest.TestDynamicExtensions.Builder {
                builderResult.repeatedExtension.removeAll(keepingCapacity: false)
                return self
            }
            public var packedExtension:Array<Int32> {
                get {
                    return builderResult.packedExtension
                }
                set (array) {
                    builderResult.packedExtension = array
                }
            }
            @discardableResult
            public func setPackedExtension(_ value:Array<Int32>) -> ProtobufUnittest.TestDynamicExtensions.Builder {
                self.packedExtension = value
                return self
            }
            @discardableResult
            public func clearPackedExtension() -> ProtobufUnittest.TestDynamicExtensions.Builder {
                builderResult.packedExtension.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestDynamicExtensions.Builder {
                builderResult = ProtobufUnittest.TestDynamicExtensions()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestDynamicExtensions.Builder {
                return try ProtobufUnittest.TestDynamicExtensions.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestDynamicExtensions {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestDynamicExtensions {
                let returnMe:ProtobufUnittest.TestDynamicExtensions = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestDynamicExtensions) throws -> ProtobufUnittest.TestDynamicExtensions.Builder {
                if other == ProtobufUnittest.TestDynamicExtensions() {
                    return self
                }
                if other.hasScalarExtension {
                    scalarExtension = other.scalarExtension
                }
                if other.hasEnumExtension {
                    enumExtension = other.enumExtension
                }
                if other.hasDynamicEnumExtension {
                    dynamicEnumExtension = other.dynamicEnumExtension
                }
                if (other.hasMessageExtension) {
                    try mergeMessageExtension(value: other.messageExtension)
                }
                if (other.hasDynamicMessageExtension) {
                    try mergeDynamicMessageExtension(value: other.dynamicMessageExtension)
                }
                if !other.repeatedExtension.isEmpty {
                    builderResult.repeatedExtension += other.repeatedExtension
                }
                if !other.packedExtension.isEmpty {
                    builderResult.packedExtension += other.packedExtension
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDynamicExtensions.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDynamicExtensions.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 16005:
                        scalarExtension = try codedInputStream.readFixed32()

                    case 16008:
                        let valueIntenumExtension = try codedInputStream.readEnum()
                        if let enumsenumExtension = ProtobufUnittest.ForeignEnum(rawValue:valueIntenumExtension){
                            enumExtension = enumsenumExtension
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 2001, value:Int64(valueIntenumExtension))
                        }

                    case 16016:
                        let valueIntdynamicEnumExtension = try codedInputStream.readEnum()
                        if let enumsdynamicEnumExtension = ProtobufUnittest.TestDynamicExtensions.DynamicEnumType(rawValue:valueIntdynamicEnumExtension){
                            dynamicEnumExtension = enumsdynamicEnumExtension
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 2002, value:Int64(valueIntdynamicEnumExtension))
                        }

                    case 16026:
                        let subBuilder:ProtobufUnittest.ForeignMessage.Builder = ProtobufUnittest.ForeignMessage.Builder()
                        if hasMessageExtension {
                            try subBuilder.mergeFrom(other: messageExtension)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        messageExtension = subBuilder.buildPartial()

                    case 16034:
                        let subBuilder:ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder = ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder()
                        if hasDynamicMessageExtension {
                            try subBuilder.mergeFrom(other: dynamicMessageExtension)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        dynamicMessageExtension = subBuilder.buildPartial()

                    case 16042:
                        repeatedExtension += [try codedInputStream.readString()]

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

                    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 -> ProtobufUnittest.TestDynamicExtensions.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestDynamicExtensions.Builder()
                if let jsonValueScalarExtension = jsonMap["scalarExtension"] as? UInt {
                    resultDecodedBuilder.scalarExtension = UInt32(jsonValueScalarExtension)
                } else if let jsonValueScalarExtension = jsonMap["scalarExtension"] as? String {
                    resultDecodedBuilder.scalarExtension = UInt32(jsonValueScalarExtension)!
                }
                if let jsonValueEnumExtension = jsonMap["enumExtension"] as? String {
                    resultDecodedBuilder.enumExtension = try ProtobufUnittest.ForeignEnum.fromString(jsonValueEnumExtension)
                }
                if let jsonValueDynamicEnumExtension = jsonMap["dynamicEnumExtension"] as? String {
                    resultDecodedBuilder.dynamicEnumExtension = try ProtobufUnittest.TestDynamicExtensions.DynamicEnumType.fromString(jsonValueDynamicEnumExtension)
                }
                if let jsonValueMessageExtension = jsonMap["messageExtension"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.messageExtension = try ProtobufUnittest.ForeignMessage.Builder.decodeToBuilder(jsonMap:jsonValueMessageExtension).build()

                }
                if let jsonValueDynamicMessageExtension = jsonMap["dynamicMessageExtension"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.dynamicMessageExtension = try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder.decodeToBuilder(jsonMap:jsonValueDynamicMessageExtension).build()

                }
                if let jsonValueRepeatedExtension = jsonMap["repeatedExtension"] as? Array<String> {
                    var jsonArrayRepeatedExtension:Array<String> = []
                    for oneValueRepeatedExtension in jsonValueRepeatedExtension {
                        jsonArrayRepeatedExtension.append(oneValueRepeatedExtension)
                    }
                    resultDecodedBuilder.repeatedExtension = jsonArrayRepeatedExtension
                }
                if let jsonValuePackedExtension = jsonMap["packedExtension"] as? Array<Int> {
                    var jsonArrayPackedExtension:Array<Int32> = []
                    for oneValuePackedExtension in jsonValuePackedExtension {
                        jsonArrayPackedExtension.append(Int32(oneValuePackedExtension))
                    }
                    resultDecodedBuilder.packedExtension = jsonArrayPackedExtension
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestDynamicExtensions.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 ProtobufUnittest.TestDynamicExtensions.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestRepeatedScalarDifferentTagSizes : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder

        public static func == (lhs: ProtobufUnittest.TestRepeatedScalarDifferentTagSizes, rhs: ProtobufUnittest.TestRepeatedScalarDifferentTagSizes) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.repeatedFixed32 == rhs.repeatedFixed32)
            fieldCheck = fieldCheck && (lhs.repeatedInt32 == rhs.repeatedInt32)
            fieldCheck = fieldCheck && (lhs.repeatedFixed64 == rhs.repeatedFixed64)
            fieldCheck = fieldCheck && (lhs.repeatedInt64 == rhs.repeatedInt64)
            fieldCheck = fieldCheck && (lhs.repeatedFloat == rhs.repeatedFloat)
            fieldCheck = fieldCheck && (lhs.repeatedUint64 == rhs.repeatedUint64)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        /// Parsing repeated fixed size values used to fail. This message needs to be
        /// used in order to get a tag of the right size; all of the repeated fields
        /// in TestAllTypes didn't trigger the check.
        public fileprivate(set) var repeatedFixed32:Array<UInt32> = Array<UInt32>()
        /// Check for a varint type, just for good measure.
        public fileprivate(set) var repeatedInt32:Array<Int32> = Array<Int32>()
        /// These have two-byte tags.
        public fileprivate(set) var repeatedFixed64:Array<UInt64> = Array<UInt64>()
        public fileprivate(set) var repeatedInt64:Array<Int64> = Array<Int64>()
        /// Three byte tags.
        public fileprivate(set) var repeatedFloat:Array<Float> = Array<Float>()
        public fileprivate(set) var repeatedUint64:Array<UInt64> = Array<UInt64>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if !repeatedFixed32.isEmpty {
                for oneValuerepeatedFixed32 in repeatedFixed32 {
                    try codedOutputStream.writeFixed32(fieldNumber: 12, value:oneValuerepeatedFixed32)
                }
            }
            if !repeatedInt32.isEmpty {
                for oneValuerepeatedInt32 in repeatedInt32 {
                    try codedOutputStream.writeInt32(fieldNumber: 13, value:oneValuerepeatedInt32)
                }
            }
            if !repeatedFixed64.isEmpty {
                for oneValuerepeatedFixed64 in repeatedFixed64 {
                    try codedOutputStream.writeFixed64(fieldNumber: 2046, value:oneValuerepeatedFixed64)
                }
            }
            if !repeatedInt64.isEmpty {
                for oneValuerepeatedInt64 in repeatedInt64 {
                    try codedOutputStream.writeInt64(fieldNumber: 2047, value:oneValuerepeatedInt64)
                }
            }
            if !repeatedFloat.isEmpty {
                for oneValuerepeatedFloat in repeatedFloat {
                    try codedOutputStream.writeFloat(fieldNumber: 262142, value:oneValuerepeatedFloat)
                }
            }
            if !repeatedUint64.isEmpty {
                for oneValuerepeatedUint64 in repeatedUint64 {
                    try codedOutputStream.writeUInt64(fieldNumber: 262143, value:oneValuerepeatedUint64)
                }
            }
            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 dataSizeRepeatedFixed32:Int32 = 0
            dataSizeRepeatedFixed32 = 4 * Int32(repeatedFixed32.count)
            serialize_size += dataSizeRepeatedFixed32
            serialize_size += 1 * Int32(repeatedFixed32.count)
            var dataSizeRepeatedInt32:Int32 = 0
            for oneValuerepeatedInt32 in repeatedInt32 {
                dataSizeRepeatedInt32 += oneValuerepeatedInt32.computeInt32SizeNoTag()
            }
            serialize_size += dataSizeRepeatedInt32
            serialize_size += 1 * Int32(repeatedInt32.count)
            var dataSizeRepeatedFixed64:Int32 = 0
            dataSizeRepeatedFixed64 = 8 * Int32(repeatedFixed64.count)
            serialize_size += dataSizeRepeatedFixed64
            serialize_size += 2 * Int32(repeatedFixed64.count)
            var dataSizeRepeatedInt64:Int32 = 0
            for oneValuerepeatedInt64 in repeatedInt64 {
                dataSizeRepeatedInt64 += oneValuerepeatedInt64.computeInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedInt64
            serialize_size += 2 * Int32(repeatedInt64.count)
            var dataSizeRepeatedFloat:Int32 = 0
            dataSizeRepeatedFloat = 4 * Int32(repeatedFloat.count)
            serialize_size += dataSizeRepeatedFloat
            serialize_size += 3 * Int32(repeatedFloat.count)
            var dataSizeRepeatedUint64:Int32 = 0
            for oneValuerepeatedUint64 in repeatedUint64 {
                dataSizeRepeatedUint64 += oneValuerepeatedUint64.computeUInt64SizeNoTag()
            }
            serialize_size += dataSizeRepeatedUint64
            serialize_size += 3 * Int32(repeatedUint64.count)
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
            return ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.classBuilder() as! ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
            return classBuilder() as! ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
            return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestRepeatedScalarDifferentTagSizes) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
            return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if !repeatedFixed32.isEmpty {
                var jsonArrayRepeatedFixed32:Array<UInt> = []
                for oneValueRepeatedFixed32 in repeatedFixed32 {
                    jsonArrayRepeatedFixed32.append(UInt(oneValueRepeatedFixed32))
                }
                jsonMap["repeatedFixed32"] = jsonArrayRepeatedFixed32
            }
            if !repeatedInt32.isEmpty {
                var jsonArrayRepeatedInt32:Array<Int> = []
                for oneValueRepeatedInt32 in repeatedInt32 {
                    jsonArrayRepeatedInt32.append(Int(oneValueRepeatedInt32))
                }
                jsonMap["repeatedInt32"] = jsonArrayRepeatedInt32
            }
            if !repeatedFixed64.isEmpty {
                var jsonArrayRepeatedFixed64:Array<String> = []
                for oneValueRepeatedFixed64 in repeatedFixed64 {
                    jsonArrayRepeatedFixed64.append("\(oneValueRepeatedFixed64)")
                }
                jsonMap["repeatedFixed64"] = jsonArrayRepeatedFixed64
            }
            if !repeatedInt64.isEmpty {
                var jsonArrayRepeatedInt64:Array<String> = []
                for oneValueRepeatedInt64 in repeatedInt64 {
                    jsonArrayRepeatedInt64.append("\(oneValueRepeatedInt64)")
                }
                jsonMap["repeatedInt64"] = jsonArrayRepeatedInt64
            }
            if !repeatedFloat.isEmpty {
                var jsonArrayRepeatedFloat:Array<Float> = []
                for oneValueRepeatedFloat in repeatedFloat {
                    jsonArrayRepeatedFloat.append(Float(oneValueRepeatedFloat))
                }
                jsonMap["repeatedFloat"] = jsonArrayRepeatedFloat
            }
            if !repeatedUint64.isEmpty {
                var jsonArrayRepeatedUint64:Array<String> = []
                for oneValueRepeatedUint64 in repeatedUint64 {
                    jsonArrayRepeatedUint64.append("\(oneValueRepeatedUint64)")
                }
                jsonMap["repeatedUint64"] = jsonArrayRepeatedUint64
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
            return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
            return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            var repeatedFixed32ElementIndex:Int = 0
            for oneValueRepeatedFixed32 in repeatedFixed32  {
                output += "\(indent) repeatedFixed32[\(repeatedFixed32ElementIndex)]: \(oneValueRepeatedFixed32)\n"
                repeatedFixed32ElementIndex += 1
            }
            var repeatedInt32ElementIndex:Int = 0
            for oneValueRepeatedInt32 in repeatedInt32  {
                output += "\(indent) repeatedInt32[\(repeatedInt32ElementIndex)]: \(oneValueRepeatedInt32)\n"
                repeatedInt32ElementIndex += 1
            }
            var repeatedFixed64ElementIndex:Int = 0
            for oneValueRepeatedFixed64 in repeatedFixed64  {
                output += "\(indent) repeatedFixed64[\(repeatedFixed64ElementIndex)]: \(oneValueRepeatedFixed64)\n"
                repeatedFixed64ElementIndex += 1
            }
            var repeatedInt64ElementIndex:Int = 0
            for oneValueRepeatedInt64 in repeatedInt64  {
                output += "\(indent) repeatedInt64[\(repeatedInt64ElementIndex)]: \(oneValueRepeatedInt64)\n"
                repeatedInt64ElementIndex += 1
            }
            var repeatedFloatElementIndex:Int = 0
            for oneValueRepeatedFloat in repeatedFloat  {
                output += "\(indent) repeatedFloat[\(repeatedFloatElementIndex)]: \(oneValueRepeatedFloat)\n"
                repeatedFloatElementIndex += 1
            }
            var repeatedUint64ElementIndex:Int = 0
            for oneValueRepeatedUint64 in repeatedUint64  {
                output += "\(indent) repeatedUint64[\(repeatedUint64ElementIndex)]: \(oneValueRepeatedUint64)\n"
                repeatedUint64ElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                for oneValueRepeatedFixed32 in repeatedFixed32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedFixed32.hashValue
                }
                for oneValueRepeatedInt32 in repeatedInt32 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedInt32.hashValue
                }
                for oneValueRepeatedFixed64 in repeatedFixed64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedFixed64.hashValue
                }
                for oneValueRepeatedInt64 in repeatedInt64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedInt64.hashValue
                }
                for oneValueRepeatedFloat in repeatedFloat {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedFloat.hashValue
                }
                for oneValueRepeatedUint64 in repeatedUint64 {
                    hashCode = (hashCode &* 31) &+ oneValueRepeatedUint64.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// Parsing repeated fixed size values used to fail. This message needs to be
            /// used in order to get a tag of the right size; all of the repeated fields
            /// in TestAllTypes didn't trigger the check.
            public var repeatedFixed32:Array<UInt32> {
                get {
                    return builderResult.repeatedFixed32
                }
                set (array) {
                    builderResult.repeatedFixed32 = array
                }
            }
            @discardableResult
            public func setRepeatedFixed32(_ value:Array<UInt32>) -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                self.repeatedFixed32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedFixed32() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                builderResult.repeatedFixed32.removeAll(keepingCapacity: false)
                return self
            }
            /// Check for a varint type, just for good measure.
            public var repeatedInt32:Array<Int32> {
                get {
                    return builderResult.repeatedInt32
                }
                set (array) {
                    builderResult.repeatedInt32 = array
                }
            }
            @discardableResult
            public func setRepeatedInt32(_ value:Array<Int32>) -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                self.repeatedInt32 = value
                return self
            }
            @discardableResult
            public func clearRepeatedInt32() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                builderResult.repeatedInt32.removeAll(keepingCapacity: false)
                return self
            }
            /// These have two-byte tags.
            public var repeatedFixed64:Array<UInt64> {
                get {
                    return builderResult.repeatedFixed64
                }
                set (array) {
                    builderResult.repeatedFixed64 = array
                }
            }
            @discardableResult
            public func setRepeatedFixed64(_ value:Array<UInt64>) -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                self.repeatedFixed64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedFixed64() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                builderResult.repeatedFixed64.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>) -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                self.repeatedInt64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedInt64() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                builderResult.repeatedInt64.removeAll(keepingCapacity: false)
                return self
            }
            /// Three byte tags.
            public var repeatedFloat:Array<Float> {
                get {
                    return builderResult.repeatedFloat
                }
                set (array) {
                    builderResult.repeatedFloat = array
                }
            }
            @discardableResult
            public func setRepeatedFloat(_ value:Array<Float>) -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                self.repeatedFloat = value
                return self
            }
            @discardableResult
            public func clearRepeatedFloat() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                builderResult.repeatedFloat.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>) -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                self.repeatedUint64 = value
                return self
            }
            @discardableResult
            public func clearRepeatedUint64() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                builderResult.repeatedUint64.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                builderResult = ProtobufUnittest.TestRepeatedScalarDifferentTagSizes()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
                let returnMe:ProtobufUnittest.TestRepeatedScalarDifferentTagSizes = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestRepeatedScalarDifferentTagSizes) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                if other == ProtobufUnittest.TestRepeatedScalarDifferentTagSizes() {
                    return self
                }
                if !other.repeatedFixed32.isEmpty {
                    builderResult.repeatedFixed32 += other.repeatedFixed32
                }
                if !other.repeatedInt32.isEmpty {
                    builderResult.repeatedInt32 += other.repeatedInt32
                }
                if !other.repeatedFixed64.isEmpty {
                    builderResult.repeatedFixed64 += other.repeatedFixed64
                }
                if !other.repeatedInt64.isEmpty {
                    builderResult.repeatedInt64 += other.repeatedInt64
                }
                if !other.repeatedFloat.isEmpty {
                    builderResult.repeatedFloat += other.repeatedFloat
                }
                if !other.repeatedUint64.isEmpty {
                    builderResult.repeatedUint64 += other.repeatedUint64
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.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 101:
                        repeatedFixed32 += [try codedInputStream.readFixed32()]

                    case 104:
                        repeatedInt32 += [try codedInputStream.readInt32()]

                    case 16369:
                        repeatedFixed64 += [try codedInputStream.readFixed64()]

                    case 16376:
                        repeatedInt64 += [try codedInputStream.readInt64()]

                    case 2097141:
                        repeatedFloat += [try codedInputStream.readFloat()]

                    case 2097144:
                        repeatedUint64 += [try codedInputStream.readUInt64()]

                    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 -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder()
                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 jsonValueRepeatedInt32 = jsonMap["repeatedInt32"] as? Array<Int> {
                    var jsonArrayRepeatedInt32:Array<Int32> = []
                    for oneValueRepeatedInt32 in jsonValueRepeatedInt32 {
                        jsonArrayRepeatedInt32.append(Int32(oneValueRepeatedInt32))
                    }
                    resultDecodedBuilder.repeatedInt32 = jsonArrayRepeatedInt32
                }
                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 jsonValueRepeatedInt64 = jsonMap["repeatedInt64"] as? Array<String> {
                    var jsonArrayRepeatedInt64:Array<Int64> = []
                    for oneValueRepeatedInt64 in jsonValueRepeatedInt64 {
                        jsonArrayRepeatedInt64.append(Int64(oneValueRepeatedInt64)!)
                    }
                    resultDecodedBuilder.repeatedInt64 = jsonArrayRepeatedInt64
                }
                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 jsonValueRepeatedUint64 = jsonMap["repeatedUint64"] as? Array<String> {
                    var jsonArrayRepeatedUint64:Array<UInt64> = []
                    for oneValueRepeatedUint64 in jsonValueRepeatedUint64 {
                        jsonArrayRepeatedUint64.append(UInt64(oneValueRepeatedUint64)!)
                    }
                    resultDecodedBuilder.repeatedUint64 = jsonArrayRepeatedUint64
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.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 ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test that if an optional or required message/group field appears multiple
    /// times in the input, they need to be merged.
    final public class TestParsingMerge : ExtendableMessage {
        public typealias BuilderType = ProtobufUnittest.TestParsingMerge.Builder

        public static func == (lhs: ProtobufUnittest.TestParsingMerge, rhs: ProtobufUnittest.TestParsingMerge) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasRequiredAllTypes == rhs.hasRequiredAllTypes) && (!lhs.hasRequiredAllTypes || lhs.requiredAllTypes == rhs.requiredAllTypes)
            fieldCheck = fieldCheck && (lhs.hasOptionalAllTypes == rhs.hasOptionalAllTypes) && (!lhs.hasOptionalAllTypes || lhs.optionalAllTypes == rhs.optionalAllTypes)
            fieldCheck = fieldCheck && (lhs.repeatedAllTypes == rhs.repeatedAllTypes)
            fieldCheck = fieldCheck && (lhs.hasOptionalGroup == rhs.hasOptionalGroup) && (!lhs.hasOptionalGroup || lhs.optionalGroup == rhs.optionalGroup)
            fieldCheck = fieldCheck && (lhs.repeatedGroup == rhs.repeatedGroup)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:1000, endExclusive:536870912)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        /// RepeatedFieldsGenerator defines matching field types as TestParsingMerge,
        /// except that all fields are repeated. In the tests, we will serialize the
        /// RepeatedFieldsGenerator to bytes, and parse the bytes to TestParsingMerge.
        /// Repeated fields in RepeatedFieldsGenerator are expected to be merged into
        /// the corresponding required/optional fields in TestParsingMerge.
        final public class RepeatedFieldsGenerator : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder

            public static func == (lhs: ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator, rhs: ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.field1 == rhs.field1)
                fieldCheck = fieldCheck && (lhs.field2 == rhs.field2)
                fieldCheck = fieldCheck && (lhs.field3 == rhs.field3)
                fieldCheck = fieldCheck && (lhs.group1 == rhs.group1)
                fieldCheck = fieldCheck && (lhs.group2 == rhs.group2)
                fieldCheck = fieldCheck && (lhs.ext1 == rhs.ext1)
                fieldCheck = fieldCheck && (lhs.ext2 == rhs.ext2)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }



            //Nested type declaration start

            final public class Group1 : GeneratedMessage {
                public typealias BuilderType = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder

                public static func == (lhs: ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1, rhs: ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1) -> Bool {
                    if lhs === rhs {
                        return true
                    }
                    var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                    fieldCheck = fieldCheck && (lhs.hasField1 == rhs.hasField1) && (!lhs.hasField1 || lhs.field1 == rhs.field1)
                    fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                    return fieldCheck
                }

                public fileprivate(set) var field1:ProtobufUnittest.TestAllTypes!
                public fileprivate(set) var hasField1:Bool = false
                required public init() {
                    super.init()
                }
                override public func isInitialized() throws {
                }
                override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                    if hasField1 {
                        try codedOutputStream.writeMessage(fieldNumber: 11, value:field1)
                    }
                    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 hasField1 {
                        if let varSizefield1 = field1?.computeMessageSize(fieldNumber: 11) {
                            serialize_size += varSizefield1
                        }
                    }
                    serialize_size += unknownFields.serializedSize()
                    memoizedSerializedSize = serialize_size
                    return serialize_size
                }
                public class func getBuilder() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                    return ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.classBuilder() as! ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder
                }
                public func getBuilder() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                    return classBuilder() as! ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder
                }
                override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                    return ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder()
                }
                override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                    return ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder()
                }
                public func toBuilder() throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.builderWithPrototype(prototype:self)
                }
                public class func builderWithPrototype(prototype:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder().mergeFrom(other:prototype)
                }
                override public func encode() throws -> Dictionary<String,Any> {
                    try isInitialized()
                    var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                    if hasField1 {
                        jsonMap["field1"] = try field1.encode()
                    }
                    return jsonMap
                }
                override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder.decodeToBuilder(jsonMap:jsonMap).build()
                }
                override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder.fromJSONToBuilder(data:data, options:options).build()
                }
                override public func getDescription(indent:String) throws -> String {
                    var output = ""
                    if hasField1 {
                        output += "\(indent) field1 {\n"
                        if let outDescField1 = field1 {
                            output += try outDescField1.getDescription(indent: "\(indent)  ")
                        }
                        output += "\(indent) }\n"
                    }
                    output += unknownFields.getDescription(indent: indent)
                    return output
                }
                override public var hashValue:Int {
                    get {
                        var hashCode:Int = 7
                        if hasField1 {
                            if let hashValuefield1 = field1?.hashValue {
                                hashCode = (hashCode &* 31) &+ hashValuefield1
                            }
                        }
                        hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                        return hashCode
                    }
                }


                //Meta information declaration start

                override public class func className() -> String {
                    return "ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1"
                }
                override public func className() -> String {
                    return "ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1"
                }
                //Meta information declaration end

                final public class Builder : GeneratedMessageBuilder {
                    fileprivate var builderResult:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1()
                    public func getMessage() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
                        return builderResult
                    }

                    required override public init () {
                        super.init()
                    }
                    public var field1:ProtobufUnittest.TestAllTypes! {
                        get {
                            if field1Builder_ != nil {
                                builderResult.field1 = field1Builder_.getMessage()
                            }
                            return builderResult.field1
                        }
                        set (value) {
                            builderResult.hasField1 = value != nil
                            builderResult.field1 = value
                        }
                    }
                    public var hasField1:Bool {
                        get {
                            return builderResult.hasField1
                        }
                    }
                    fileprivate var field1Builder_:ProtobufUnittest.TestAllTypes.Builder! {
                        didSet {
                            builderResult.hasField1 = true
                        }
                    }
                    public func getField1Builder() -> ProtobufUnittest.TestAllTypes.Builder {
                        if field1Builder_ == nil {
                            field1Builder_ = ProtobufUnittest.TestAllTypes.Builder()
                            builderResult.field1 = field1Builder_.getMessage()
                            if field1 != nil {
                                try! field1Builder_.mergeFrom(other: field1)
                            }
                        }
                        return field1Builder_
                    }
                    @discardableResult
                    public func setField1(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                        self.field1 = value
                        return self
                    }
                    @discardableResult
                    public func mergeField1(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                        if builderResult.hasField1 {
                            builderResult.field1 = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.field1).mergeFrom(other: value).buildPartial()
                        } else {
                            builderResult.field1 = value
                        }
                        builderResult.hasField1 = true
                        return self
                    }
                    @discardableResult
                    public func clearField1() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                        field1Builder_ = nil
                        builderResult.hasField1 = false
                        builderResult.field1 = nil
                        return self
                    }
                    override public var internalGetResult:GeneratedMessage {
                        get {
                            return builderResult
                        }
                    }
                    @discardableResult
                    override public func clear() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                        builderResult = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1()
                        return self
                    }
                    override public func clone() throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.builderWithPrototype(prototype:builderResult)
                    }
                    override public func build() throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
                        try checkInitialized()
                        return buildPartial()
                    }
                    public func buildPartial() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
                        let returnMe:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 = builderResult
                        return returnMe
                    }
                    @discardableResult
                    public func mergeFrom(other:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                        if other == ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1() {
                            return self
                        }
                        if (other.hasField1) {
                            try mergeField1(value: other.field1)
                        }
                        try merge(unknownField: other.unknownFields)
                        return self
                    }
                    @discardableResult
                    override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                        return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                    }
                    @discardableResult
                    override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.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 90:
                                let subBuilder:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                                if hasField1 {
                                    try subBuilder.mergeFrom(other: field1)
                                }
                                try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                                field1 = 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 -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder {
                        let resultDecodedBuilder = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder()
                        if let jsonValueField1 = jsonMap["field1"] as? Dictionary<String,Any> {
                            resultDecodedBuilder.field1 = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueField1).build()

                        }
                        return resultDecodedBuilder
                    }
                    override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.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 ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder.decodeToBuilder(jsonMap:jsDataCast)
                    }
                }

            }

            //Nested type declaration end



            //Nested type declaration start

            final public class Group2 : GeneratedMessage {
                public typealias BuilderType = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder

                public static func == (lhs: ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2, rhs: ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2) -> Bool {
                    if lhs === rhs {
                        return true
                    }
                    var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                    fieldCheck = fieldCheck && (lhs.hasField1 == rhs.hasField1) && (!lhs.hasField1 || lhs.field1 == rhs.field1)
                    fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                    return fieldCheck
                }

                public fileprivate(set) var field1:ProtobufUnittest.TestAllTypes!
                public fileprivate(set) var hasField1:Bool = false
                required public init() {
                    super.init()
                }
                override public func isInitialized() throws {
                }
                override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                    if hasField1 {
                        try codedOutputStream.writeMessage(fieldNumber: 21, value:field1)
                    }
                    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 hasField1 {
                        if let varSizefield1 = field1?.computeMessageSize(fieldNumber: 21) {
                            serialize_size += varSizefield1
                        }
                    }
                    serialize_size += unknownFields.serializedSize()
                    memoizedSerializedSize = serialize_size
                    return serialize_size
                }
                public class func getBuilder() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                    return ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.classBuilder() as! ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder
                }
                public func getBuilder() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                    return classBuilder() as! ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder
                }
                override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                    return ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder()
                }
                override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                    return ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder()
                }
                public func toBuilder() throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.builderWithPrototype(prototype:self)
                }
                public class func builderWithPrototype(prototype:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder().mergeFrom(other:prototype)
                }
                override public func encode() throws -> Dictionary<String,Any> {
                    try isInitialized()
                    var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                    if hasField1 {
                        jsonMap["field1"] = try field1.encode()
                    }
                    return jsonMap
                }
                override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder.decodeToBuilder(jsonMap:jsonMap).build()
                }
                override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder.fromJSONToBuilder(data:data, options:options).build()
                }
                override public func getDescription(indent:String) throws -> String {
                    var output = ""
                    if hasField1 {
                        output += "\(indent) field1 {\n"
                        if let outDescField1 = field1 {
                            output += try outDescField1.getDescription(indent: "\(indent)  ")
                        }
                        output += "\(indent) }\n"
                    }
                    output += unknownFields.getDescription(indent: indent)
                    return output
                }
                override public var hashValue:Int {
                    get {
                        var hashCode:Int = 7
                        if hasField1 {
                            if let hashValuefield1 = field1?.hashValue {
                                hashCode = (hashCode &* 31) &+ hashValuefield1
                            }
                        }
                        hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                        return hashCode
                    }
                }


                //Meta information declaration start

                override public class func className() -> String {
                    return "ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2"
                }
                override public func className() -> String {
                    return "ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2"
                }
                //Meta information declaration end

                final public class Builder : GeneratedMessageBuilder {
                    fileprivate var builderResult:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2()
                    public func getMessage() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
                        return builderResult
                    }

                    required override public init () {
                        super.init()
                    }
                    public var field1:ProtobufUnittest.TestAllTypes! {
                        get {
                            if field1Builder_ != nil {
                                builderResult.field1 = field1Builder_.getMessage()
                            }
                            return builderResult.field1
                        }
                        set (value) {
                            builderResult.hasField1 = value != nil
                            builderResult.field1 = value
                        }
                    }
                    public var hasField1:Bool {
                        get {
                            return builderResult.hasField1
                        }
                    }
                    fileprivate var field1Builder_:ProtobufUnittest.TestAllTypes.Builder! {
                        didSet {
                            builderResult.hasField1 = true
                        }
                    }
                    public func getField1Builder() -> ProtobufUnittest.TestAllTypes.Builder {
                        if field1Builder_ == nil {
                            field1Builder_ = ProtobufUnittest.TestAllTypes.Builder()
                            builderResult.field1 = field1Builder_.getMessage()
                            if field1 != nil {
                                try! field1Builder_.mergeFrom(other: field1)
                            }
                        }
                        return field1Builder_
                    }
                    @discardableResult
                    public func setField1(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                        self.field1 = value
                        return self
                    }
                    @discardableResult
                    public func mergeField1(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                        if builderResult.hasField1 {
                            builderResult.field1 = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.field1).mergeFrom(other: value).buildPartial()
                        } else {
                            builderResult.field1 = value
                        }
                        builderResult.hasField1 = true
                        return self
                    }
                    @discardableResult
                    public func clearField1() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                        field1Builder_ = nil
                        builderResult.hasField1 = false
                        builderResult.field1 = nil
                        return self
                    }
                    override public var internalGetResult:GeneratedMessage {
                        get {
                            return builderResult
                        }
                    }
                    @discardableResult
                    override public func clear() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                        builderResult = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2()
                        return self
                    }
                    override public func clone() throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.builderWithPrototype(prototype:builderResult)
                    }
                    override public func build() throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
                        try checkInitialized()
                        return buildPartial()
                    }
                    public func buildPartial() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
                        let returnMe:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 = builderResult
                        return returnMe
                    }
                    @discardableResult
                    public func mergeFrom(other:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                        if other == ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2() {
                            return self
                        }
                        if (other.hasField1) {
                            try mergeField1(value: other.field1)
                        }
                        try merge(unknownField: other.unknownFields)
                        return self
                    }
                    @discardableResult
                    override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                        return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                    }
                    @discardableResult
                    override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.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 170:
                                let subBuilder:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                                if hasField1 {
                                    try subBuilder.mergeFrom(other: field1)
                                }
                                try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                                field1 = 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 -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder {
                        let resultDecodedBuilder = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder()
                        if let jsonValueField1 = jsonMap["field1"] as? Dictionary<String,Any> {
                            resultDecodedBuilder.field1 = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueField1).build()

                        }
                        return resultDecodedBuilder
                    }
                    override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.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 ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder.decodeToBuilder(jsonMap:jsDataCast)
                    }
                }

            }

            //Nested type declaration end

            public fileprivate(set) var field1:Array<ProtobufUnittest.TestAllTypes>  = Array<ProtobufUnittest.TestAllTypes>()
            public fileprivate(set) var field2:Array<ProtobufUnittest.TestAllTypes>  = Array<ProtobufUnittest.TestAllTypes>()
            public fileprivate(set) var field3:Array<ProtobufUnittest.TestAllTypes>  = Array<ProtobufUnittest.TestAllTypes>()
            public fileprivate(set) var group1:Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1>  = Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1>()
            public fileprivate(set) var group2:Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2>  = Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2>()
            public fileprivate(set) var ext1:Array<ProtobufUnittest.TestAllTypes>  = Array<ProtobufUnittest.TestAllTypes>()
            public fileprivate(set) var ext2:Array<ProtobufUnittest.TestAllTypes>  = Array<ProtobufUnittest.TestAllTypes>()
            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                for oneElementField1 in field1 {
                      try codedOutputStream.writeMessage(fieldNumber: 1, value:oneElementField1)
                }
                for oneElementField2 in field2 {
                      try codedOutputStream.writeMessage(fieldNumber: 2, value:oneElementField2)
                }
                for oneElementField3 in field3 {
                      try codedOutputStream.writeMessage(fieldNumber: 3, value:oneElementField3)
                }
                for oneElementGroup1 in group1 {
                      try codedOutputStream.writeGroup(fieldNumber: 10, value:oneElementGroup1)
                }
                for oneElementGroup2 in group2 {
                      try codedOutputStream.writeGroup(fieldNumber: 20, value:oneElementGroup2)
                }
                for oneElementExt1 in ext1 {
                      try codedOutputStream.writeMessage(fieldNumber: 1000, value:oneElementExt1)
                }
                for oneElementExt2 in ext2 {
                      try codedOutputStream.writeMessage(fieldNumber: 1001, value:oneElementExt2)
                }
                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
                for oneElementField1 in field1 {
                    serialize_size += oneElementField1.computeMessageSize(fieldNumber: 1)
                }
                for oneElementField2 in field2 {
                    serialize_size += oneElementField2.computeMessageSize(fieldNumber: 2)
                }
                for oneElementField3 in field3 {
                    serialize_size += oneElementField3.computeMessageSize(fieldNumber: 3)
                }
                for oneElementGroup1 in group1 {
                    serialize_size += oneElementGroup1.computeGroupSize(fieldNumber: 10)
                }
                for oneElementGroup2 in group2 {
                    serialize_size += oneElementGroup2.computeGroupSize(fieldNumber: 20)
                }
                for oneElementExt1 in ext1 {
                    serialize_size += oneElementExt1.computeMessageSize(fieldNumber: 1000)
                }
                for oneElementExt2 in ext2 {
                    serialize_size += oneElementExt2.computeMessageSize(fieldNumber: 1001)
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                return ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.classBuilder() as! ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                return classBuilder() as! ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if !field1.isEmpty {
                    var jsonArrayField1:Array<Dictionary<String,Any>> = []
                    for oneValueField1 in field1 {
                        let ecodedMessageField1 = try oneValueField1.encode()
                        jsonArrayField1.append(ecodedMessageField1)
                    }
                    jsonMap["field1"] = jsonArrayField1
                }
                if !field2.isEmpty {
                    var jsonArrayField2:Array<Dictionary<String,Any>> = []
                    for oneValueField2 in field2 {
                        let ecodedMessageField2 = try oneValueField2.encode()
                        jsonArrayField2.append(ecodedMessageField2)
                    }
                    jsonMap["field2"] = jsonArrayField2
                }
                if !field3.isEmpty {
                    var jsonArrayField3:Array<Dictionary<String,Any>> = []
                    for oneValueField3 in field3 {
                        let ecodedMessageField3 = try oneValueField3.encode()
                        jsonArrayField3.append(ecodedMessageField3)
                    }
                    jsonMap["field3"] = jsonArrayField3
                }
                if !group1.isEmpty {
                    var jsonArrayGroup1:Array<Dictionary<String,Any>> = []
                    for oneValueGroup1 in group1 {
                        let ecodedMessageGroup1 = try oneValueGroup1.encode()
                        jsonArrayGroup1.append(ecodedMessageGroup1)
                    }
                    jsonMap["group1"] = jsonArrayGroup1
                }
                if !group2.isEmpty {
                    var jsonArrayGroup2:Array<Dictionary<String,Any>> = []
                    for oneValueGroup2 in group2 {
                        let ecodedMessageGroup2 = try oneValueGroup2.encode()
                        jsonArrayGroup2.append(ecodedMessageGroup2)
                    }
                    jsonMap["group2"] = jsonArrayGroup2
                }
                if !ext1.isEmpty {
                    var jsonArrayExt1:Array<Dictionary<String,Any>> = []
                    for oneValueExt1 in ext1 {
                        let ecodedMessageExt1 = try oneValueExt1.encode()
                        jsonArrayExt1.append(ecodedMessageExt1)
                    }
                    jsonMap["ext1"] = jsonArrayExt1
                }
                if !ext2.isEmpty {
                    var jsonArrayExt2:Array<Dictionary<String,Any>> = []
                    for oneValueExt2 in ext2 {
                        let ecodedMessageExt2 = try oneValueExt2.encode()
                        jsonArrayExt2.append(ecodedMessageExt2)
                    }
                    jsonMap["ext2"] = jsonArrayExt2
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
                return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
                return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                var field1ElementIndex:Int = 0
                for oneElementField1 in field1 {
                    output += "\(indent) field1[\(field1ElementIndex)] {\n"
                    output += try oneElementField1.getDescription(indent: "\(indent)  ")
                    output += "\(indent)}\n"
                    field1ElementIndex += 1
                }
                var field2ElementIndex:Int = 0
                for oneElementField2 in field2 {
                    output += "\(indent) field2[\(field2ElementIndex)] {\n"
                    output += try oneElementField2.getDescription(indent: "\(indent)  ")
                    output += "\(indent)}\n"
                    field2ElementIndex += 1
                }
                var field3ElementIndex:Int = 0
                for oneElementField3 in field3 {
                    output += "\(indent) field3[\(field3ElementIndex)] {\n"
                    output += try oneElementField3.getDescription(indent: "\(indent)  ")
                    output += "\(indent)}\n"
                    field3ElementIndex += 1
                }
                var group1ElementIndex:Int = 0
                for oneElementGroup1 in group1 {
                    output += "\(indent) group1[\(group1ElementIndex)] {\n"
                    output += try oneElementGroup1.getDescription(indent: "\(indent)  ")
                    output += "\(indent)}\n"
                    group1ElementIndex += 1
                }
                var group2ElementIndex:Int = 0
                for oneElementGroup2 in group2 {
                    output += "\(indent) group2[\(group2ElementIndex)] {\n"
                    output += try oneElementGroup2.getDescription(indent: "\(indent)  ")
                    output += "\(indent)}\n"
                    group2ElementIndex += 1
                }
                var ext1ElementIndex:Int = 0
                for oneElementExt1 in ext1 {
                    output += "\(indent) ext1[\(ext1ElementIndex)] {\n"
                    output += try oneElementExt1.getDescription(indent: "\(indent)  ")
                    output += "\(indent)}\n"
                    ext1ElementIndex += 1
                }
                var ext2ElementIndex:Int = 0
                for oneElementExt2 in ext2 {
                    output += "\(indent) ext2[\(ext2ElementIndex)] {\n"
                    output += try oneElementExt2.getDescription(indent: "\(indent)  ")
                    output += "\(indent)}\n"
                    ext2ElementIndex += 1
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    for oneElementField1 in field1 {
                        hashCode = (hashCode &* 31) &+ oneElementField1.hashValue
                    }
                    for oneElementField2 in field2 {
                        hashCode = (hashCode &* 31) &+ oneElementField2.hashValue
                    }
                    for oneElementField3 in field3 {
                        hashCode = (hashCode &* 31) &+ oneElementField3.hashValue
                    }
                    for oneElementGroup1 in group1 {
                        hashCode = (hashCode &* 31) &+ oneElementGroup1.hashValue
                    }
                    for oneElementGroup2 in group2 {
                        hashCode = (hashCode &* 31) &+ oneElementGroup2.hashValue
                    }
                    for oneElementExt1 in ext1 {
                        hashCode = (hashCode &* 31) &+ oneElementExt1.hashValue
                    }
                    for oneElementExt2 in ext2 {
                        hashCode = (hashCode &* 31) &+ oneElementExt2.hashValue
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var field1:Array<ProtobufUnittest.TestAllTypes> {
                    get {
                        return builderResult.field1
                    }
                    set (value) {
                        builderResult.field1 = value
                    }
                }
                @discardableResult
                public func setField1(_ value:Array<ProtobufUnittest.TestAllTypes>) -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    self.field1 = value
                    return self
                }
                @discardableResult
                public func clearField1() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    builderResult.field1.removeAll(keepingCapacity: false)
                    return self
                }
                public var field2:Array<ProtobufUnittest.TestAllTypes> {
                    get {
                        return builderResult.field2
                    }
                    set (value) {
                        builderResult.field2 = value
                    }
                }
                @discardableResult
                public func setField2(_ value:Array<ProtobufUnittest.TestAllTypes>) -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    self.field2 = value
                    return self
                }
                @discardableResult
                public func clearField2() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    builderResult.field2.removeAll(keepingCapacity: false)
                    return self
                }
                public var field3:Array<ProtobufUnittest.TestAllTypes> {
                    get {
                        return builderResult.field3
                    }
                    set (value) {
                        builderResult.field3 = value
                    }
                }
                @discardableResult
                public func setField3(_ value:Array<ProtobufUnittest.TestAllTypes>) -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    self.field3 = value
                    return self
                }
                @discardableResult
                public func clearField3() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    builderResult.field3.removeAll(keepingCapacity: false)
                    return self
                }
                public var group1:Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1> {
                    get {
                        return builderResult.group1
                    }
                    set (value) {
                        builderResult.group1 = value
                    }
                }
                @discardableResult
                public func setGroup1(_ value:Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1>) -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    self.group1 = value
                    return self
                }
                @discardableResult
                public func clearGroup1() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    builderResult.group1.removeAll(keepingCapacity: false)
                    return self
                }
                public var group2:Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2> {
                    get {
                        return builderResult.group2
                    }
                    set (value) {
                        builderResult.group2 = value
                    }
                }
                @discardableResult
                public func setGroup2(_ value:Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2>) -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    self.group2 = value
                    return self
                }
                @discardableResult
                public func clearGroup2() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    builderResult.group2.removeAll(keepingCapacity: false)
                    return self
                }
                public var ext1:Array<ProtobufUnittest.TestAllTypes> {
                    get {
                        return builderResult.ext1
                    }
                    set (value) {
                        builderResult.ext1 = value
                    }
                }
                @discardableResult
                public func setExt1(_ value:Array<ProtobufUnittest.TestAllTypes>) -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    self.ext1 = value
                    return self
                }
                @discardableResult
                public func clearExt1() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    builderResult.ext1.removeAll(keepingCapacity: false)
                    return self
                }
                public var ext2:Array<ProtobufUnittest.TestAllTypes> {
                    get {
                        return builderResult.ext2
                    }
                    set (value) {
                        builderResult.ext2 = value
                    }
                }
                @discardableResult
                public func setExt2(_ value:Array<ProtobufUnittest.TestAllTypes>) -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    self.ext2 = value
                    return self
                }
                @discardableResult
                public func clearExt2() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    builderResult.ext2.removeAll(keepingCapacity: false)
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    builderResult = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
                    let returnMe:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    if other == ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator() {
                        return self
                    }
                    if !other.field1.isEmpty  {
                         builderResult.field1 += other.field1
                    }
                    if !other.field2.isEmpty  {
                         builderResult.field2 += other.field2
                    }
                    if !other.field3.isEmpty  {
                         builderResult.field3 += other.field3
                    }
                    if !other.group1.isEmpty  {
                         builderResult.group1 += other.group1
                    }
                    if !other.group2.isEmpty  {
                         builderResult.group2 += other.group2
                    }
                    if !other.ext1.isEmpty  {
                         builderResult.ext1 += other.ext1
                    }
                    if !other.ext2.isEmpty  {
                         builderResult.ext2 += other.ext2
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.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 = ProtobufUnittest.TestAllTypes.Builder()
                            try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                            field1.append(subBuilder.buildPartial())

                        case 18:
                            let subBuilder = ProtobufUnittest.TestAllTypes.Builder()
                            try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                            field2.append(subBuilder.buildPartial())

                        case 26:
                            let subBuilder = ProtobufUnittest.TestAllTypes.Builder()
                            try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                            field3.append(subBuilder.buildPartial())

                        case 83:
                            let subBuilder = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder()
                            try codedInputStream.readGroup(fieldNumber:10, builder:subBuilder,extensionRegistry:extensionRegistry)
                            group1.append(subBuilder.buildPartial())

                        case 163:
                            let subBuilder = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder()
                            try codedInputStream.readGroup(fieldNumber:20, builder:subBuilder,extensionRegistry:extensionRegistry)
                            group2.append(subBuilder.buildPartial())

                        case 8002:
                            let subBuilder = ProtobufUnittest.TestAllTypes.Builder()
                            try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                            ext1.append(subBuilder.buildPartial())

                        case 8010:
                            let subBuilder = ProtobufUnittest.TestAllTypes.Builder()
                            try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                            ext2.append(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 -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder()
                    if let jsonValueField1 = jsonMap["field1"] as? Array<Dictionary<String,Any>> {
                        var jsonArrayField1:Array<ProtobufUnittest.TestAllTypes> = []
                        for oneValueField1 in jsonValueField1 {
                            let messageFromStringField1 = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:oneValueField1).build()

                            jsonArrayField1.append(messageFromStringField1)
                        }
                        resultDecodedBuilder.field1 = jsonArrayField1
                    }
                    if let jsonValueField2 = jsonMap["field2"] as? Array<Dictionary<String,Any>> {
                        var jsonArrayField2:Array<ProtobufUnittest.TestAllTypes> = []
                        for oneValueField2 in jsonValueField2 {
                            let messageFromStringField2 = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:oneValueField2).build()

                            jsonArrayField2.append(messageFromStringField2)
                        }
                        resultDecodedBuilder.field2 = jsonArrayField2
                    }
                    if let jsonValueField3 = jsonMap["field3"] as? Array<Dictionary<String,Any>> {
                        var jsonArrayField3:Array<ProtobufUnittest.TestAllTypes> = []
                        for oneValueField3 in jsonValueField3 {
                            let messageFromStringField3 = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:oneValueField3).build()

                            jsonArrayField3.append(messageFromStringField3)
                        }
                        resultDecodedBuilder.field3 = jsonArrayField3
                    }
                    if let jsonValueGroup1 = jsonMap["group1"] as? Array<Dictionary<String,Any>> {
                        var jsonArrayGroup1:Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1> = []
                        for oneValueGroup1 in jsonValueGroup1 {
                            let messageFromStringGroup1 = try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder.decodeToBuilder(jsonMap:oneValueGroup1).build()

                            jsonArrayGroup1.append(messageFromStringGroup1)
                        }
                        resultDecodedBuilder.group1 = jsonArrayGroup1
                    }
                    if let jsonValueGroup2 = jsonMap["group2"] as? Array<Dictionary<String,Any>> {
                        var jsonArrayGroup2:Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2> = []
                        for oneValueGroup2 in jsonValueGroup2 {
                            let messageFromStringGroup2 = try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder.decodeToBuilder(jsonMap:oneValueGroup2).build()

                            jsonArrayGroup2.append(messageFromStringGroup2)
                        }
                        resultDecodedBuilder.group2 = jsonArrayGroup2
                    }
                    if let jsonValueExt1 = jsonMap["ext1"] as? Array<Dictionary<String,Any>> {
                        var jsonArrayExt1:Array<ProtobufUnittest.TestAllTypes> = []
                        for oneValueExt1 in jsonValueExt1 {
                            let messageFromStringExt1 = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:oneValueExt1).build()

                            jsonArrayExt1.append(messageFromStringExt1)
                        }
                        resultDecodedBuilder.ext1 = jsonArrayExt1
                    }
                    if let jsonValueExt2 = jsonMap["ext2"] as? Array<Dictionary<String,Any>> {
                        var jsonArrayExt2:Array<ProtobufUnittest.TestAllTypes> = []
                        for oneValueExt2 in jsonValueExt2 {
                            let messageFromStringExt2 = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:oneValueExt2).build()

                            jsonArrayExt2.append(messageFromStringExt2)
                        }
                        resultDecodedBuilder.ext2 = jsonArrayExt2
                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.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 ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //Nested type declaration start

        final public class OptionalGroup : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder

            public static func == (lhs: ProtobufUnittest.TestParsingMerge.OptionalGroup, rhs: ProtobufUnittest.TestParsingMerge.OptionalGroup) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasOptionalGroupAllTypes == rhs.hasOptionalGroupAllTypes) && (!lhs.hasOptionalGroupAllTypes || lhs.optionalGroupAllTypes == rhs.optionalGroupAllTypes)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var optionalGroupAllTypes:ProtobufUnittest.TestAllTypes!
            public fileprivate(set) var hasOptionalGroupAllTypes:Bool = false
            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasOptionalGroupAllTypes {
                    try codedOutputStream.writeMessage(fieldNumber: 11, value:optionalGroupAllTypes)
                }
                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 hasOptionalGroupAllTypes {
                    if let varSizeoptionalGroupAllTypes = optionalGroupAllTypes?.computeMessageSize(fieldNumber: 11) {
                        serialize_size += varSizeoptionalGroupAllTypes
                    }
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                return ProtobufUnittest.TestParsingMerge.OptionalGroup.classBuilder() as! ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                return classBuilder() as! ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                return try ProtobufUnittest.TestParsingMerge.OptionalGroup.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestParsingMerge.OptionalGroup) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasOptionalGroupAllTypes {
                    jsonMap["optionalGroupAllTypes"] = try optionalGroupAllTypes.encode()
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
                return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
                return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasOptionalGroupAllTypes {
                    output += "\(indent) optionalGroupAllTypes {\n"
                    if let outDescOptionalGroupAllTypes = optionalGroupAllTypes {
                        output += try outDescOptionalGroupAllTypes.getDescription(indent: "\(indent)  ")
                    }
                    output += "\(indent) }\n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasOptionalGroupAllTypes {
                        if let hashValueoptionalGroupAllTypes = optionalGroupAllTypes?.hashValue {
                            hashCode = (hashCode &* 31) &+ hashValueoptionalGroupAllTypes
                        }
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var optionalGroupAllTypes:ProtobufUnittest.TestAllTypes! {
                    get {
                        if optionalGroupAllTypesBuilder_ != nil {
                            builderResult.optionalGroupAllTypes = optionalGroupAllTypesBuilder_.getMessage()
                        }
                        return builderResult.optionalGroupAllTypes
                    }
                    set (value) {
                        builderResult.hasOptionalGroupAllTypes = value != nil
                        builderResult.optionalGroupAllTypes = value
                    }
                }
                public var hasOptionalGroupAllTypes:Bool {
                    get {
                        return builderResult.hasOptionalGroupAllTypes
                    }
                }
                fileprivate var optionalGroupAllTypesBuilder_:ProtobufUnittest.TestAllTypes.Builder! {
                    didSet {
                        builderResult.hasOptionalGroupAllTypes = true
                    }
                }
                public func getOptionalGroupAllTypesBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
                    if optionalGroupAllTypesBuilder_ == nil {
                        optionalGroupAllTypesBuilder_ = ProtobufUnittest.TestAllTypes.Builder()
                        builderResult.optionalGroupAllTypes = optionalGroupAllTypesBuilder_.getMessage()
                        if optionalGroupAllTypes != nil {
                            try! optionalGroupAllTypesBuilder_.mergeFrom(other: optionalGroupAllTypes)
                        }
                    }
                    return optionalGroupAllTypesBuilder_
                }
                @discardableResult
                public func setOptionalGroupAllTypes(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                    self.optionalGroupAllTypes = value
                    return self
                }
                @discardableResult
                public func mergeOptionalGroupAllTypes(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                    if builderResult.hasOptionalGroupAllTypes {
                        builderResult.optionalGroupAllTypes = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.optionalGroupAllTypes).mergeFrom(other: value).buildPartial()
                    } else {
                        builderResult.optionalGroupAllTypes = value
                    }
                    builderResult.hasOptionalGroupAllTypes = true
                    return self
                }
                @discardableResult
                public func clearOptionalGroupAllTypes() -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                    optionalGroupAllTypesBuilder_ = nil
                    builderResult.hasOptionalGroupAllTypes = false
                    builderResult.optionalGroupAllTypes = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                    builderResult = ProtobufUnittest.TestParsingMerge.OptionalGroup()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                    return try ProtobufUnittest.TestParsingMerge.OptionalGroup.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
                    let returnMe:ProtobufUnittest.TestParsingMerge.OptionalGroup = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestParsingMerge.OptionalGroup) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                    if other == ProtobufUnittest.TestParsingMerge.OptionalGroup() {
                        return self
                    }
                    if (other.hasOptionalGroupAllTypes) {
                        try mergeOptionalGroupAllTypes(value: other.optionalGroupAllTypes)
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup.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 90:
                            let subBuilder:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                            if hasOptionalGroupAllTypes {
                                try subBuilder.mergeFrom(other: optionalGroupAllTypes)
                            }
                            try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                            optionalGroupAllTypes = 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 -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder()
                    if let jsonValueOptionalGroupAllTypes = jsonMap["optionalGroupAllTypes"] as? Dictionary<String,Any> {
                        resultDecodedBuilder.optionalGroupAllTypes = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueOptionalGroupAllTypes).build()

                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup.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 ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end



        //Nested type declaration start

        final public class RepeatedGroup : GeneratedMessage {
            public typealias BuilderType = ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder

            public static func == (lhs: ProtobufUnittest.TestParsingMerge.RepeatedGroup, rhs: ProtobufUnittest.TestParsingMerge.RepeatedGroup) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasRepeatedGroupAllTypes == rhs.hasRepeatedGroupAllTypes) && (!lhs.hasRepeatedGroupAllTypes || lhs.repeatedGroupAllTypes == rhs.repeatedGroupAllTypes)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var repeatedGroupAllTypes:ProtobufUnittest.TestAllTypes!
            public fileprivate(set) var hasRepeatedGroupAllTypes:Bool = false
            required public init() {
                super.init()
            }
            override public func isInitialized() throws {
            }
            override public func writeTo(codedOutputStream: CodedOutputStream) throws {
                if hasRepeatedGroupAllTypes {
                    try codedOutputStream.writeMessage(fieldNumber: 21, value:repeatedGroupAllTypes)
                }
                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 hasRepeatedGroupAllTypes {
                    if let varSizerepeatedGroupAllTypes = repeatedGroupAllTypes?.computeMessageSize(fieldNumber: 21) {
                        serialize_size += varSizerepeatedGroupAllTypes
                    }
                }
                serialize_size += unknownFields.serializedSize()
                memoizedSerializedSize = serialize_size
                return serialize_size
            }
            public class func getBuilder() -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                return ProtobufUnittest.TestParsingMerge.RepeatedGroup.classBuilder() as! ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder
            }
            public func getBuilder() -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                return classBuilder() as! ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder()
            }
            public func toBuilder() throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:ProtobufUnittest.TestParsingMerge.RepeatedGroup) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasRepeatedGroupAllTypes {
                    jsonMap["repeatedGroupAllTypes"] = try repeatedGroupAllTypes.encode()
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
                return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
                return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasRepeatedGroupAllTypes {
                    output += "\(indent) repeatedGroupAllTypes {\n"
                    if let outDescRepeatedGroupAllTypes = repeatedGroupAllTypes {
                        output += try outDescRepeatedGroupAllTypes.getDescription(indent: "\(indent)  ")
                    }
                    output += "\(indent) }\n"
                }
                output += unknownFields.getDescription(indent: indent)
                return output
            }
            override public var hashValue:Int {
                get {
                    var hashCode:Int = 7
                    if hasRepeatedGroupAllTypes {
                        if let hashValuerepeatedGroupAllTypes = repeatedGroupAllTypes?.hashValue {
                            hashCode = (hashCode &* 31) &+ hashValuerepeatedGroupAllTypes
                        }
                    }
                    hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                    return hashCode
                }
            }


            //Meta information declaration start

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

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

                required override public init () {
                    super.init()
                }
                public var repeatedGroupAllTypes:ProtobufUnittest.TestAllTypes! {
                    get {
                        if repeatedGroupAllTypesBuilder_ != nil {
                            builderResult.repeatedGroupAllTypes = repeatedGroupAllTypesBuilder_.getMessage()
                        }
                        return builderResult.repeatedGroupAllTypes
                    }
                    set (value) {
                        builderResult.hasRepeatedGroupAllTypes = value != nil
                        builderResult.repeatedGroupAllTypes = value
                    }
                }
                public var hasRepeatedGroupAllTypes:Bool {
                    get {
                        return builderResult.hasRepeatedGroupAllTypes
                    }
                }
                fileprivate var repeatedGroupAllTypesBuilder_:ProtobufUnittest.TestAllTypes.Builder! {
                    didSet {
                        builderResult.hasRepeatedGroupAllTypes = true
                    }
                }
                public func getRepeatedGroupAllTypesBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
                    if repeatedGroupAllTypesBuilder_ == nil {
                        repeatedGroupAllTypesBuilder_ = ProtobufUnittest.TestAllTypes.Builder()
                        builderResult.repeatedGroupAllTypes = repeatedGroupAllTypesBuilder_.getMessage()
                        if repeatedGroupAllTypes != nil {
                            try! repeatedGroupAllTypesBuilder_.mergeFrom(other: repeatedGroupAllTypes)
                        }
                    }
                    return repeatedGroupAllTypesBuilder_
                }
                @discardableResult
                public func setRepeatedGroupAllTypes(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                    self.repeatedGroupAllTypes = value
                    return self
                }
                @discardableResult
                public func mergeRepeatedGroupAllTypes(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                    if builderResult.hasRepeatedGroupAllTypes {
                        builderResult.repeatedGroupAllTypes = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.repeatedGroupAllTypes).mergeFrom(other: value).buildPartial()
                    } else {
                        builderResult.repeatedGroupAllTypes = value
                    }
                    builderResult.hasRepeatedGroupAllTypes = true
                    return self
                }
                @discardableResult
                public func clearRepeatedGroupAllTypes() -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                    repeatedGroupAllTypesBuilder_ = nil
                    builderResult.hasRepeatedGroupAllTypes = false
                    builderResult.repeatedGroupAllTypes = nil
                    return self
                }
                override public var internalGetResult:GeneratedMessage {
                    get {
                        return builderResult
                    }
                }
                @discardableResult
                override public func clear() -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                    builderResult = ProtobufUnittest.TestParsingMerge.RepeatedGroup()
                    return self
                }
                override public func clone() throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                    return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
                    let returnMe:ProtobufUnittest.TestParsingMerge.RepeatedGroup = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:ProtobufUnittest.TestParsingMerge.RepeatedGroup) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                    if other == ProtobufUnittest.TestParsingMerge.RepeatedGroup() {
                        return self
                    }
                    if (other.hasRepeatedGroupAllTypes) {
                        try mergeRepeatedGroupAllTypes(value: other.repeatedGroupAllTypes)
                    }
                    try merge(unknownField: other.unknownFields)
                    return self
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.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 170:
                            let subBuilder:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                            if hasRepeatedGroupAllTypes {
                                try subBuilder.mergeFrom(other: repeatedGroupAllTypes)
                            }
                            try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                            repeatedGroupAllTypes = 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 -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder {
                    let resultDecodedBuilder = ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder()
                    if let jsonValueRepeatedGroupAllTypes = jsonMap["repeatedGroupAllTypes"] as? Dictionary<String,Any> {
                        resultDecodedBuilder.repeatedGroupAllTypes = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueRepeatedGroupAllTypes).build()

                    }
                    return resultDecodedBuilder
                }
                override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup.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 ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder.decodeToBuilder(jsonMap:jsDataCast)
                }
            }

        }

        //Nested type declaration end

        public fileprivate(set) var requiredAllTypes:ProtobufUnittest.TestAllTypes!
        public fileprivate(set) var hasRequiredAllTypes:Bool = false
        public fileprivate(set) var optionalAllTypes:ProtobufUnittest.TestAllTypes!
        public fileprivate(set) var hasOptionalAllTypes:Bool = false
        public fileprivate(set) var repeatedAllTypes:Array<ProtobufUnittest.TestAllTypes>  = Array<ProtobufUnittest.TestAllTypes>()
        public fileprivate(set) var optionalGroup:ProtobufUnittest.TestParsingMerge.OptionalGroup!
        public fileprivate(set) var hasOptionalGroup:Bool = false
        public fileprivate(set) var repeatedGroup:Array<ProtobufUnittest.TestParsingMerge.RepeatedGroup>  = Array<ProtobufUnittest.TestParsingMerge.RepeatedGroup>()
        public class func optionalExt() -> ConcreateExtensionField {
               return TestParsingMergeoptionalExt
        }
        public class func repeatedExt() -> ConcreateExtensionField {
               return TestParsingMergerepeatedExt
        }
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            if !hasRequiredAllTypes {
                throw ProtocolBuffersError.invalidProtocolBuffer("Uninitialized Message \(ProtobufUnittest.TestParsingMerge.self): field \"requiredAllTypes\" mark required")
            }
            try extensionsAreInitialized()}
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasRequiredAllTypes {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:requiredAllTypes)
            }
            if hasOptionalAllTypes {
                try codedOutputStream.writeMessage(fieldNumber: 2, value:optionalAllTypes)
            }
            for oneElementRepeatedAllTypes in repeatedAllTypes {
                  try codedOutputStream.writeMessage(fieldNumber: 3, value:oneElementRepeatedAllTypes)
            }
            if hasOptionalGroup {
                try codedOutputStream.writeGroup(fieldNumber: 10, value:optionalGroup)
            }
            for oneElementRepeatedGroup in repeatedGroup {
                  try codedOutputStream.writeGroup(fieldNumber: 20, value:oneElementRepeatedGroup)
            }
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:1000, endExclusive:536870912)
            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 hasRequiredAllTypes {
                if let varSizerequiredAllTypes = requiredAllTypes?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizerequiredAllTypes
                }
            }
            if hasOptionalAllTypes {
                if let varSizeoptionalAllTypes = optionalAllTypes?.computeMessageSize(fieldNumber: 2) {
                    serialize_size += varSizeoptionalAllTypes
                }
            }
            for oneElementRepeatedAllTypes in repeatedAllTypes {
                serialize_size += oneElementRepeatedAllTypes.computeMessageSize(fieldNumber: 3)
            }
            if hasOptionalGroup {
                if let varSizeoptionalGroup = optionalGroup?.computeGroupSize(fieldNumber: 10) {
                    serialize_size += varSizeoptionalGroup
                }
            }
            for oneElementRepeatedGroup in repeatedGroup {
                serialize_size += oneElementRepeatedGroup.computeGroupSize(fieldNumber: 20)
            }
            serialize_size += extensionsSerializedSize()
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestParsingMerge.Builder {
            return ProtobufUnittest.TestParsingMerge.classBuilder() as! ProtobufUnittest.TestParsingMerge.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestParsingMerge.Builder {
            return classBuilder() as! ProtobufUnittest.TestParsingMerge.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestParsingMerge.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestParsingMerge.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestParsingMerge.Builder {
            return try ProtobufUnittest.TestParsingMerge.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestParsingMerge) throws -> ProtobufUnittest.TestParsingMerge.Builder {
            return try ProtobufUnittest.TestParsingMerge.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasRequiredAllTypes {
                jsonMap["requiredAllTypes"] = try requiredAllTypes.encode()
            }
            if hasOptionalAllTypes {
                jsonMap["optionalAllTypes"] = try optionalAllTypes.encode()
            }
            if !repeatedAllTypes.isEmpty {
                var jsonArrayRepeatedAllTypes:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedAllTypes in repeatedAllTypes {
                    let ecodedMessageRepeatedAllTypes = try oneValueRepeatedAllTypes.encode()
                    jsonArrayRepeatedAllTypes.append(ecodedMessageRepeatedAllTypes)
                }
                jsonMap["repeatedAllTypes"] = jsonArrayRepeatedAllTypes
            }
            if hasOptionalGroup {
                jsonMap["optionalgroup"] = try optionalGroup.encode()
            }
            if !repeatedGroup.isEmpty {
                var jsonArrayRepeatedGroup:Array<Dictionary<String,Any>> = []
                for oneValueRepeatedGroup in repeatedGroup {
                    let ecodedMessageRepeatedGroup = try oneValueRepeatedGroup.encode()
                    jsonArrayRepeatedGroup.append(ecodedMessageRepeatedGroup)
                }
                jsonMap["repeatedgroup"] = jsonArrayRepeatedGroup
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestParsingMerge {
            return try ProtobufUnittest.TestParsingMerge.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge {
            return try ProtobufUnittest.TestParsingMerge.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasRequiredAllTypes {
                output += "\(indent) requiredAllTypes {\n"
                if let outDescRequiredAllTypes = requiredAllTypes {
                    output += try outDescRequiredAllTypes.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasOptionalAllTypes {
                output += "\(indent) optionalAllTypes {\n"
                if let outDescOptionalAllTypes = optionalAllTypes {
                    output += try outDescOptionalAllTypes.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            var repeatedAllTypesElementIndex:Int = 0
            for oneElementRepeatedAllTypes in repeatedAllTypes {
                output += "\(indent) repeatedAllTypes[\(repeatedAllTypesElementIndex)] {\n"
                output += try oneElementRepeatedAllTypes.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedAllTypesElementIndex += 1
            }
            if hasOptionalGroup {
                output += "\(indent) optionalGroup {\n"
                if let outDescOptionalGroup = optionalGroup {
                    output += try outDescOptionalGroup.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            var repeatedGroupElementIndex:Int = 0
            for oneElementRepeatedGroup in repeatedGroup {
                output += "\(indent) repeatedGroup[\(repeatedGroupElementIndex)] {\n"
                output += try oneElementRepeatedGroup.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                repeatedGroupElementIndex += 1
            }
            output += try getExtensionDescription(startInclusive:1000, endExclusive:536870912, indent:indent)
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasRequiredAllTypes {
                    if let hashValuerequiredAllTypes = requiredAllTypes?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuerequiredAllTypes
                    }
                }
                if hasOptionalAllTypes {
                    if let hashValueoptionalAllTypes = optionalAllTypes?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalAllTypes
                    }
                }
                for oneElementRepeatedAllTypes in repeatedAllTypes {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedAllTypes.hashValue
                }
                if hasOptionalGroup {
                    if let hashValueoptionalGroup = optionalGroup?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValueoptionalGroup
                    }
                }
                for oneElementRepeatedGroup in repeatedGroup {
                    hashCode = (hashCode &* 31) &+ oneElementRepeatedGroup.hashValue
                }
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 1000, endExclusive:536870912))
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

        final public class Builder : ExtendableMessageBuilder {
            fileprivate var builderResult:ProtobufUnittest.TestParsingMerge = ProtobufUnittest.TestParsingMerge()
            public func getMessage() -> ProtobufUnittest.TestParsingMerge {
                return builderResult
            }

            required override public init () {
                super.init()
            }
            public var requiredAllTypes:ProtobufUnittest.TestAllTypes! {
                get {
                    if requiredAllTypesBuilder_ != nil {
                        builderResult.requiredAllTypes = requiredAllTypesBuilder_.getMessage()
                    }
                    return builderResult.requiredAllTypes
                }
                set (value) {
                    builderResult.hasRequiredAllTypes = value != nil
                    builderResult.requiredAllTypes = value
                }
            }
            public var hasRequiredAllTypes:Bool {
                get {
                    return builderResult.hasRequiredAllTypes
                }
            }
            fileprivate var requiredAllTypesBuilder_:ProtobufUnittest.TestAllTypes.Builder! {
                didSet {
                    builderResult.hasRequiredAllTypes = true
                }
            }
            public func getRequiredAllTypesBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
                if requiredAllTypesBuilder_ == nil {
                    requiredAllTypesBuilder_ = ProtobufUnittest.TestAllTypes.Builder()
                    builderResult.requiredAllTypes = requiredAllTypesBuilder_.getMessage()
                    if requiredAllTypes != nil {
                        try! requiredAllTypesBuilder_.mergeFrom(other: requiredAllTypes)
                    }
                }
                return requiredAllTypesBuilder_
            }
            @discardableResult
            public func setRequiredAllTypes(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestParsingMerge.Builder {
                self.requiredAllTypes = value
                return self
            }
            @discardableResult
            public func mergeRequiredAllTypes(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestParsingMerge.Builder {
                if builderResult.hasRequiredAllTypes {
                    builderResult.requiredAllTypes = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.requiredAllTypes).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.requiredAllTypes = value
                }
                builderResult.hasRequiredAllTypes = true
                return self
            }
            @discardableResult
            public func clearRequiredAllTypes() -> ProtobufUnittest.TestParsingMerge.Builder {
                requiredAllTypesBuilder_ = nil
                builderResult.hasRequiredAllTypes = false
                builderResult.requiredAllTypes = nil
                return self
            }
            public var optionalAllTypes:ProtobufUnittest.TestAllTypes! {
                get {
                    if optionalAllTypesBuilder_ != nil {
                        builderResult.optionalAllTypes = optionalAllTypesBuilder_.getMessage()
                    }
                    return builderResult.optionalAllTypes
                }
                set (value) {
                    builderResult.hasOptionalAllTypes = value != nil
                    builderResult.optionalAllTypes = value
                }
            }
            public var hasOptionalAllTypes:Bool {
                get {
                    return builderResult.hasOptionalAllTypes
                }
            }
            fileprivate var optionalAllTypesBuilder_:ProtobufUnittest.TestAllTypes.Builder! {
                didSet {
                    builderResult.hasOptionalAllTypes = true
                }
            }
            public func getOptionalAllTypesBuilder() -> ProtobufUnittest.TestAllTypes.Builder {
                if optionalAllTypesBuilder_ == nil {
                    optionalAllTypesBuilder_ = ProtobufUnittest.TestAllTypes.Builder()
                    builderResult.optionalAllTypes = optionalAllTypesBuilder_.getMessage()
                    if optionalAllTypes != nil {
                        try! optionalAllTypesBuilder_.mergeFrom(other: optionalAllTypes)
                    }
                }
                return optionalAllTypesBuilder_
            }
            @discardableResult
            public func setOptionalAllTypes(_ value:ProtobufUnittest.TestAllTypes!) -> ProtobufUnittest.TestParsingMerge.Builder {
                self.optionalAllTypes = value
                return self
            }
            @discardableResult
            public func mergeOptionalAllTypes(value:ProtobufUnittest.TestAllTypes) throws -> ProtobufUnittest.TestParsingMerge.Builder {
                if builderResult.hasOptionalAllTypes {
                    builderResult.optionalAllTypes = try ProtobufUnittest.TestAllTypes.builderWithPrototype(prototype:builderResult.optionalAllTypes).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalAllTypes = value
                }
                builderResult.hasOptionalAllTypes = true
                return self
            }
            @discardableResult
            public func clearOptionalAllTypes() -> ProtobufUnittest.TestParsingMerge.Builder {
                optionalAllTypesBuilder_ = nil
                builderResult.hasOptionalAllTypes = false
                builderResult.optionalAllTypes = nil
                return self
            }
            public var repeatedAllTypes:Array<ProtobufUnittest.TestAllTypes> {
                get {
                    return builderResult.repeatedAllTypes
                }
                set (value) {
                    builderResult.repeatedAllTypes = value
                }
            }
            @discardableResult
            public func setRepeatedAllTypes(_ value:Array<ProtobufUnittest.TestAllTypes>) -> ProtobufUnittest.TestParsingMerge.Builder {
                self.repeatedAllTypes = value
                return self
            }
            @discardableResult
            public func clearRepeatedAllTypes() -> ProtobufUnittest.TestParsingMerge.Builder {
                builderResult.repeatedAllTypes.removeAll(keepingCapacity: false)
                return self
            }
            public var optionalGroup:ProtobufUnittest.TestParsingMerge.OptionalGroup! {
                get {
                    if optionalGroupBuilder_ != nil {
                        builderResult.optionalGroup = optionalGroupBuilder_.getMessage()
                    }
                    return builderResult.optionalGroup
                }
                set (value) {
                    builderResult.hasOptionalGroup = value != nil
                    builderResult.optionalGroup = value
                }
            }
            public var hasOptionalGroup:Bool {
                get {
                    return builderResult.hasOptionalGroup
                }
            }
            fileprivate var optionalGroupBuilder_:ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder! {
                didSet {
                    builderResult.hasOptionalGroup = true
                }
            }
            public func getOptionalGroupBuilder() -> ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder {
                if optionalGroupBuilder_ == nil {
                    optionalGroupBuilder_ = ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder()
                    builderResult.optionalGroup = optionalGroupBuilder_.getMessage()
                    if optionalGroup != nil {
                        try! optionalGroupBuilder_.mergeFrom(other: optionalGroup)
                    }
                }
                return optionalGroupBuilder_
            }
            @discardableResult
            public func setOptionalGroup(_ value:ProtobufUnittest.TestParsingMerge.OptionalGroup!) -> ProtobufUnittest.TestParsingMerge.Builder {
                self.optionalGroup = value
                return self
            }
            @discardableResult
            public func mergeOptionalGroup(value:ProtobufUnittest.TestParsingMerge.OptionalGroup) throws -> ProtobufUnittest.TestParsingMerge.Builder {
                if builderResult.hasOptionalGroup {
                    builderResult.optionalGroup = try ProtobufUnittest.TestParsingMerge.OptionalGroup.builderWithPrototype(prototype:builderResult.optionalGroup).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.optionalGroup = value
                }
                builderResult.hasOptionalGroup = true
                return self
            }
            @discardableResult
            public func clearOptionalGroup() -> ProtobufUnittest.TestParsingMerge.Builder {
                optionalGroupBuilder_ = nil
                builderResult.hasOptionalGroup = false
                builderResult.optionalGroup = nil
                return self
            }
            public var repeatedGroup:Array<ProtobufUnittest.TestParsingMerge.RepeatedGroup> {
                get {
                    return builderResult.repeatedGroup
                }
                set (value) {
                    builderResult.repeatedGroup = value
                }
            }
            @discardableResult
            public func setRepeatedGroup(_ value:Array<ProtobufUnittest.TestParsingMerge.RepeatedGroup>) -> ProtobufUnittest.TestParsingMerge.Builder {
                self.repeatedGroup = value
                return self
            }
            @discardableResult
            public func clearRepeatedGroup() -> ProtobufUnittest.TestParsingMerge.Builder {
                builderResult.repeatedGroup.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:ExtendableMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestParsingMerge.Builder {
                builderResult = ProtobufUnittest.TestParsingMerge()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestParsingMerge.Builder {
                return try ProtobufUnittest.TestParsingMerge.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestParsingMerge {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestParsingMerge {
                let returnMe:ProtobufUnittest.TestParsingMerge = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestParsingMerge) throws -> ProtobufUnittest.TestParsingMerge.Builder {
                if other == ProtobufUnittest.TestParsingMerge() {
                    return self
                }
                if (other.hasRequiredAllTypes) {
                    try mergeRequiredAllTypes(value: other.requiredAllTypes)
                }
                if (other.hasOptionalAllTypes) {
                    try mergeOptionalAllTypes(value: other.optionalAllTypes)
                }
                if !other.repeatedAllTypes.isEmpty  {
                     builderResult.repeatedAllTypes += other.repeatedAllTypes
                }
                if (other.hasOptionalGroup) {
                    try mergeOptionalGroup(value: other.optionalGroup)
                }
                if !other.repeatedGroup.isEmpty  {
                     builderResult.repeatedGroup += other.repeatedGroup
                }
                try mergeExtensionFields(other: other)
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.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:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                        if hasRequiredAllTypes {
                            try subBuilder.mergeFrom(other: requiredAllTypes)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        requiredAllTypes = subBuilder.buildPartial()

                    case 18:
                        let subBuilder:ProtobufUnittest.TestAllTypes.Builder = ProtobufUnittest.TestAllTypes.Builder()
                        if hasOptionalAllTypes {
                            try subBuilder.mergeFrom(other: optionalAllTypes)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        optionalAllTypes = subBuilder.buildPartial()

                    case 26:
                        let subBuilder = ProtobufUnittest.TestAllTypes.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        repeatedAllTypes.append(subBuilder.buildPartial())

                    case 83:
                        let subBuilder:ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder = ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder()
                        if hasOptionalGroup {
                            try subBuilder.mergeFrom(other: optionalGroup)
                        }
                        try codedInputStream.readGroup(fieldNumber: 10, builder:subBuilder, extensionRegistry:extensionRegistry)
                        optionalGroup = subBuilder.buildPartial()

                    case 163:
                        let subBuilder = ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder()
                        try codedInputStream.readGroup(fieldNumber:20, builder:subBuilder,extensionRegistry:extensionRegistry)
                        repeatedGroup.append(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 -> ProtobufUnittest.TestParsingMerge.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestParsingMerge.Builder()
                if let jsonValueRequiredAllTypes = jsonMap["requiredAllTypes"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.requiredAllTypes = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:jsonValueRequiredAllTypes).build()

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

                }
                if let jsonValueRepeatedAllTypes = jsonMap["repeatedAllTypes"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedAllTypes:Array<ProtobufUnittest.TestAllTypes> = []
                    for oneValueRepeatedAllTypes in jsonValueRepeatedAllTypes {
                        let messageFromStringRepeatedAllTypes = try ProtobufUnittest.TestAllTypes.Builder.decodeToBuilder(jsonMap:oneValueRepeatedAllTypes).build()

                        jsonArrayRepeatedAllTypes.append(messageFromStringRepeatedAllTypes)
                    }
                    resultDecodedBuilder.repeatedAllTypes = jsonArrayRepeatedAllTypes
                }
                if let jsonValueOptionalGroup = jsonMap["optionalgroup"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.optionalGroup = try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder.decodeToBuilder(jsonMap:jsonValueOptionalGroup).build()

                }
                if let jsonValueRepeatedGroup = jsonMap["repeatedgroup"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayRepeatedGroup:Array<ProtobufUnittest.TestParsingMerge.RepeatedGroup> = []
                    for oneValueRepeatedGroup in jsonValueRepeatedGroup {
                        let messageFromStringRepeatedGroup = try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder.decodeToBuilder(jsonMap:oneValueRepeatedGroup).build()

                        jsonArrayRepeatedGroup.append(messageFromStringRepeatedGroup)
                    }
                    resultDecodedBuilder.repeatedGroup = jsonArrayRepeatedGroup
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestParsingMerge.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 ProtobufUnittest.TestParsingMerge.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class TestCommentInjectionMessage : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestCommentInjectionMessage.Builder

        public static func == (lhs: ProtobufUnittest.TestCommentInjectionMessage, rhs: ProtobufUnittest.TestCommentInjectionMessage) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasA == rhs.hasA) && (!lhs.hasA || lhs.a == rhs.a)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        /// */ <- This should not close the generated doc comment
        public fileprivate(set) var a:String! = "*/ <- Neither should this."
        public fileprivate(set) var hasA:Bool = false

        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasA {
                try codedOutputStream.writeString(fieldNumber: 1, value:a)
            }
            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 hasA {
                serialize_size += a.computeStringSize(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
            return ProtobufUnittest.TestCommentInjectionMessage.classBuilder() as! ProtobufUnittest.TestCommentInjectionMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
            return classBuilder() as! ProtobufUnittest.TestCommentInjectionMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestCommentInjectionMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestCommentInjectionMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
            return try ProtobufUnittest.TestCommentInjectionMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestCommentInjectionMessage) throws -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
            return try ProtobufUnittest.TestCommentInjectionMessage.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasA {
                jsonMap["a"] = a
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestCommentInjectionMessage {
            return try ProtobufUnittest.TestCommentInjectionMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestCommentInjectionMessage {
            return try ProtobufUnittest.TestCommentInjectionMessage.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasA {
                output += "\(indent) a: \(String(describing: a)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasA {
                    hashCode = (hashCode &* 31) &+ a.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// */ <- This should not close the generated doc comment
            public var a:String {
                get {
                    return builderResult.a
                }
                set (value) {
                    builderResult.hasA = true
                    builderResult.a = value
                }
            }
            public var hasA:Bool {
                get {
                    return builderResult.hasA
                }
            }
            @discardableResult
            public func setA(_ value:String) -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
                self.a = value
                return self
            }
            @discardableResult
            public func clearA() -> ProtobufUnittest.TestCommentInjectionMessage.Builder{
                builderResult.hasA = false
                builderResult.a = "*/ <- Neither should this."
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
                builderResult = ProtobufUnittest.TestCommentInjectionMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
                return try ProtobufUnittest.TestCommentInjectionMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.TestCommentInjectionMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.TestCommentInjectionMessage {
                let returnMe:ProtobufUnittest.TestCommentInjectionMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.TestCommentInjectionMessage) throws -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
                if other == ProtobufUnittest.TestCommentInjectionMessage() {
                    return self
                }
                if other.hasA {
                    a = other.a
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestCommentInjectionMessage.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:
                        a = try codedInputStream.readString()

                    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 -> ProtobufUnittest.TestCommentInjectionMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.TestCommentInjectionMessage.Builder()
                if let jsonValueA = jsonMap["a"] as? String {
                    resultDecodedBuilder.a = jsonValueA
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestCommentInjectionMessage.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 ProtobufUnittest.TestCommentInjectionMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    /// Test that RPC services work.
    final public class FooRequest : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.FooRequest.Builder

        public static func == (lhs: ProtobufUnittest.FooRequest, rhs: ProtobufUnittest.FooRequest) -> 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() -> ProtobufUnittest.FooRequest.Builder {
            return ProtobufUnittest.FooRequest.classBuilder() as! ProtobufUnittest.FooRequest.Builder
        }
        public func getBuilder() -> ProtobufUnittest.FooRequest.Builder {
            return classBuilder() as! ProtobufUnittest.FooRequest.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.FooRequest.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.FooRequest.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.FooRequest.Builder {
            return try ProtobufUnittest.FooRequest.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.FooRequest) throws -> ProtobufUnittest.FooRequest.Builder {
            return try ProtobufUnittest.FooRequest.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 -> ProtobufUnittest.FooRequest {
            return try ProtobufUnittest.FooRequest.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.FooRequest {
            return try ProtobufUnittest.FooRequest.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 "ProtobufUnittest.FooRequest"
        }
        override public func className() -> String {
            return "ProtobufUnittest.FooRequest"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.FooRequest.Builder {
                builderResult = ProtobufUnittest.FooRequest()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.FooRequest.Builder {
                return try ProtobufUnittest.FooRequest.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.FooRequest {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.FooRequest {
                let returnMe:ProtobufUnittest.FooRequest = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.FooRequest) throws -> ProtobufUnittest.FooRequest.Builder {
                if other == ProtobufUnittest.FooRequest() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.FooRequest.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooRequest.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 -> ProtobufUnittest.FooRequest.Builder {
                let resultDecodedBuilder = ProtobufUnittest.FooRequest.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.FooRequest.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 ProtobufUnittest.FooRequest.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class FooResponse : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.FooResponse.Builder

        public static func == (lhs: ProtobufUnittest.FooResponse, rhs: ProtobufUnittest.FooResponse) -> 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() -> ProtobufUnittest.FooResponse.Builder {
            return ProtobufUnittest.FooResponse.classBuilder() as! ProtobufUnittest.FooResponse.Builder
        }
        public func getBuilder() -> ProtobufUnittest.FooResponse.Builder {
            return classBuilder() as! ProtobufUnittest.FooResponse.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.FooResponse.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.FooResponse.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.FooResponse.Builder {
            return try ProtobufUnittest.FooResponse.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.FooResponse) throws -> ProtobufUnittest.FooResponse.Builder {
            return try ProtobufUnittest.FooResponse.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 -> ProtobufUnittest.FooResponse {
            return try ProtobufUnittest.FooResponse.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.FooResponse {
            return try ProtobufUnittest.FooResponse.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 "ProtobufUnittest.FooResponse"
        }
        override public func className() -> String {
            return "ProtobufUnittest.FooResponse"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.FooResponse.Builder {
                builderResult = ProtobufUnittest.FooResponse()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.FooResponse.Builder {
                return try ProtobufUnittest.FooResponse.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.FooResponse {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.FooResponse {
                let returnMe:ProtobufUnittest.FooResponse = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.FooResponse) throws -> ProtobufUnittest.FooResponse.Builder {
                if other == ProtobufUnittest.FooResponse() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.FooResponse.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooResponse.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 -> ProtobufUnittest.FooResponse.Builder {
                let resultDecodedBuilder = ProtobufUnittest.FooResponse.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.FooResponse.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 ProtobufUnittest.FooResponse.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class FooClientMessage : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.FooClientMessage.Builder

        public static func == (lhs: ProtobufUnittest.FooClientMessage, rhs: ProtobufUnittest.FooClientMessage) -> 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() -> ProtobufUnittest.FooClientMessage.Builder {
            return ProtobufUnittest.FooClientMessage.classBuilder() as! ProtobufUnittest.FooClientMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.FooClientMessage.Builder {
            return classBuilder() as! ProtobufUnittest.FooClientMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.FooClientMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.FooClientMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.FooClientMessage.Builder {
            return try ProtobufUnittest.FooClientMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.FooClientMessage) throws -> ProtobufUnittest.FooClientMessage.Builder {
            return try ProtobufUnittest.FooClientMessage.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 -> ProtobufUnittest.FooClientMessage {
            return try ProtobufUnittest.FooClientMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.FooClientMessage {
            return try ProtobufUnittest.FooClientMessage.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 "ProtobufUnittest.FooClientMessage"
        }
        override public func className() -> String {
            return "ProtobufUnittest.FooClientMessage"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.FooClientMessage.Builder {
                builderResult = ProtobufUnittest.FooClientMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.FooClientMessage.Builder {
                return try ProtobufUnittest.FooClientMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.FooClientMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.FooClientMessage {
                let returnMe:ProtobufUnittest.FooClientMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.FooClientMessage) throws -> ProtobufUnittest.FooClientMessage.Builder {
                if other == ProtobufUnittest.FooClientMessage() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.FooClientMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooClientMessage.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 -> ProtobufUnittest.FooClientMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.FooClientMessage.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.FooClientMessage.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 ProtobufUnittest.FooClientMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class FooServerMessage : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.FooServerMessage.Builder

        public static func == (lhs: ProtobufUnittest.FooServerMessage, rhs: ProtobufUnittest.FooServerMessage) -> 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() -> ProtobufUnittest.FooServerMessage.Builder {
            return ProtobufUnittest.FooServerMessage.classBuilder() as! ProtobufUnittest.FooServerMessage.Builder
        }
        public func getBuilder() -> ProtobufUnittest.FooServerMessage.Builder {
            return classBuilder() as! ProtobufUnittest.FooServerMessage.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.FooServerMessage.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.FooServerMessage.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.FooServerMessage.Builder {
            return try ProtobufUnittest.FooServerMessage.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.FooServerMessage) throws -> ProtobufUnittest.FooServerMessage.Builder {
            return try ProtobufUnittest.FooServerMessage.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 -> ProtobufUnittest.FooServerMessage {
            return try ProtobufUnittest.FooServerMessage.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.FooServerMessage {
            return try ProtobufUnittest.FooServerMessage.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 "ProtobufUnittest.FooServerMessage"
        }
        override public func className() -> String {
            return "ProtobufUnittest.FooServerMessage"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.FooServerMessage.Builder {
                builderResult = ProtobufUnittest.FooServerMessage()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.FooServerMessage.Builder {
                return try ProtobufUnittest.FooServerMessage.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.FooServerMessage {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.FooServerMessage {
                let returnMe:ProtobufUnittest.FooServerMessage = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.FooServerMessage) throws -> ProtobufUnittest.FooServerMessage.Builder {
                if other == ProtobufUnittest.FooServerMessage() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.FooServerMessage.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooServerMessage.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 -> ProtobufUnittest.FooServerMessage.Builder {
                let resultDecodedBuilder = ProtobufUnittest.FooServerMessage.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.FooServerMessage.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 ProtobufUnittest.FooServerMessage.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class BarRequest : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.BarRequest.Builder

        public static func == (lhs: ProtobufUnittest.BarRequest, rhs: ProtobufUnittest.BarRequest) -> 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() -> ProtobufUnittest.BarRequest.Builder {
            return ProtobufUnittest.BarRequest.classBuilder() as! ProtobufUnittest.BarRequest.Builder
        }
        public func getBuilder() -> ProtobufUnittest.BarRequest.Builder {
            return classBuilder() as! ProtobufUnittest.BarRequest.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.BarRequest.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.BarRequest.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.BarRequest.Builder {
            return try ProtobufUnittest.BarRequest.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.BarRequest) throws -> ProtobufUnittest.BarRequest.Builder {
            return try ProtobufUnittest.BarRequest.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 -> ProtobufUnittest.BarRequest {
            return try ProtobufUnittest.BarRequest.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.BarRequest {
            return try ProtobufUnittest.BarRequest.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 "ProtobufUnittest.BarRequest"
        }
        override public func className() -> String {
            return "ProtobufUnittest.BarRequest"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.BarRequest.Builder {
                builderResult = ProtobufUnittest.BarRequest()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.BarRequest.Builder {
                return try ProtobufUnittest.BarRequest.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.BarRequest {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.BarRequest {
                let returnMe:ProtobufUnittest.BarRequest = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.BarRequest) throws -> ProtobufUnittest.BarRequest.Builder {
                if other == ProtobufUnittest.BarRequest() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.BarRequest.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BarRequest.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 -> ProtobufUnittest.BarRequest.Builder {
                let resultDecodedBuilder = ProtobufUnittest.BarRequest.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.BarRequest.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 ProtobufUnittest.BarRequest.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

    final public class BarResponse : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.BarResponse.Builder

        public static func == (lhs: ProtobufUnittest.BarResponse, rhs: ProtobufUnittest.BarResponse) -> 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() -> ProtobufUnittest.BarResponse.Builder {
            return ProtobufUnittest.BarResponse.classBuilder() as! ProtobufUnittest.BarResponse.Builder
        }
        public func getBuilder() -> ProtobufUnittest.BarResponse.Builder {
            return classBuilder() as! ProtobufUnittest.BarResponse.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.BarResponse.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.BarResponse.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.BarResponse.Builder {
            return try ProtobufUnittest.BarResponse.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.BarResponse) throws -> ProtobufUnittest.BarResponse.Builder {
            return try ProtobufUnittest.BarResponse.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 -> ProtobufUnittest.BarResponse {
            return try ProtobufUnittest.BarResponse.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.BarResponse {
            return try ProtobufUnittest.BarResponse.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 "ProtobufUnittest.BarResponse"
        }
        override public func className() -> String {
            return "ProtobufUnittest.BarResponse"
        }
        //Meta information declaration end

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

            required override public init () {
                super.init()
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.BarResponse.Builder {
                builderResult = ProtobufUnittest.BarResponse()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.BarResponse.Builder {
                return try ProtobufUnittest.BarResponse.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.BarResponse {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.BarResponse {
                let returnMe:ProtobufUnittest.BarResponse = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.BarResponse) throws -> ProtobufUnittest.BarResponse.Builder {
                if other == ProtobufUnittest.BarResponse() {
                    return self
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.BarResponse.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BarResponse.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 -> ProtobufUnittest.BarResponse.Builder {
                let resultDecodedBuilder = ProtobufUnittest.BarResponse.Builder()
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.BarResponse.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 ProtobufUnittest.BarResponse.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

}
extension ProtobufUnittest.TestAllTypes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestAllTypes> {
        var mergedArray = Array<ProtobufUnittest.TestAllTypes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllTypes? {
        return try ProtobufUnittest.TestAllTypes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestAllTypes {
        return try ProtobufUnittest.TestAllTypes.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes {
        return try ProtobufUnittest.TestAllTypes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllTypes {
        return try ProtobufUnittest.TestAllTypes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes {
        return try ProtobufUnittest.TestAllTypes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestAllTypes {
        return try ProtobufUnittest.TestAllTypes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes {
        return try ProtobufUnittest.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 "optionalGroup": return self.optionalGroup
        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 "optionalImportEnum": return self.optionalImportEnum
        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 "repeatedGroup": return self.repeatedGroup
        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 "repeatedImportEnum": return self.repeatedImportEnum
        case "repeatedStringPiece": return self.repeatedStringPiece
        case "repeatedCord": return self.repeatedCord
        case "repeatedLazyMessage": return self.repeatedLazyMessage
        case "defaultInt32": return self.defaultInt32
        case "defaultInt64": return self.defaultInt64
        case "defaultUint32": return self.defaultUint32
        case "defaultUint64": return self.defaultUint64
        case "defaultSint32": return self.defaultSint32
        case "defaultSint64": return self.defaultSint64
        case "defaultFixed32": return self.defaultFixed32
        case "defaultFixed64": return self.defaultFixed64
        case "defaultSfixed32": return self.defaultSfixed32
        case "defaultSfixed64": return self.defaultSfixed64
        case "defaultFloat": return self.defaultFloat
        case "defaultDouble": return self.defaultDouble
        case "defaultBool": return self.defaultBool
        case "defaultString": return self.defaultString
        case "defaultBytes": return self.defaultBytes
        case "defaultNestedEnum": return self.defaultNestedEnum
        case "defaultForeignEnum": return self.defaultForeignEnum
        case "defaultImportEnum": return self.defaultImportEnum
        case "defaultStringPiece": return self.defaultStringPiece
        case "defaultCord": return self.defaultCord
        case "oneofUint32": return self.oneofUint32
        case "oneofNestedMessage": return self.oneofNestedMessage
        case "oneofString": return self.oneofString
        case "oneofBytes": return self.oneofBytes
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestAllTypes.NestedMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestAllTypes.NestedMessage> {
        var mergedArray = Array<ProtobufUnittest.TestAllTypes.NestedMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllTypes.NestedMessage? {
        return try ProtobufUnittest.TestAllTypes.NestedMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestAllTypes.NestedMessage {
        return try ProtobufUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.NestedMessage {
        return try ProtobufUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllTypes.NestedMessage {
        return try ProtobufUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.NestedMessage {
        return try ProtobufUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestAllTypes.NestedMessage {
        return try ProtobufUnittest.TestAllTypes.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.NestedMessage {
        return try ProtobufUnittest.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 ProtobufUnittest.TestAllTypes.OptionalGroup: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestAllTypes.OptionalGroup> {
        var mergedArray = Array<ProtobufUnittest.TestAllTypes.OptionalGroup>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup? {
        return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup {
        return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup {
        return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup {
        return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup {
        return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup {
        return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.OptionalGroup {
        return try ProtobufUnittest.TestAllTypes.OptionalGroup.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestAllTypes.RepeatedGroup: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestAllTypes.RepeatedGroup> {
        var mergedArray = Array<ProtobufUnittest.TestAllTypes.RepeatedGroup>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup? {
        return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
        return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
        return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
        return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
        return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
        return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllTypes.RepeatedGroup {
        return try ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestAllTypes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.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 "optionalGroup": return self.optionalGroup
            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 "optionalImportEnum": return self.optionalImportEnum
            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 "repeatedGroup": return self.repeatedGroup
            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 "repeatedImportEnum": return self.repeatedImportEnum
            case "repeatedStringPiece": return self.repeatedStringPiece
            case "repeatedCord": return self.repeatedCord
            case "repeatedLazyMessage": return self.repeatedLazyMessage
            case "defaultInt32": return self.defaultInt32
            case "defaultInt64": return self.defaultInt64
            case "defaultUint32": return self.defaultUint32
            case "defaultUint64": return self.defaultUint64
            case "defaultSint32": return self.defaultSint32
            case "defaultSint64": return self.defaultSint64
            case "defaultFixed32": return self.defaultFixed32
            case "defaultFixed64": return self.defaultFixed64
            case "defaultSfixed32": return self.defaultSfixed32
            case "defaultSfixed64": return self.defaultSfixed64
            case "defaultFloat": return self.defaultFloat
            case "defaultDouble": return self.defaultDouble
            case "defaultBool": return self.defaultBool
            case "defaultString": return self.defaultString
            case "defaultBytes": return self.defaultBytes
            case "defaultNestedEnum": return self.defaultNestedEnum
            case "defaultForeignEnum": return self.defaultForeignEnum
            case "defaultImportEnum": return self.defaultImportEnum
            case "defaultStringPiece": return self.defaultStringPiece
            case "defaultCord": return self.defaultCord
            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 "optionalGroup":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes.OptionalGroup else {
                    return
                }
                self.optionalGroup = newSubscriptValue
            case "optionalNestedMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes.NestedMessage else {
                    return
                }
                self.optionalNestedMessage = newSubscriptValue
            case "optionalForeignMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.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? ProtobufUnittest.TestAllTypes.NestedEnum else {
                    return
                }
                self.optionalNestedEnum = newSubscriptValue
            case "optionalForeignEnum":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.ForeignEnum else {
                    return
                }
                self.optionalForeignEnum = newSubscriptValue
            case "optionalImportEnum":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittestImport.ImportEnum else {
                    return
                }
                self.optionalImportEnum = 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? ProtobufUnittest.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 "repeatedGroup":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestAllTypes.RepeatedGroup> else {
                    return
                }
                self.repeatedGroup = newSubscriptValue
            case "repeatedNestedMessage":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestAllTypes.NestedMessage> else {
                    return
                }
                self.repeatedNestedMessage = newSubscriptValue
            case "repeatedForeignMessage":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.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<ProtobufUnittest.TestAllTypes.NestedEnum> else {
                    return
                }
                self.repeatedNestedEnum = newSubscriptValue
            case "repeatedForeignEnum":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.ForeignEnum> else {
                    return
                }
                self.repeatedForeignEnum = newSubscriptValue
            case "repeatedImportEnum":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittestImport.ImportEnum> else {
                    return
                }
                self.repeatedImportEnum = 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<ProtobufUnittest.TestAllTypes.NestedMessage> else {
                    return
                }
                self.repeatedLazyMessage = newSubscriptValue
            case "defaultInt32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.defaultInt32 = newSubscriptValue
            case "defaultInt64":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.defaultInt64 = newSubscriptValue
            case "defaultUint32":
                guard let newSubscriptValue = newSubscriptValue as? UInt32 else {
                    return
                }
                self.defaultUint32 = newSubscriptValue
            case "defaultUint64":
                guard let newSubscriptValue = newSubscriptValue as? UInt64 else {
                    return
                }
                self.defaultUint64 = newSubscriptValue
            case "defaultSint32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.defaultSint32 = newSubscriptValue
            case "defaultSint64":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.defaultSint64 = newSubscriptValue
            case "defaultFixed32":
                guard let newSubscriptValue = newSubscriptValue as? UInt32 else {
                    return
                }
                self.defaultFixed32 = newSubscriptValue
            case "defaultFixed64":
                guard let newSubscriptValue = newSubscriptValue as? UInt64 else {
                    return
                }
                self.defaultFixed64 = newSubscriptValue
            case "defaultSfixed32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.defaultSfixed32 = newSubscriptValue
            case "defaultSfixed64":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.defaultSfixed64 = newSubscriptValue
            case "defaultFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.defaultFloat = newSubscriptValue
            case "defaultDouble":
                guard let newSubscriptValue = newSubscriptValue as? Double else {
                    return
                }
                self.defaultDouble = newSubscriptValue
            case "defaultBool":
                guard let newSubscriptValue = newSubscriptValue as? Bool else {
                    return
                }
                self.defaultBool = newSubscriptValue
            case "defaultString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.defaultString = newSubscriptValue
            case "defaultBytes":
                guard let newSubscriptValue = newSubscriptValue as? Data else {
                    return
                }
                self.defaultBytes = newSubscriptValue
            case "defaultNestedEnum":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes.NestedEnum else {
                    return
                }
                self.defaultNestedEnum = newSubscriptValue
            case "defaultForeignEnum":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.ForeignEnum else {
                    return
                }
                self.defaultForeignEnum = newSubscriptValue
            case "defaultImportEnum":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittestImport.ImportEnum else {
                    return
                }
                self.defaultImportEnum = newSubscriptValue
            case "defaultStringPiece":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.defaultStringPiece = newSubscriptValue
            case "defaultCord":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.defaultCord = newSubscriptValue
            case "oneofUint32":
                guard let newSubscriptValue = newSubscriptValue as? UInt32 else {
                    return
                }
                self.oneofUint32 = newSubscriptValue
            case "oneofNestedMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.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 ProtobufUnittest.TestAllTypes.NestedMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.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 ProtobufUnittest.TestAllTypes.OptionalGroup.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestAllTypes.OptionalGroup
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestAllTypes.RepeatedGroup.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestAllTypes.RepeatedGroup
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.NestedTestAllTypes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.NestedTestAllTypes> {
        var mergedArray = Array<ProtobufUnittest.NestedTestAllTypes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.NestedTestAllTypes? {
        return try ProtobufUnittest.NestedTestAllTypes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.NestedTestAllTypes {
        return try ProtobufUnittest.NestedTestAllTypes.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.NestedTestAllTypes {
        return try ProtobufUnittest.NestedTestAllTypes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.NestedTestAllTypes {
        return try ProtobufUnittest.NestedTestAllTypes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.NestedTestAllTypes {
        return try ProtobufUnittest.NestedTestAllTypes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.NestedTestAllTypes {
        return try ProtobufUnittest.NestedTestAllTypes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.NestedTestAllTypes {
        return try ProtobufUnittest.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
        case "repeatedChild": return self.repeatedChild
        default: return nil
        }
    }
}
extension ProtobufUnittest.NestedTestAllTypes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.NestedTestAllTypes
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "child": return self.child
            case "payload": return self.payload
            case "repeatedChild": return self.repeatedChild
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "child":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.NestedTestAllTypes else {
                    return
                }
                self.child = newSubscriptValue
            case "payload":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.payload = newSubscriptValue
            case "repeatedChild":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.NestedTestAllTypes> else {
                    return
                }
                self.repeatedChild = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestDeprecatedFields: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestDeprecatedFields> {
        var mergedArray = Array<ProtobufUnittest.TestDeprecatedFields>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDeprecatedFields? {
        return try ProtobufUnittest.TestDeprecatedFields.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestDeprecatedFields {
        return try ProtobufUnittest.TestDeprecatedFields.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDeprecatedFields {
        return try ProtobufUnittest.TestDeprecatedFields.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDeprecatedFields {
        return try ProtobufUnittest.TestDeprecatedFields.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDeprecatedFields {
        return try ProtobufUnittest.TestDeprecatedFields.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDeprecatedFields {
        return try ProtobufUnittest.TestDeprecatedFields.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDeprecatedFields {
        return try ProtobufUnittest.TestDeprecatedFields.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "deprecatedInt32": return self.deprecatedInt32
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestDeprecatedFields.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestDeprecatedFields
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "deprecatedInt32": return self.deprecatedInt32
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "deprecatedInt32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.deprecatedInt32 = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.ForeignMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.ForeignMessage> {
        var mergedArray = Array<ProtobufUnittest.ForeignMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.ForeignMessage? {
        return try ProtobufUnittest.ForeignMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.ForeignMessage {
        return try ProtobufUnittest.ForeignMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ForeignMessage {
        return try ProtobufUnittest.ForeignMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.ForeignMessage {
        return try ProtobufUnittest.ForeignMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ForeignMessage {
        return try ProtobufUnittest.ForeignMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ForeignMessage {
        return try ProtobufUnittest.ForeignMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ForeignMessage {
        return try ProtobufUnittest.ForeignMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "c": return self.c
        default: return nil
        }
    }
}
extension ProtobufUnittest.ForeignMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.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 ProtobufUnittest.TestReservedFields: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestReservedFields> {
        var mergedArray = Array<ProtobufUnittest.TestReservedFields>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestReservedFields? {
        return try ProtobufUnittest.TestReservedFields.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestReservedFields {
        return try ProtobufUnittest.TestReservedFields.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestReservedFields {
        return try ProtobufUnittest.TestReservedFields.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestReservedFields {
        return try ProtobufUnittest.TestReservedFields.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestReservedFields {
        return try ProtobufUnittest.TestReservedFields.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestReservedFields {
        return try ProtobufUnittest.TestReservedFields.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestReservedFields {
        return try ProtobufUnittest.TestReservedFields.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.TestReservedFields.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestReservedFields
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.TestAllExtensions: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestAllExtensions> {
        var mergedArray = Array<ProtobufUnittest.TestAllExtensions>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllExtensions? {
        return try ProtobufUnittest.TestAllExtensions.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestAllExtensions {
        return try ProtobufUnittest.TestAllExtensions.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllExtensions {
        return try ProtobufUnittest.TestAllExtensions.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestAllExtensions {
        return try ProtobufUnittest.TestAllExtensions.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllExtensions {
        return try ProtobufUnittest.TestAllExtensions.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestAllExtensions {
        return try ProtobufUnittest.TestAllExtensions.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestAllExtensions {
        return try ProtobufUnittest.TestAllExtensions.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.TestAllExtensions.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestAllExtensions
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.OptionalGroupExtension: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.OptionalGroupExtension> {
        var mergedArray = Array<ProtobufUnittest.OptionalGroupExtension>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.OptionalGroupExtension? {
        return try ProtobufUnittest.OptionalGroupExtension.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.OptionalGroupExtension {
        return try ProtobufUnittest.OptionalGroupExtension.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OptionalGroupExtension {
        return try ProtobufUnittest.OptionalGroupExtension.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.OptionalGroupExtension {
        return try ProtobufUnittest.OptionalGroupExtension.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OptionalGroupExtension {
        return try ProtobufUnittest.OptionalGroupExtension.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.OptionalGroupExtension {
        return try ProtobufUnittest.OptionalGroupExtension.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OptionalGroupExtension {
        return try ProtobufUnittest.OptionalGroupExtension.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        default: return nil
        }
    }
}
extension ProtobufUnittest.OptionalGroupExtension.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.OptionalGroupExtension
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.RepeatedGroupExtension: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.RepeatedGroupExtension> {
        var mergedArray = Array<ProtobufUnittest.RepeatedGroupExtension>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.RepeatedGroupExtension? {
        return try ProtobufUnittest.RepeatedGroupExtension.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.RepeatedGroupExtension {
        return try ProtobufUnittest.RepeatedGroupExtension.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.RepeatedGroupExtension {
        return try ProtobufUnittest.RepeatedGroupExtension.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.RepeatedGroupExtension {
        return try ProtobufUnittest.RepeatedGroupExtension.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.RepeatedGroupExtension {
        return try ProtobufUnittest.RepeatedGroupExtension.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.RepeatedGroupExtension {
        return try ProtobufUnittest.RepeatedGroupExtension.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.RepeatedGroupExtension {
        return try ProtobufUnittest.RepeatedGroupExtension.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        default: return nil
        }
    }
}
extension ProtobufUnittest.RepeatedGroupExtension.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.RepeatedGroupExtension
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestNestedExtension: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestNestedExtension> {
        var mergedArray = Array<ProtobufUnittest.TestNestedExtension>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestNestedExtension? {
        return try ProtobufUnittest.TestNestedExtension.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestNestedExtension {
        return try ProtobufUnittest.TestNestedExtension.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedExtension {
        return try ProtobufUnittest.TestNestedExtension.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestNestedExtension {
        return try ProtobufUnittest.TestNestedExtension.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedExtension {
        return try ProtobufUnittest.TestNestedExtension.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestNestedExtension {
        return try ProtobufUnittest.TestNestedExtension.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedExtension {
        return try ProtobufUnittest.TestNestedExtension.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.TestNestedExtension.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestNestedExtension
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.TestRequired: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestRequired> {
        var mergedArray = Array<ProtobufUnittest.TestRequired>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRequired? {
        return try ProtobufUnittest.TestRequired.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestRequired {
        return try ProtobufUnittest.TestRequired.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequired {
        return try ProtobufUnittest.TestRequired.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRequired {
        return try ProtobufUnittest.TestRequired.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequired {
        return try ProtobufUnittest.TestRequired.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRequired {
        return try ProtobufUnittest.TestRequired.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequired {
        return try ProtobufUnittest.TestRequired.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        case "dummy2": return self.dummy2
        case "b": return self.b
        case "dummy4": return self.dummy4
        case "dummy5": return self.dummy5
        case "dummy6": return self.dummy6
        case "dummy7": return self.dummy7
        case "dummy8": return self.dummy8
        case "dummy9": return self.dummy9
        case "dummy10": return self.dummy10
        case "dummy11": return self.dummy11
        case "dummy12": return self.dummy12
        case "dummy13": return self.dummy13
        case "dummy14": return self.dummy14
        case "dummy15": return self.dummy15
        case "dummy16": return self.dummy16
        case "dummy17": return self.dummy17
        case "dummy18": return self.dummy18
        case "dummy19": return self.dummy19
        case "dummy20": return self.dummy20
        case "dummy21": return self.dummy21
        case "dummy22": return self.dummy22
        case "dummy23": return self.dummy23
        case "dummy24": return self.dummy24
        case "dummy25": return self.dummy25
        case "dummy26": return self.dummy26
        case "dummy27": return self.dummy27
        case "dummy28": return self.dummy28
        case "dummy29": return self.dummy29
        case "dummy30": return self.dummy30
        case "dummy31": return self.dummy31
        case "dummy32": return self.dummy32
        case "c": return self.c
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestRequired.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestRequired
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            case "dummy2": return self.dummy2
            case "b": return self.b
            case "dummy4": return self.dummy4
            case "dummy5": return self.dummy5
            case "dummy6": return self.dummy6
            case "dummy7": return self.dummy7
            case "dummy8": return self.dummy8
            case "dummy9": return self.dummy9
            case "dummy10": return self.dummy10
            case "dummy11": return self.dummy11
            case "dummy12": return self.dummy12
            case "dummy13": return self.dummy13
            case "dummy14": return self.dummy14
            case "dummy15": return self.dummy15
            case "dummy16": return self.dummy16
            case "dummy17": return self.dummy17
            case "dummy18": return self.dummy18
            case "dummy19": return self.dummy19
            case "dummy20": return self.dummy20
            case "dummy21": return self.dummy21
            case "dummy22": return self.dummy22
            case "dummy23": return self.dummy23
            case "dummy24": return self.dummy24
            case "dummy25": return self.dummy25
            case "dummy26": return self.dummy26
            case "dummy27": return self.dummy27
            case "dummy28": return self.dummy28
            case "dummy29": return self.dummy29
            case "dummy30": return self.dummy30
            case "dummy31": return self.dummy31
            case "dummy32": return self.dummy32
            case "c": return self.c
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            case "dummy2":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy2 = newSubscriptValue
            case "b":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.b = newSubscriptValue
            case "dummy4":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy4 = newSubscriptValue
            case "dummy5":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy5 = newSubscriptValue
            case "dummy6":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy6 = newSubscriptValue
            case "dummy7":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy7 = newSubscriptValue
            case "dummy8":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy8 = newSubscriptValue
            case "dummy9":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy9 = newSubscriptValue
            case "dummy10":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy10 = newSubscriptValue
            case "dummy11":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy11 = newSubscriptValue
            case "dummy12":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy12 = newSubscriptValue
            case "dummy13":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy13 = newSubscriptValue
            case "dummy14":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy14 = newSubscriptValue
            case "dummy15":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy15 = newSubscriptValue
            case "dummy16":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy16 = newSubscriptValue
            case "dummy17":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy17 = newSubscriptValue
            case "dummy18":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy18 = newSubscriptValue
            case "dummy19":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy19 = newSubscriptValue
            case "dummy20":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy20 = newSubscriptValue
            case "dummy21":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy21 = newSubscriptValue
            case "dummy22":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy22 = newSubscriptValue
            case "dummy23":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy23 = newSubscriptValue
            case "dummy24":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy24 = newSubscriptValue
            case "dummy25":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy25 = newSubscriptValue
            case "dummy26":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy26 = newSubscriptValue
            case "dummy27":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy27 = newSubscriptValue
            case "dummy28":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy28 = newSubscriptValue
            case "dummy29":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy29 = newSubscriptValue
            case "dummy30":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy30 = newSubscriptValue
            case "dummy31":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy31 = newSubscriptValue
            case "dummy32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy32 = newSubscriptValue
            case "c":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.c = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestRequiredForeign: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestRequiredForeign> {
        var mergedArray = Array<ProtobufUnittest.TestRequiredForeign>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRequiredForeign? {
        return try ProtobufUnittest.TestRequiredForeign.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestRequiredForeign {
        return try ProtobufUnittest.TestRequiredForeign.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredForeign {
        return try ProtobufUnittest.TestRequiredForeign.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRequiredForeign {
        return try ProtobufUnittest.TestRequiredForeign.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredForeign {
        return try ProtobufUnittest.TestRequiredForeign.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRequiredForeign {
        return try ProtobufUnittest.TestRequiredForeign.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredForeign {
        return try ProtobufUnittest.TestRequiredForeign.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "optionalMessage": return self.optionalMessage
        case "repeatedMessage": return self.repeatedMessage
        case "dummy": return self.dummy
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestRequiredForeign.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestRequiredForeign
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "optionalMessage": return self.optionalMessage
            case "repeatedMessage": return self.repeatedMessage
            case "dummy": return self.dummy
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "optionalMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestRequired else {
                    return
                }
                self.optionalMessage = newSubscriptValue
            case "repeatedMessage":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestRequired> else {
                    return
                }
                self.repeatedMessage = newSubscriptValue
            case "dummy":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dummy = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestForeignNested: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestForeignNested> {
        var mergedArray = Array<ProtobufUnittest.TestForeignNested>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestForeignNested? {
        return try ProtobufUnittest.TestForeignNested.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestForeignNested {
        return try ProtobufUnittest.TestForeignNested.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestForeignNested {
        return try ProtobufUnittest.TestForeignNested.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestForeignNested {
        return try ProtobufUnittest.TestForeignNested.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestForeignNested {
        return try ProtobufUnittest.TestForeignNested.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestForeignNested {
        return try ProtobufUnittest.TestForeignNested.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestForeignNested {
        return try ProtobufUnittest.TestForeignNested.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "foreignNested": return self.foreignNested
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestForeignNested.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestForeignNested
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "foreignNested": return self.foreignNested
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "foreignNested":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes.NestedMessage else {
                    return
                }
                self.foreignNested = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestEmptyMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestEmptyMessage> {
        var mergedArray = Array<ProtobufUnittest.TestEmptyMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestEmptyMessage? {
        return try ProtobufUnittest.TestEmptyMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestEmptyMessage {
        return try ProtobufUnittest.TestEmptyMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEmptyMessage {
        return try ProtobufUnittest.TestEmptyMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestEmptyMessage {
        return try ProtobufUnittest.TestEmptyMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEmptyMessage {
        return try ProtobufUnittest.TestEmptyMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestEmptyMessage {
        return try ProtobufUnittest.TestEmptyMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEmptyMessage {
        return try ProtobufUnittest.TestEmptyMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.TestEmptyMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestEmptyMessage
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.TestEmptyMessageWithExtensions: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestEmptyMessageWithExtensions> {
        var mergedArray = Array<ProtobufUnittest.TestEmptyMessageWithExtensions>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions? {
        return try ProtobufUnittest.TestEmptyMessageWithExtensions.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions {
        return try ProtobufUnittest.TestEmptyMessageWithExtensions.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions {
        return try ProtobufUnittest.TestEmptyMessageWithExtensions.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions {
        return try ProtobufUnittest.TestEmptyMessageWithExtensions.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions {
        return try ProtobufUnittest.TestEmptyMessageWithExtensions.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions {
        return try ProtobufUnittest.TestEmptyMessageWithExtensions.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEmptyMessageWithExtensions {
        return try ProtobufUnittest.TestEmptyMessageWithExtensions.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.TestEmptyMessageWithExtensions.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestEmptyMessageWithExtensions
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.TestMultipleExtensionRanges: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestMultipleExtensionRanges> {
        var mergedArray = Array<ProtobufUnittest.TestMultipleExtensionRanges>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestMultipleExtensionRanges? {
        return try ProtobufUnittest.TestMultipleExtensionRanges.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestMultipleExtensionRanges {
        return try ProtobufUnittest.TestMultipleExtensionRanges.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMultipleExtensionRanges {
        return try ProtobufUnittest.TestMultipleExtensionRanges.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestMultipleExtensionRanges {
        return try ProtobufUnittest.TestMultipleExtensionRanges.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMultipleExtensionRanges {
        return try ProtobufUnittest.TestMultipleExtensionRanges.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestMultipleExtensionRanges {
        return try ProtobufUnittest.TestMultipleExtensionRanges.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMultipleExtensionRanges {
        return try ProtobufUnittest.TestMultipleExtensionRanges.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.TestMultipleExtensionRanges.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestMultipleExtensionRanges
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.TestReallyLargeTagNumber: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestReallyLargeTagNumber> {
        var mergedArray = Array<ProtobufUnittest.TestReallyLargeTagNumber>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestReallyLargeTagNumber? {
        return try ProtobufUnittest.TestReallyLargeTagNumber.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestReallyLargeTagNumber {
        return try ProtobufUnittest.TestReallyLargeTagNumber.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestReallyLargeTagNumber {
        return try ProtobufUnittest.TestReallyLargeTagNumber.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestReallyLargeTagNumber {
        return try ProtobufUnittest.TestReallyLargeTagNumber.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestReallyLargeTagNumber {
        return try ProtobufUnittest.TestReallyLargeTagNumber.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestReallyLargeTagNumber {
        return try ProtobufUnittest.TestReallyLargeTagNumber.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestReallyLargeTagNumber {
        return try ProtobufUnittest.TestReallyLargeTagNumber.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        case "bb": return self.bb
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestReallyLargeTagNumber.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestReallyLargeTagNumber
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            case "bb": return self.bb
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            case "bb":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.bb = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestRecursiveMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestRecursiveMessage> {
        var mergedArray = Array<ProtobufUnittest.TestRecursiveMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRecursiveMessage? {
        return try ProtobufUnittest.TestRecursiveMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestRecursiveMessage {
        return try ProtobufUnittest.TestRecursiveMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRecursiveMessage {
        return try ProtobufUnittest.TestRecursiveMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRecursiveMessage {
        return try ProtobufUnittest.TestRecursiveMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRecursiveMessage {
        return try ProtobufUnittest.TestRecursiveMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRecursiveMessage {
        return try ProtobufUnittest.TestRecursiveMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRecursiveMessage {
        return try ProtobufUnittest.TestRecursiveMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        case "i": return self.i
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestRecursiveMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestRecursiveMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            case "i": return self.i
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestRecursiveMessage else {
                    return
                }
                self.a = newSubscriptValue
            case "i":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.i = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestMutualRecursionA: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestMutualRecursionA> {
        var mergedArray = Array<ProtobufUnittest.TestMutualRecursionA>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestMutualRecursionA? {
        return try ProtobufUnittest.TestMutualRecursionA.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestMutualRecursionA {
        return try ProtobufUnittest.TestMutualRecursionA.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMutualRecursionA {
        return try ProtobufUnittest.TestMutualRecursionA.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestMutualRecursionA {
        return try ProtobufUnittest.TestMutualRecursionA.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMutualRecursionA {
        return try ProtobufUnittest.TestMutualRecursionA.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestMutualRecursionA {
        return try ProtobufUnittest.TestMutualRecursionA.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMutualRecursionA {
        return try ProtobufUnittest.TestMutualRecursionA.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "bb": return self.bb
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestMutualRecursionA.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestMutualRecursionA
    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? ProtobufUnittest.TestMutualRecursionB else {
                    return
                }
                self.bb = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestMutualRecursionB: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestMutualRecursionB> {
        var mergedArray = Array<ProtobufUnittest.TestMutualRecursionB>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestMutualRecursionB? {
        return try ProtobufUnittest.TestMutualRecursionB.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestMutualRecursionB {
        return try ProtobufUnittest.TestMutualRecursionB.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMutualRecursionB {
        return try ProtobufUnittest.TestMutualRecursionB.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestMutualRecursionB {
        return try ProtobufUnittest.TestMutualRecursionB.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMutualRecursionB {
        return try ProtobufUnittest.TestMutualRecursionB.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestMutualRecursionB {
        return try ProtobufUnittest.TestMutualRecursionB.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMutualRecursionB {
        return try ProtobufUnittest.TestMutualRecursionB.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        case "optionalInt32": return self.optionalInt32
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestMutualRecursionB.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestMutualRecursionB
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            case "optionalInt32": return self.optionalInt32
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestMutualRecursionA else {
                    return
                }
                self.a = newSubscriptValue
            case "optionalInt32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.optionalInt32 = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestDupFieldNumber: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestDupFieldNumber> {
        var mergedArray = Array<ProtobufUnittest.TestDupFieldNumber>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDupFieldNumber? {
        return try ProtobufUnittest.TestDupFieldNumber.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestDupFieldNumber {
        return try ProtobufUnittest.TestDupFieldNumber.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber {
        return try ProtobufUnittest.TestDupFieldNumber.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDupFieldNumber {
        return try ProtobufUnittest.TestDupFieldNumber.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber {
        return try ProtobufUnittest.TestDupFieldNumber.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDupFieldNumber {
        return try ProtobufUnittest.TestDupFieldNumber.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber {
        return try ProtobufUnittest.TestDupFieldNumber.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        case "foo": return self.foo
        case "bar": return self.bar
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestDupFieldNumber.Foo: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestDupFieldNumber.Foo> {
        var mergedArray = Array<ProtobufUnittest.TestDupFieldNumber.Foo>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDupFieldNumber.Foo? {
        return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestDupFieldNumber.Foo {
        return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber.Foo {
        return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDupFieldNumber.Foo {
        return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber.Foo {
        return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDupFieldNumber.Foo {
        return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber.Foo {
        return try ProtobufUnittest.TestDupFieldNumber.Foo.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestDupFieldNumber.Bar: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestDupFieldNumber.Bar> {
        var mergedArray = Array<ProtobufUnittest.TestDupFieldNumber.Bar>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDupFieldNumber.Bar? {
        return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestDupFieldNumber.Bar {
        return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber.Bar {
        return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDupFieldNumber.Bar {
        return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber.Bar {
        return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDupFieldNumber.Bar {
        return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDupFieldNumber.Bar {
        return try ProtobufUnittest.TestDupFieldNumber.Bar.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestDupFieldNumber.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestDupFieldNumber
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            case "foo": return self.foo
            case "bar": return self.bar
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            case "foo":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestDupFieldNumber.Foo else {
                    return
                }
                self.foo = newSubscriptValue
            case "bar":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestDupFieldNumber.Bar else {
                    return
                }
                self.bar = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestDupFieldNumber.Foo.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestDupFieldNumber.Foo
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestDupFieldNumber.Bar.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestDupFieldNumber.Bar
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestEagerMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestEagerMessage> {
        var mergedArray = Array<ProtobufUnittest.TestEagerMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestEagerMessage? {
        return try ProtobufUnittest.TestEagerMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestEagerMessage {
        return try ProtobufUnittest.TestEagerMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEagerMessage {
        return try ProtobufUnittest.TestEagerMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestEagerMessage {
        return try ProtobufUnittest.TestEagerMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEagerMessage {
        return try ProtobufUnittest.TestEagerMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestEagerMessage {
        return try ProtobufUnittest.TestEagerMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestEagerMessage {
        return try ProtobufUnittest.TestEagerMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "subMessage": return self.subMessage
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestEagerMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestEagerMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "subMessage": return self.subMessage
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "subMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.subMessage = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestLazyMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestLazyMessage> {
        var mergedArray = Array<ProtobufUnittest.TestLazyMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestLazyMessage? {
        return try ProtobufUnittest.TestLazyMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestLazyMessage {
        return try ProtobufUnittest.TestLazyMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestLazyMessage {
        return try ProtobufUnittest.TestLazyMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestLazyMessage {
        return try ProtobufUnittest.TestLazyMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestLazyMessage {
        return try ProtobufUnittest.TestLazyMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestLazyMessage {
        return try ProtobufUnittest.TestLazyMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestLazyMessage {
        return try ProtobufUnittest.TestLazyMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "subMessage": return self.subMessage
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestLazyMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestLazyMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "subMessage": return self.subMessage
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "subMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.subMessage = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestNestedMessageHasBits: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestNestedMessageHasBits> {
        var mergedArray = Array<ProtobufUnittest.TestNestedMessageHasBits>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestNestedMessageHasBits? {
        return try ProtobufUnittest.TestNestedMessageHasBits.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestNestedMessageHasBits {
        return try ProtobufUnittest.TestNestedMessageHasBits.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedMessageHasBits {
        return try ProtobufUnittest.TestNestedMessageHasBits.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestNestedMessageHasBits {
        return try ProtobufUnittest.TestNestedMessageHasBits.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedMessageHasBits {
        return try ProtobufUnittest.TestNestedMessageHasBits.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestNestedMessageHasBits {
        return try ProtobufUnittest.TestNestedMessageHasBits.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedMessageHasBits {
        return try ProtobufUnittest.TestNestedMessageHasBits.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "optionalNestedMessage": return self.optionalNestedMessage
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestNestedMessageHasBits.NestedMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestNestedMessageHasBits.NestedMessage> {
        var mergedArray = Array<ProtobufUnittest.TestNestedMessageHasBits.NestedMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage? {
        return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
        return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
        return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
        return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
        return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
        return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestNestedMessageHasBits.NestedMessage {
        return try ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "nestedmessageRepeatedInt32": return self.nestedmessageRepeatedInt32
        case "nestedmessageRepeatedForeignmessage": return self.nestedmessageRepeatedForeignmessage
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestNestedMessageHasBits.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestNestedMessageHasBits
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "optionalNestedMessage": return self.optionalNestedMessage
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "optionalNestedMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestNestedMessageHasBits.NestedMessage else {
                    return
                }
                self.optionalNestedMessage = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestNestedMessageHasBits.NestedMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestNestedMessageHasBits.NestedMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "nestedmessageRepeatedInt32": return self.nestedmessageRepeatedInt32
            case "nestedmessageRepeatedForeignmessage": return self.nestedmessageRepeatedForeignmessage
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "nestedmessageRepeatedInt32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.nestedmessageRepeatedInt32 = newSubscriptValue
            case "nestedmessageRepeatedForeignmessage":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.ForeignMessage> else {
                    return
                }
                self.nestedmessageRepeatedForeignmessage = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestCamelCaseFieldNames: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestCamelCaseFieldNames> {
        var mergedArray = Array<ProtobufUnittest.TestCamelCaseFieldNames>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestCamelCaseFieldNames? {
        return try ProtobufUnittest.TestCamelCaseFieldNames.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestCamelCaseFieldNames {
        return try ProtobufUnittest.TestCamelCaseFieldNames.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestCamelCaseFieldNames {
        return try ProtobufUnittest.TestCamelCaseFieldNames.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestCamelCaseFieldNames {
        return try ProtobufUnittest.TestCamelCaseFieldNames.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestCamelCaseFieldNames {
        return try ProtobufUnittest.TestCamelCaseFieldNames.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestCamelCaseFieldNames {
        return try ProtobufUnittest.TestCamelCaseFieldNames.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestCamelCaseFieldNames {
        return try ProtobufUnittest.TestCamelCaseFieldNames.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "primitiveField": return self.primitiveField
        case "stringField": return self.stringField
        case "enumField": return self.enumField
        case "messageField": return self.messageField
        case "stringPieceField": return self.stringPieceField
        case "cordField": return self.cordField
        case "repeatedPrimitiveField": return self.repeatedPrimitiveField
        case "repeatedStringField": return self.repeatedStringField
        case "repeatedEnumField": return self.repeatedEnumField
        case "repeatedMessageField": return self.repeatedMessageField
        case "repeatedStringPieceField": return self.repeatedStringPieceField
        case "repeatedCordField": return self.repeatedCordField
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestCamelCaseFieldNames.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestCamelCaseFieldNames
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "primitiveField": return self.primitiveField
            case "stringField": return self.stringField
            case "enumField": return self.enumField
            case "messageField": return self.messageField
            case "stringPieceField": return self.stringPieceField
            case "cordField": return self.cordField
            case "repeatedPrimitiveField": return self.repeatedPrimitiveField
            case "repeatedStringField": return self.repeatedStringField
            case "repeatedEnumField": return self.repeatedEnumField
            case "repeatedMessageField": return self.repeatedMessageField
            case "repeatedStringPieceField": return self.repeatedStringPieceField
            case "repeatedCordField": return self.repeatedCordField
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "primitiveField":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.primitiveField = newSubscriptValue
            case "stringField":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.stringField = newSubscriptValue
            case "enumField":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.ForeignEnum else {
                    return
                }
                self.enumField = newSubscriptValue
            case "messageField":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.ForeignMessage else {
                    return
                }
                self.messageField = newSubscriptValue
            case "stringPieceField":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.stringPieceField = newSubscriptValue
            case "cordField":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.cordField = newSubscriptValue
            case "repeatedPrimitiveField":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.repeatedPrimitiveField = newSubscriptValue
            case "repeatedStringField":
                guard let newSubscriptValue = newSubscriptValue as? Array<String> else {
                    return
                }
                self.repeatedStringField = newSubscriptValue
            case "repeatedEnumField":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.ForeignEnum> else {
                    return
                }
                self.repeatedEnumField = newSubscriptValue
            case "repeatedMessageField":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.ForeignMessage> else {
                    return
                }
                self.repeatedMessageField = newSubscriptValue
            case "repeatedStringPieceField":
                guard let newSubscriptValue = newSubscriptValue as? Array<String> else {
                    return
                }
                self.repeatedStringPieceField = newSubscriptValue
            case "repeatedCordField":
                guard let newSubscriptValue = newSubscriptValue as? Array<String> else {
                    return
                }
                self.repeatedCordField = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestFieldOrderings: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestFieldOrderings> {
        var mergedArray = Array<ProtobufUnittest.TestFieldOrderings>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestFieldOrderings? {
        return try ProtobufUnittest.TestFieldOrderings.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestFieldOrderings {
        return try ProtobufUnittest.TestFieldOrderings.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestFieldOrderings {
        return try ProtobufUnittest.TestFieldOrderings.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestFieldOrderings {
        return try ProtobufUnittest.TestFieldOrderings.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestFieldOrderings {
        return try ProtobufUnittest.TestFieldOrderings.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestFieldOrderings {
        return try ProtobufUnittest.TestFieldOrderings.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestFieldOrderings {
        return try ProtobufUnittest.TestFieldOrderings.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "myString": return self.myString
        case "myInt": return self.myInt
        case "myFloat": return self.myFloat
        case "optionalNestedMessage": return self.optionalNestedMessage
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestFieldOrderings.NestedMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestFieldOrderings.NestedMessage> {
        var mergedArray = Array<ProtobufUnittest.TestFieldOrderings.NestedMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage? {
        return try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
        return try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
        return try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
        return try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
        return try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
        return try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestFieldOrderings.NestedMessage {
        return try ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "oo": return self.oo
        case "bb": return self.bb
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestFieldOrderings.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestFieldOrderings
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "myString": return self.myString
            case "myInt": return self.myInt
            case "myFloat": return self.myFloat
            case "optionalNestedMessage": return self.optionalNestedMessage
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "myString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.myString = newSubscriptValue
            case "myInt":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.myInt = newSubscriptValue
            case "myFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.myFloat = newSubscriptValue
            case "optionalNestedMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestFieldOrderings.NestedMessage else {
                    return
                }
                self.optionalNestedMessage = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestFieldOrderings.NestedMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestFieldOrderings.NestedMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "oo": return self.oo
            case "bb": return self.bb
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "oo":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.oo = newSubscriptValue
            case "bb":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.bb = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestExtremeDefaultValues: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestExtremeDefaultValues> {
        var mergedArray = Array<ProtobufUnittest.TestExtremeDefaultValues>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestExtremeDefaultValues? {
        return try ProtobufUnittest.TestExtremeDefaultValues.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestExtremeDefaultValues {
        return try ProtobufUnittest.TestExtremeDefaultValues.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestExtremeDefaultValues {
        return try ProtobufUnittest.TestExtremeDefaultValues.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestExtremeDefaultValues {
        return try ProtobufUnittest.TestExtremeDefaultValues.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestExtremeDefaultValues {
        return try ProtobufUnittest.TestExtremeDefaultValues.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestExtremeDefaultValues {
        return try ProtobufUnittest.TestExtremeDefaultValues.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestExtremeDefaultValues {
        return try ProtobufUnittest.TestExtremeDefaultValues.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "escapedBytes": return self.escapedBytes
        case "largeUint32": return self.largeUint32
        case "largeUint64": return self.largeUint64
        case "smallInt32": return self.smallInt32
        case "smallInt64": return self.smallInt64
        case "reallySmallInt32": return self.reallySmallInt32
        case "reallySmallInt64": return self.reallySmallInt64
        case "utf8String": return self.utf8String
        case "zeroFloat": return self.zeroFloat
        case "oneFloat": return self.oneFloat
        case "smallFloat": return self.smallFloat
        case "negativeOneFloat": return self.negativeOneFloat
        case "negativeFloat": return self.negativeFloat
        case "largeFloat": return self.largeFloat
        case "smallNegativeFloat": return self.smallNegativeFloat
        case "infDouble": return self.infDouble
        case "negInfDouble": return self.negInfDouble
        case "nanDouble": return self.nanDouble
        case "infFloat": return self.infFloat
        case "negInfFloat": return self.negInfFloat
        case "nanFloat": return self.nanFloat
        case "cppTrigraph": return self.cppTrigraph
        case "stringWithZero": return self.stringWithZero
        case "bytesWithZero": return self.bytesWithZero
        case "stringPieceWithZero": return self.stringPieceWithZero
        case "cordWithZero": return self.cordWithZero
        case "replacementString": return self.replacementString
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestExtremeDefaultValues.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestExtremeDefaultValues
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "escapedBytes": return self.escapedBytes
            case "largeUint32": return self.largeUint32
            case "largeUint64": return self.largeUint64
            case "smallInt32": return self.smallInt32
            case "smallInt64": return self.smallInt64
            case "reallySmallInt32": return self.reallySmallInt32
            case "reallySmallInt64": return self.reallySmallInt64
            case "utf8String": return self.utf8String
            case "zeroFloat": return self.zeroFloat
            case "oneFloat": return self.oneFloat
            case "smallFloat": return self.smallFloat
            case "negativeOneFloat": return self.negativeOneFloat
            case "negativeFloat": return self.negativeFloat
            case "largeFloat": return self.largeFloat
            case "smallNegativeFloat": return self.smallNegativeFloat
            case "infDouble": return self.infDouble
            case "negInfDouble": return self.negInfDouble
            case "nanDouble": return self.nanDouble
            case "infFloat": return self.infFloat
            case "negInfFloat": return self.negInfFloat
            case "nanFloat": return self.nanFloat
            case "cppTrigraph": return self.cppTrigraph
            case "stringWithZero": return self.stringWithZero
            case "bytesWithZero": return self.bytesWithZero
            case "stringPieceWithZero": return self.stringPieceWithZero
            case "cordWithZero": return self.cordWithZero
            case "replacementString": return self.replacementString
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "escapedBytes":
                guard let newSubscriptValue = newSubscriptValue as? Data else {
                    return
                }
                self.escapedBytes = newSubscriptValue
            case "largeUint32":
                guard let newSubscriptValue = newSubscriptValue as? UInt32 else {
                    return
                }
                self.largeUint32 = newSubscriptValue
            case "largeUint64":
                guard let newSubscriptValue = newSubscriptValue as? UInt64 else {
                    return
                }
                self.largeUint64 = newSubscriptValue
            case "smallInt32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.smallInt32 = newSubscriptValue
            case "smallInt64":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.smallInt64 = newSubscriptValue
            case "reallySmallInt32":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.reallySmallInt32 = newSubscriptValue
            case "reallySmallInt64":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.reallySmallInt64 = newSubscriptValue
            case "utf8String":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.utf8String = newSubscriptValue
            case "zeroFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.zeroFloat = newSubscriptValue
            case "oneFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.oneFloat = newSubscriptValue
            case "smallFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.smallFloat = newSubscriptValue
            case "negativeOneFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.negativeOneFloat = newSubscriptValue
            case "negativeFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.negativeFloat = newSubscriptValue
            case "largeFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.largeFloat = newSubscriptValue
            case "smallNegativeFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.smallNegativeFloat = newSubscriptValue
            case "infDouble":
                guard let newSubscriptValue = newSubscriptValue as? Double else {
                    return
                }
                self.infDouble = newSubscriptValue
            case "negInfDouble":
                guard let newSubscriptValue = newSubscriptValue as? Double else {
                    return
                }
                self.negInfDouble = newSubscriptValue
            case "nanDouble":
                guard let newSubscriptValue = newSubscriptValue as? Double else {
                    return
                }
                self.nanDouble = newSubscriptValue
            case "infFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.infFloat = newSubscriptValue
            case "negInfFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.negInfFloat = newSubscriptValue
            case "nanFloat":
                guard let newSubscriptValue = newSubscriptValue as? Float else {
                    return
                }
                self.nanFloat = newSubscriptValue
            case "cppTrigraph":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.cppTrigraph = newSubscriptValue
            case "stringWithZero":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.stringWithZero = newSubscriptValue
            case "bytesWithZero":
                guard let newSubscriptValue = newSubscriptValue as? Data else {
                    return
                }
                self.bytesWithZero = newSubscriptValue
            case "stringPieceWithZero":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.stringPieceWithZero = newSubscriptValue
            case "cordWithZero":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.cordWithZero = newSubscriptValue
            case "replacementString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.replacementString = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.SparseEnumMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.SparseEnumMessage> {
        var mergedArray = Array<ProtobufUnittest.SparseEnumMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.SparseEnumMessage? {
        return try ProtobufUnittest.SparseEnumMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.SparseEnumMessage {
        return try ProtobufUnittest.SparseEnumMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SparseEnumMessage {
        return try ProtobufUnittest.SparseEnumMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.SparseEnumMessage {
        return try ProtobufUnittest.SparseEnumMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SparseEnumMessage {
        return try ProtobufUnittest.SparseEnumMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.SparseEnumMessage {
        return try ProtobufUnittest.SparseEnumMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SparseEnumMessage {
        return try ProtobufUnittest.SparseEnumMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "sparseEnum": return self.sparseEnum
        default: return nil
        }
    }
}
extension ProtobufUnittest.SparseEnumMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.SparseEnumMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "sparseEnum": return self.sparseEnum
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "sparseEnum":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestSparseEnum else {
                    return
                }
                self.sparseEnum = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.OneString: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.OneString> {
        var mergedArray = Array<ProtobufUnittest.OneString>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.OneString? {
        return try ProtobufUnittest.OneString.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.OneString {
        return try ProtobufUnittest.OneString.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OneString {
        return try ProtobufUnittest.OneString.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.OneString {
        return try ProtobufUnittest.OneString.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OneString {
        return try ProtobufUnittest.OneString.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.OneString {
        return try ProtobufUnittest.OneString.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OneString {
        return try ProtobufUnittest.OneString.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "data": return self.data
        default: return nil
        }
    }
}
extension ProtobufUnittest.OneString.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.OneString
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "data": return self.data
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "data":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.data = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.MoreString: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.MoreString> {
        var mergedArray = Array<ProtobufUnittest.MoreString>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.MoreString? {
        return try ProtobufUnittest.MoreString.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.MoreString {
        return try ProtobufUnittest.MoreString.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.MoreString {
        return try ProtobufUnittest.MoreString.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.MoreString {
        return try ProtobufUnittest.MoreString.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.MoreString {
        return try ProtobufUnittest.MoreString.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.MoreString {
        return try ProtobufUnittest.MoreString.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.MoreString {
        return try ProtobufUnittest.MoreString.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "data": return self.data
        default: return nil
        }
    }
}
extension ProtobufUnittest.MoreString.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.MoreString
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "data": return self.data
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "data":
                guard let newSubscriptValue = newSubscriptValue as? Array<String> else {
                    return
                }
                self.data = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.OneBytes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.OneBytes> {
        var mergedArray = Array<ProtobufUnittest.OneBytes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.OneBytes? {
        return try ProtobufUnittest.OneBytes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.OneBytes {
        return try ProtobufUnittest.OneBytes.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OneBytes {
        return try ProtobufUnittest.OneBytes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.OneBytes {
        return try ProtobufUnittest.OneBytes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OneBytes {
        return try ProtobufUnittest.OneBytes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.OneBytes {
        return try ProtobufUnittest.OneBytes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.OneBytes {
        return try ProtobufUnittest.OneBytes.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "data": return self.data
        default: return nil
        }
    }
}
extension ProtobufUnittest.OneBytes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.OneBytes
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "data": return self.data
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "data":
                guard let newSubscriptValue = newSubscriptValue as? Data else {
                    return
                }
                self.data = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.MoreBytes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.MoreBytes> {
        var mergedArray = Array<ProtobufUnittest.MoreBytes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.MoreBytes? {
        return try ProtobufUnittest.MoreBytes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.MoreBytes {
        return try ProtobufUnittest.MoreBytes.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.MoreBytes {
        return try ProtobufUnittest.MoreBytes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.MoreBytes {
        return try ProtobufUnittest.MoreBytes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.MoreBytes {
        return try ProtobufUnittest.MoreBytes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.MoreBytes {
        return try ProtobufUnittest.MoreBytes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.MoreBytes {
        return try ProtobufUnittest.MoreBytes.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "data": return self.data
        default: return nil
        }
    }
}
extension ProtobufUnittest.MoreBytes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.MoreBytes
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "data": return self.data
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "data":
                guard let newSubscriptValue = newSubscriptValue as? Array<Data> else {
                    return
                }
                self.data = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.Int32Message: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.Int32Message> {
        var mergedArray = Array<ProtobufUnittest.Int32Message>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.Int32Message? {
        return try ProtobufUnittest.Int32Message.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.Int32Message {
        return try ProtobufUnittest.Int32Message.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Int32Message {
        return try ProtobufUnittest.Int32Message.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.Int32Message {
        return try ProtobufUnittest.Int32Message.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Int32Message {
        return try ProtobufUnittest.Int32Message.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Int32Message {
        return try ProtobufUnittest.Int32Message.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Int32Message {
        return try ProtobufUnittest.Int32Message.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "data": return self.data
        default: return nil
        }
    }
}
extension ProtobufUnittest.Int32Message.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.Int32Message
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "data": return self.data
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "data":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.data = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.Uint32Message: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.Uint32Message> {
        var mergedArray = Array<ProtobufUnittest.Uint32Message>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.Uint32Message? {
        return try ProtobufUnittest.Uint32Message.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.Uint32Message {
        return try ProtobufUnittest.Uint32Message.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Uint32Message {
        return try ProtobufUnittest.Uint32Message.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.Uint32Message {
        return try ProtobufUnittest.Uint32Message.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Uint32Message {
        return try ProtobufUnittest.Uint32Message.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Uint32Message {
        return try ProtobufUnittest.Uint32Message.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Uint32Message {
        return try ProtobufUnittest.Uint32Message.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "data": return self.data
        default: return nil
        }
    }
}
extension ProtobufUnittest.Uint32Message.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.Uint32Message
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "data": return self.data
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "data":
                guard let newSubscriptValue = newSubscriptValue as? UInt32 else {
                    return
                }
                self.data = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.Int64Message: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.Int64Message> {
        var mergedArray = Array<ProtobufUnittest.Int64Message>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.Int64Message? {
        return try ProtobufUnittest.Int64Message.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.Int64Message {
        return try ProtobufUnittest.Int64Message.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Int64Message {
        return try ProtobufUnittest.Int64Message.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.Int64Message {
        return try ProtobufUnittest.Int64Message.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Int64Message {
        return try ProtobufUnittest.Int64Message.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Int64Message {
        return try ProtobufUnittest.Int64Message.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Int64Message {
        return try ProtobufUnittest.Int64Message.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "data": return self.data
        default: return nil
        }
    }
}
extension ProtobufUnittest.Int64Message.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.Int64Message
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "data": return self.data
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "data":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.data = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.Uint64Message: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.Uint64Message> {
        var mergedArray = Array<ProtobufUnittest.Uint64Message>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.Uint64Message? {
        return try ProtobufUnittest.Uint64Message.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.Uint64Message {
        return try ProtobufUnittest.Uint64Message.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Uint64Message {
        return try ProtobufUnittest.Uint64Message.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.Uint64Message {
        return try ProtobufUnittest.Uint64Message.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Uint64Message {
        return try ProtobufUnittest.Uint64Message.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Uint64Message {
        return try ProtobufUnittest.Uint64Message.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Uint64Message {
        return try ProtobufUnittest.Uint64Message.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "data": return self.data
        default: return nil
        }
    }
}
extension ProtobufUnittest.Uint64Message.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.Uint64Message
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "data": return self.data
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "data":
                guard let newSubscriptValue = newSubscriptValue as? UInt64 else {
                    return
                }
                self.data = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.BoolMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.BoolMessage> {
        var mergedArray = Array<ProtobufUnittest.BoolMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.BoolMessage? {
        return try ProtobufUnittest.BoolMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.BoolMessage {
        return try ProtobufUnittest.BoolMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BoolMessage {
        return try ProtobufUnittest.BoolMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.BoolMessage {
        return try ProtobufUnittest.BoolMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BoolMessage {
        return try ProtobufUnittest.BoolMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.BoolMessage {
        return try ProtobufUnittest.BoolMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BoolMessage {
        return try ProtobufUnittest.BoolMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "data": return self.data
        default: return nil
        }
    }
}
extension ProtobufUnittest.BoolMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.BoolMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "data": return self.data
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "data":
                guard let newSubscriptValue = newSubscriptValue as? Bool else {
                    return
                }
                self.data = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestOneof: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestOneof> {
        var mergedArray = Array<ProtobufUnittest.TestOneof>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof? {
        return try ProtobufUnittest.TestOneof.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestOneof {
        return try ProtobufUnittest.TestOneof.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof {
        return try ProtobufUnittest.TestOneof.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof {
        return try ProtobufUnittest.TestOneof.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof {
        return try ProtobufUnittest.TestOneof.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof {
        return try ProtobufUnittest.TestOneof.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof {
        return try ProtobufUnittest.TestOneof.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "fooInt": return self.fooInt
        case "fooString": return self.fooString
        case "fooMessage": return self.fooMessage
        case "fooGroup": return self.fooGroup
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestOneof.FooGroup: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestOneof.FooGroup> {
        var mergedArray = Array<ProtobufUnittest.TestOneof.FooGroup>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof.FooGroup? {
        return try ProtobufUnittest.TestOneof.FooGroup.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestOneof.FooGroup {
        return try ProtobufUnittest.TestOneof.FooGroup.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof.FooGroup {
        return try ProtobufUnittest.TestOneof.FooGroup.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof.FooGroup {
        return try ProtobufUnittest.TestOneof.FooGroup.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof.FooGroup {
        return try ProtobufUnittest.TestOneof.FooGroup.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof.FooGroup {
        return try ProtobufUnittest.TestOneof.FooGroup.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof.FooGroup {
        return try ProtobufUnittest.TestOneof.FooGroup.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        case "b": return self.b
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestOneof.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestOneof
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "fooInt": return self.fooInt
            case "fooString": return self.fooString
            case "fooMessage": return self.fooMessage
            case "fooGroup": return self.fooGroup
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "fooInt":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.fooInt = newSubscriptValue
            case "fooString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.fooString = newSubscriptValue
            case "fooMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.fooMessage = newSubscriptValue
            case "fooGroup":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestOneof.FooGroup else {
                    return
                }
                self.fooGroup = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestOneof.FooGroup.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestOneof.FooGroup
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            case "b": return self.b
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            case "b":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.b = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestOneofBackwardsCompatible: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestOneofBackwardsCompatible> {
        var mergedArray = Array<ProtobufUnittest.TestOneofBackwardsCompatible>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneofBackwardsCompatible? {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestOneofBackwardsCompatible {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneofBackwardsCompatible {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneofBackwardsCompatible {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneofBackwardsCompatible {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneofBackwardsCompatible {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneofBackwardsCompatible {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "fooInt": return self.fooInt
        case "fooString": return self.fooString
        case "fooMessage": return self.fooMessage
        case "fooGroup": return self.fooGroup
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup> {
        var mergedArray = Array<ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup? {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup {
        return try ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        case "b": return self.b
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestOneofBackwardsCompatible.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestOneofBackwardsCompatible
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "fooInt": return self.fooInt
            case "fooString": return self.fooString
            case "fooMessage": return self.fooMessage
            case "fooGroup": return self.fooGroup
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "fooInt":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.fooInt = newSubscriptValue
            case "fooString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.fooString = newSubscriptValue
            case "fooMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.fooMessage = newSubscriptValue
            case "fooGroup":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup else {
                    return
                }
                self.fooGroup = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestOneofBackwardsCompatible.FooGroup
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            case "b": return self.b
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            case "b":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.b = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestOneof2: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestOneof2> {
        var mergedArray = Array<ProtobufUnittest.TestOneof2>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof2? {
        return try ProtobufUnittest.TestOneof2.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestOneof2 {
        return try ProtobufUnittest.TestOneof2.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2 {
        return try ProtobufUnittest.TestOneof2.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof2 {
        return try ProtobufUnittest.TestOneof2.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2 {
        return try ProtobufUnittest.TestOneof2.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof2 {
        return try ProtobufUnittest.TestOneof2.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2 {
        return try ProtobufUnittest.TestOneof2.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "fooInt": return self.fooInt
        case "fooString": return self.fooString
        case "fooCord": return self.fooCord
        case "fooStringPiece": return self.fooStringPiece
        case "fooBytes": return self.fooBytes
        case "fooEnum": return self.fooEnum
        case "fooMessage": return self.fooMessage
        case "fooGroup": return self.fooGroup
        case "fooLazyMessage": return self.fooLazyMessage
        case "barInt": return self.barInt
        case "barString": return self.barString
        case "barCord": return self.barCord
        case "barStringPiece": return self.barStringPiece
        case "barBytes": return self.barBytes
        case "barEnum": return self.barEnum
        case "bazInt": return self.bazInt
        case "bazString": return self.bazString
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestOneof2.FooGroup: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestOneof2.FooGroup> {
        var mergedArray = Array<ProtobufUnittest.TestOneof2.FooGroup>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof2.FooGroup? {
        return try ProtobufUnittest.TestOneof2.FooGroup.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestOneof2.FooGroup {
        return try ProtobufUnittest.TestOneof2.FooGroup.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2.FooGroup {
        return try ProtobufUnittest.TestOneof2.FooGroup.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof2.FooGroup {
        return try ProtobufUnittest.TestOneof2.FooGroup.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2.FooGroup {
        return try ProtobufUnittest.TestOneof2.FooGroup.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof2.FooGroup {
        return try ProtobufUnittest.TestOneof2.FooGroup.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2.FooGroup {
        return try ProtobufUnittest.TestOneof2.FooGroup.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        case "b": return self.b
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestOneof2.NestedMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestOneof2.NestedMessage> {
        var mergedArray = Array<ProtobufUnittest.TestOneof2.NestedMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof2.NestedMessage? {
        return try ProtobufUnittest.TestOneof2.NestedMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestOneof2.NestedMessage {
        return try ProtobufUnittest.TestOneof2.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2.NestedMessage {
        return try ProtobufUnittest.TestOneof2.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestOneof2.NestedMessage {
        return try ProtobufUnittest.TestOneof2.NestedMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2.NestedMessage {
        return try ProtobufUnittest.TestOneof2.NestedMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestOneof2.NestedMessage {
        return try ProtobufUnittest.TestOneof2.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestOneof2.NestedMessage {
        return try ProtobufUnittest.TestOneof2.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "quxInt": return self.quxInt
        case "corgeInt": return self.corgeInt
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestOneof2.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestOneof2
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "fooInt": return self.fooInt
            case "fooString": return self.fooString
            case "fooCord": return self.fooCord
            case "fooStringPiece": return self.fooStringPiece
            case "fooBytes": return self.fooBytes
            case "fooEnum": return self.fooEnum
            case "fooMessage": return self.fooMessage
            case "fooGroup": return self.fooGroup
            case "fooLazyMessage": return self.fooLazyMessage
            case "barInt": return self.barInt
            case "barString": return self.barString
            case "barCord": return self.barCord
            case "barStringPiece": return self.barStringPiece
            case "barBytes": return self.barBytes
            case "barEnum": return self.barEnum
            case "bazInt": return self.bazInt
            case "bazString": return self.bazString
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "fooInt":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.fooInt = newSubscriptValue
            case "fooString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.fooString = newSubscriptValue
            case "fooCord":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.fooCord = newSubscriptValue
            case "fooStringPiece":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.fooStringPiece = newSubscriptValue
            case "fooBytes":
                guard let newSubscriptValue = newSubscriptValue as? Data else {
                    return
                }
                self.fooBytes = newSubscriptValue
            case "fooEnum":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestOneof2.NestedEnum else {
                    return
                }
                self.fooEnum = newSubscriptValue
            case "fooMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestOneof2.NestedMessage else {
                    return
                }
                self.fooMessage = newSubscriptValue
            case "fooGroup":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestOneof2.FooGroup else {
                    return
                }
                self.fooGroup = newSubscriptValue
            case "fooLazyMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestOneof2.NestedMessage else {
                    return
                }
                self.fooLazyMessage = newSubscriptValue
            case "barInt":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.barInt = newSubscriptValue
            case "barString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.barString = newSubscriptValue
            case "barCord":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.barCord = newSubscriptValue
            case "barStringPiece":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.barStringPiece = newSubscriptValue
            case "barBytes":
                guard let newSubscriptValue = newSubscriptValue as? Data else {
                    return
                }
                self.barBytes = newSubscriptValue
            case "barEnum":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestOneof2.NestedEnum else {
                    return
                }
                self.barEnum = newSubscriptValue
            case "bazInt":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.bazInt = newSubscriptValue
            case "bazString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.bazString = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestOneof2.FooGroup.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestOneof2.FooGroup
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            case "b": return self.b
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.a = newSubscriptValue
            case "b":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.b = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestOneof2.NestedMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestOneof2.NestedMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "quxInt": return self.quxInt
            case "corgeInt": return self.corgeInt
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "quxInt":
                guard let newSubscriptValue = newSubscriptValue as? Int64 else {
                    return
                }
                self.quxInt = newSubscriptValue
            case "corgeInt":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.corgeInt = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestRequiredOneof: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestRequiredOneof> {
        var mergedArray = Array<ProtobufUnittest.TestRequiredOneof>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRequiredOneof? {
        return try ProtobufUnittest.TestRequiredOneof.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestRequiredOneof {
        return try ProtobufUnittest.TestRequiredOneof.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredOneof {
        return try ProtobufUnittest.TestRequiredOneof.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRequiredOneof {
        return try ProtobufUnittest.TestRequiredOneof.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredOneof {
        return try ProtobufUnittest.TestRequiredOneof.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRequiredOneof {
        return try ProtobufUnittest.TestRequiredOneof.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredOneof {
        return try ProtobufUnittest.TestRequiredOneof.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "fooInt": return self.fooInt
        case "fooString": return self.fooString
        case "fooMessage": return self.fooMessage
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestRequiredOneof.NestedMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestRequiredOneof.NestedMessage> {
        var mergedArray = Array<ProtobufUnittest.TestRequiredOneof.NestedMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage? {
        return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
        return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
        return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
        return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
        return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
        return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRequiredOneof.NestedMessage {
        return try ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "requiredDouble": return self.requiredDouble
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestRequiredOneof.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestRequiredOneof
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "fooInt": return self.fooInt
            case "fooString": return self.fooString
            case "fooMessage": return self.fooMessage
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "fooInt":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.fooInt = newSubscriptValue
            case "fooString":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.fooString = newSubscriptValue
            case "fooMessage":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestRequiredOneof.NestedMessage else {
                    return
                }
                self.fooMessage = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestRequiredOneof.NestedMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestRequiredOneof.NestedMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "requiredDouble": return self.requiredDouble
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "requiredDouble":
                guard let newSubscriptValue = newSubscriptValue as? Double else {
                    return
                }
                self.requiredDouble = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestPackedTypes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestPackedTypes> {
        var mergedArray = Array<ProtobufUnittest.TestPackedTypes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestPackedTypes? {
        return try ProtobufUnittest.TestPackedTypes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestPackedTypes {
        return try ProtobufUnittest.TestPackedTypes.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestPackedTypes {
        return try ProtobufUnittest.TestPackedTypes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestPackedTypes {
        return try ProtobufUnittest.TestPackedTypes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestPackedTypes {
        return try ProtobufUnittest.TestPackedTypes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestPackedTypes {
        return try ProtobufUnittest.TestPackedTypes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestPackedTypes {
        return try ProtobufUnittest.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 ProtobufUnittest.TestPackedTypes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.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<ProtobufUnittest.ForeignEnum> else {
                    return
                }
                self.packedEnum = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestUnpackedTypes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestUnpackedTypes> {
        var mergedArray = Array<ProtobufUnittest.TestUnpackedTypes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestUnpackedTypes? {
        return try ProtobufUnittest.TestUnpackedTypes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestUnpackedTypes {
        return try ProtobufUnittest.TestUnpackedTypes.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestUnpackedTypes {
        return try ProtobufUnittest.TestUnpackedTypes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestUnpackedTypes {
        return try ProtobufUnittest.TestUnpackedTypes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestUnpackedTypes {
        return try ProtobufUnittest.TestUnpackedTypes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestUnpackedTypes {
        return try ProtobufUnittest.TestUnpackedTypes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestUnpackedTypes {
        return try ProtobufUnittest.TestUnpackedTypes.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "unpackedInt32": return self.unpackedInt32
        case "unpackedInt64": return self.unpackedInt64
        case "unpackedUint32": return self.unpackedUint32
        case "unpackedUint64": return self.unpackedUint64
        case "unpackedSint32": return self.unpackedSint32
        case "unpackedSint64": return self.unpackedSint64
        case "unpackedFixed32": return self.unpackedFixed32
        case "unpackedFixed64": return self.unpackedFixed64
        case "unpackedSfixed32": return self.unpackedSfixed32
        case "unpackedSfixed64": return self.unpackedSfixed64
        case "unpackedFloat": return self.unpackedFloat
        case "unpackedDouble": return self.unpackedDouble
        case "unpackedBool": return self.unpackedBool
        case "unpackedEnum": return self.unpackedEnum
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestUnpackedTypes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestUnpackedTypes
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "unpackedInt32": return self.unpackedInt32
            case "unpackedInt64": return self.unpackedInt64
            case "unpackedUint32": return self.unpackedUint32
            case "unpackedUint64": return self.unpackedUint64
            case "unpackedSint32": return self.unpackedSint32
            case "unpackedSint64": return self.unpackedSint64
            case "unpackedFixed32": return self.unpackedFixed32
            case "unpackedFixed64": return self.unpackedFixed64
            case "unpackedSfixed32": return self.unpackedSfixed32
            case "unpackedSfixed64": return self.unpackedSfixed64
            case "unpackedFloat": return self.unpackedFloat
            case "unpackedDouble": return self.unpackedDouble
            case "unpackedBool": return self.unpackedBool
            case "unpackedEnum": return self.unpackedEnum
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "unpackedInt32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.unpackedInt32 = newSubscriptValue
            case "unpackedInt64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.unpackedInt64 = newSubscriptValue
            case "unpackedUint32":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt32> else {
                    return
                }
                self.unpackedUint32 = newSubscriptValue
            case "unpackedUint64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.unpackedUint64 = newSubscriptValue
            case "unpackedSint32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.unpackedSint32 = newSubscriptValue
            case "unpackedSint64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.unpackedSint64 = newSubscriptValue
            case "unpackedFixed32":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt32> else {
                    return
                }
                self.unpackedFixed32 = newSubscriptValue
            case "unpackedFixed64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.unpackedFixed64 = newSubscriptValue
            case "unpackedSfixed32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.unpackedSfixed32 = newSubscriptValue
            case "unpackedSfixed64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.unpackedSfixed64 = newSubscriptValue
            case "unpackedFloat":
                guard let newSubscriptValue = newSubscriptValue as? Array<Float> else {
                    return
                }
                self.unpackedFloat = newSubscriptValue
            case "unpackedDouble":
                guard let newSubscriptValue = newSubscriptValue as? Array<Double> else {
                    return
                }
                self.unpackedDouble = newSubscriptValue
            case "unpackedBool":
                guard let newSubscriptValue = newSubscriptValue as? Array<Bool> else {
                    return
                }
                self.unpackedBool = newSubscriptValue
            case "unpackedEnum":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.ForeignEnum> else {
                    return
                }
                self.unpackedEnum = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestPackedExtensions: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestPackedExtensions> {
        var mergedArray = Array<ProtobufUnittest.TestPackedExtensions>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestPackedExtensions? {
        return try ProtobufUnittest.TestPackedExtensions.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestPackedExtensions {
        return try ProtobufUnittest.TestPackedExtensions.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestPackedExtensions {
        return try ProtobufUnittest.TestPackedExtensions.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestPackedExtensions {
        return try ProtobufUnittest.TestPackedExtensions.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestPackedExtensions {
        return try ProtobufUnittest.TestPackedExtensions.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestPackedExtensions {
        return try ProtobufUnittest.TestPackedExtensions.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestPackedExtensions {
        return try ProtobufUnittest.TestPackedExtensions.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.TestPackedExtensions.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestPackedExtensions
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.TestUnpackedExtensions: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestUnpackedExtensions> {
        var mergedArray = Array<ProtobufUnittest.TestUnpackedExtensions>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestUnpackedExtensions? {
        return try ProtobufUnittest.TestUnpackedExtensions.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestUnpackedExtensions {
        return try ProtobufUnittest.TestUnpackedExtensions.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestUnpackedExtensions {
        return try ProtobufUnittest.TestUnpackedExtensions.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestUnpackedExtensions {
        return try ProtobufUnittest.TestUnpackedExtensions.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestUnpackedExtensions {
        return try ProtobufUnittest.TestUnpackedExtensions.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestUnpackedExtensions {
        return try ProtobufUnittest.TestUnpackedExtensions.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestUnpackedExtensions {
        return try ProtobufUnittest.TestUnpackedExtensions.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.TestUnpackedExtensions.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestUnpackedExtensions
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.TestDynamicExtensions: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestDynamicExtensions> {
        var mergedArray = Array<ProtobufUnittest.TestDynamicExtensions>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDynamicExtensions? {
        return try ProtobufUnittest.TestDynamicExtensions.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestDynamicExtensions {
        return try ProtobufUnittest.TestDynamicExtensions.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDynamicExtensions {
        return try ProtobufUnittest.TestDynamicExtensions.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDynamicExtensions {
        return try ProtobufUnittest.TestDynamicExtensions.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDynamicExtensions {
        return try ProtobufUnittest.TestDynamicExtensions.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDynamicExtensions {
        return try ProtobufUnittest.TestDynamicExtensions.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDynamicExtensions {
        return try ProtobufUnittest.TestDynamicExtensions.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "scalarExtension": return self.scalarExtension
        case "enumExtension": return self.enumExtension
        case "dynamicEnumExtension": return self.dynamicEnumExtension
        case "messageExtension": return self.messageExtension
        case "dynamicMessageExtension": return self.dynamicMessageExtension
        case "repeatedExtension": return self.repeatedExtension
        case "packedExtension": return self.packedExtension
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestDynamicExtensions.DynamicMessageType: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestDynamicExtensions.DynamicMessageType> {
        var mergedArray = Array<ProtobufUnittest.TestDynamicExtensions.DynamicMessageType>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType? {
        return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
        return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
        return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
        return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
        return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
        return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestDynamicExtensions.DynamicMessageType {
        return try ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "dynamicField": return self.dynamicField
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestDynamicExtensions.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestDynamicExtensions
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "scalarExtension": return self.scalarExtension
            case "enumExtension": return self.enumExtension
            case "dynamicEnumExtension": return self.dynamicEnumExtension
            case "messageExtension": return self.messageExtension
            case "dynamicMessageExtension": return self.dynamicMessageExtension
            case "repeatedExtension": return self.repeatedExtension
            case "packedExtension": return self.packedExtension
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "scalarExtension":
                guard let newSubscriptValue = newSubscriptValue as? UInt32 else {
                    return
                }
                self.scalarExtension = newSubscriptValue
            case "enumExtension":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.ForeignEnum else {
                    return
                }
                self.enumExtension = newSubscriptValue
            case "dynamicEnumExtension":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestDynamicExtensions.DynamicEnumType else {
                    return
                }
                self.dynamicEnumExtension = newSubscriptValue
            case "messageExtension":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.ForeignMessage else {
                    return
                }
                self.messageExtension = newSubscriptValue
            case "dynamicMessageExtension":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestDynamicExtensions.DynamicMessageType else {
                    return
                }
                self.dynamicMessageExtension = newSubscriptValue
            case "repeatedExtension":
                guard let newSubscriptValue = newSubscriptValue as? Array<String> else {
                    return
                }
                self.repeatedExtension = newSubscriptValue
            case "packedExtension":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.packedExtension = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestDynamicExtensions.DynamicMessageType.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestDynamicExtensions.DynamicMessageType
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "dynamicField": return self.dynamicField
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "dynamicField":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.dynamicField = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestRepeatedScalarDifferentTagSizes: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestRepeatedScalarDifferentTagSizes> {
        var mergedArray = Array<ProtobufUnittest.TestRepeatedScalarDifferentTagSizes>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes? {
        return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
        return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
        return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
        return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
        return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
        return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestRepeatedScalarDifferentTagSizes {
        return try ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "repeatedFixed32": return self.repeatedFixed32
        case "repeatedInt32": return self.repeatedInt32
        case "repeatedFixed64": return self.repeatedFixed64
        case "repeatedInt64": return self.repeatedInt64
        case "repeatedFloat": return self.repeatedFloat
        case "repeatedUint64": return self.repeatedUint64
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestRepeatedScalarDifferentTagSizes.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestRepeatedScalarDifferentTagSizes
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "repeatedFixed32": return self.repeatedFixed32
            case "repeatedInt32": return self.repeatedInt32
            case "repeatedFixed64": return self.repeatedFixed64
            case "repeatedInt64": return self.repeatedInt64
            case "repeatedFloat": return self.repeatedFloat
            case "repeatedUint64": return self.repeatedUint64
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "repeatedFixed32":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt32> else {
                    return
                }
                self.repeatedFixed32 = newSubscriptValue
            case "repeatedInt32":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.repeatedInt32 = newSubscriptValue
            case "repeatedFixed64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.repeatedFixed64 = newSubscriptValue
            case "repeatedInt64":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int64> else {
                    return
                }
                self.repeatedInt64 = newSubscriptValue
            case "repeatedFloat":
                guard let newSubscriptValue = newSubscriptValue as? Array<Float> else {
                    return
                }
                self.repeatedFloat = newSubscriptValue
            case "repeatedUint64":
                guard let newSubscriptValue = newSubscriptValue as? Array<UInt64> else {
                    return
                }
                self.repeatedUint64 = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestParsingMerge: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestParsingMerge> {
        var mergedArray = Array<ProtobufUnittest.TestParsingMerge>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge? {
        return try ProtobufUnittest.TestParsingMerge.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestParsingMerge {
        return try ProtobufUnittest.TestParsingMerge.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge {
        return try ProtobufUnittest.TestParsingMerge.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge {
        return try ProtobufUnittest.TestParsingMerge.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge {
        return try ProtobufUnittest.TestParsingMerge.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge {
        return try ProtobufUnittest.TestParsingMerge.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge {
        return try ProtobufUnittest.TestParsingMerge.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "requiredAllTypes": return self.requiredAllTypes
        case "optionalAllTypes": return self.optionalAllTypes
        case "repeatedAllTypes": return self.repeatedAllTypes
        case "optionalGroup": return self.optionalGroup
        case "repeatedGroup": return self.repeatedGroup
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator> {
        var mergedArray = Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator? {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "field1": return self.field1
        case "field2": return self.field2
        case "field3": return self.field3
        case "group1": return self.group1
        case "group2": return self.group2
        case "ext1": return self.ext1
        case "ext2": return self.ext2
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1> {
        var mergedArray = Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1? {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "field1": return self.field1
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2> {
        var mergedArray = Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2? {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2 {
        return try ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "field1": return self.field1
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.OptionalGroup: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestParsingMerge.OptionalGroup> {
        var mergedArray = Array<ProtobufUnittest.TestParsingMerge.OptionalGroup>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup? {
        return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
        return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
        return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
        return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
        return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
        return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.OptionalGroup {
        return try ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "optionalGroupAllTypes": return self.optionalGroupAllTypes
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.RepeatedGroup: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestParsingMerge.RepeatedGroup> {
        var mergedArray = Array<ProtobufUnittest.TestParsingMerge.RepeatedGroup>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup? {
        return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
        return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
        return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
        return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
        return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
        return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestParsingMerge.RepeatedGroup {
        return try ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "repeatedGroupAllTypes": return self.repeatedGroupAllTypes
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestParsingMerge
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "requiredAllTypes": return self.requiredAllTypes
            case "optionalAllTypes": return self.optionalAllTypes
            case "repeatedAllTypes": return self.repeatedAllTypes
            case "optionalGroup": return self.optionalGroup
            case "repeatedGroup": return self.repeatedGroup
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "requiredAllTypes":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.requiredAllTypes = newSubscriptValue
            case "optionalAllTypes":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.optionalAllTypes = newSubscriptValue
            case "repeatedAllTypes":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestAllTypes> else {
                    return
                }
                self.repeatedAllTypes = newSubscriptValue
            case "optionalGroup":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestParsingMerge.OptionalGroup else {
                    return
                }
                self.optionalGroup = newSubscriptValue
            case "repeatedGroup":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestParsingMerge.RepeatedGroup> else {
                    return
                }
                self.repeatedGroup = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "field1": return self.field1
            case "field2": return self.field2
            case "field3": return self.field3
            case "group1": return self.group1
            case "group2": return self.group2
            case "ext1": return self.ext1
            case "ext2": return self.ext2
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "field1":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestAllTypes> else {
                    return
                }
                self.field1 = newSubscriptValue
            case "field2":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestAllTypes> else {
                    return
                }
                self.field2 = newSubscriptValue
            case "field3":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestAllTypes> else {
                    return
                }
                self.field3 = newSubscriptValue
            case "group1":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1> else {
                    return
                }
                self.group1 = newSubscriptValue
            case "group2":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2> else {
                    return
                }
                self.group2 = newSubscriptValue
            case "ext1":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestAllTypes> else {
                    return
                }
                self.ext1 = newSubscriptValue
            case "ext2":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.TestAllTypes> else {
                    return
                }
                self.ext2 = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group1
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "field1": return self.field1
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "field1":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.field1 = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestParsingMerge.RepeatedFieldsGenerator.Group2
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "field1": return self.field1
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "field1":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.field1 = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.OptionalGroup.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestParsingMerge.OptionalGroup
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "optionalGroupAllTypes": return self.optionalGroupAllTypes
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "optionalGroupAllTypes":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.optionalGroupAllTypes = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestParsingMerge.RepeatedGroup.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestParsingMerge.RepeatedGroup
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "repeatedGroupAllTypes": return self.repeatedGroupAllTypes
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "repeatedGroupAllTypes":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.TestAllTypes else {
                    return
                }
                self.repeatedGroupAllTypes = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.TestCommentInjectionMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestCommentInjectionMessage> {
        var mergedArray = Array<ProtobufUnittest.TestCommentInjectionMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestCommentInjectionMessage? {
        return try ProtobufUnittest.TestCommentInjectionMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestCommentInjectionMessage {
        return try ProtobufUnittest.TestCommentInjectionMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestCommentInjectionMessage {
        return try ProtobufUnittest.TestCommentInjectionMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestCommentInjectionMessage {
        return try ProtobufUnittest.TestCommentInjectionMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestCommentInjectionMessage {
        return try ProtobufUnittest.TestCommentInjectionMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestCommentInjectionMessage {
        return try ProtobufUnittest.TestCommentInjectionMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestCommentInjectionMessage {
        return try ProtobufUnittest.TestCommentInjectionMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "a": return self.a
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestCommentInjectionMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestCommentInjectionMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "a": return self.a
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "a":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.a = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.FooRequest: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.FooRequest> {
        var mergedArray = Array<ProtobufUnittest.FooRequest>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.FooRequest? {
        return try ProtobufUnittest.FooRequest.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.FooRequest {
        return try ProtobufUnittest.FooRequest.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooRequest {
        return try ProtobufUnittest.FooRequest.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.FooRequest {
        return try ProtobufUnittest.FooRequest.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooRequest {
        return try ProtobufUnittest.FooRequest.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.FooRequest {
        return try ProtobufUnittest.FooRequest.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooRequest {
        return try ProtobufUnittest.FooRequest.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.FooRequest.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.FooRequest
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.FooResponse: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.FooResponse> {
        var mergedArray = Array<ProtobufUnittest.FooResponse>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.FooResponse? {
        return try ProtobufUnittest.FooResponse.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.FooResponse {
        return try ProtobufUnittest.FooResponse.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooResponse {
        return try ProtobufUnittest.FooResponse.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.FooResponse {
        return try ProtobufUnittest.FooResponse.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooResponse {
        return try ProtobufUnittest.FooResponse.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.FooResponse {
        return try ProtobufUnittest.FooResponse.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooResponse {
        return try ProtobufUnittest.FooResponse.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.FooResponse.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.FooResponse
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.FooClientMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.FooClientMessage> {
        var mergedArray = Array<ProtobufUnittest.FooClientMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.FooClientMessage? {
        return try ProtobufUnittest.FooClientMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.FooClientMessage {
        return try ProtobufUnittest.FooClientMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooClientMessage {
        return try ProtobufUnittest.FooClientMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.FooClientMessage {
        return try ProtobufUnittest.FooClientMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooClientMessage {
        return try ProtobufUnittest.FooClientMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.FooClientMessage {
        return try ProtobufUnittest.FooClientMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooClientMessage {
        return try ProtobufUnittest.FooClientMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.FooClientMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.FooClientMessage
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.FooServerMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.FooServerMessage> {
        var mergedArray = Array<ProtobufUnittest.FooServerMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.FooServerMessage? {
        return try ProtobufUnittest.FooServerMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.FooServerMessage {
        return try ProtobufUnittest.FooServerMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooServerMessage {
        return try ProtobufUnittest.FooServerMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.FooServerMessage {
        return try ProtobufUnittest.FooServerMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooServerMessage {
        return try ProtobufUnittest.FooServerMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.FooServerMessage {
        return try ProtobufUnittest.FooServerMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.FooServerMessage {
        return try ProtobufUnittest.FooServerMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.FooServerMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.FooServerMessage
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.BarRequest: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.BarRequest> {
        var mergedArray = Array<ProtobufUnittest.BarRequest>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.BarRequest? {
        return try ProtobufUnittest.BarRequest.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.BarRequest {
        return try ProtobufUnittest.BarRequest.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BarRequest {
        return try ProtobufUnittest.BarRequest.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.BarRequest {
        return try ProtobufUnittest.BarRequest.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BarRequest {
        return try ProtobufUnittest.BarRequest.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.BarRequest {
        return try ProtobufUnittest.BarRequest.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BarRequest {
        return try ProtobufUnittest.BarRequest.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.BarRequest.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.BarRequest
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.BarResponse: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.BarResponse> {
        var mergedArray = Array<ProtobufUnittest.BarResponse>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.BarResponse? {
        return try ProtobufUnittest.BarResponse.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.BarResponse {
        return try ProtobufUnittest.BarResponse.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BarResponse {
        return try ProtobufUnittest.BarResponse.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.BarResponse {
        return try ProtobufUnittest.BarResponse.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BarResponse {
        return try ProtobufUnittest.BarResponse.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.BarResponse {
        return try ProtobufUnittest.BarResponse.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.BarResponse {
        return try ProtobufUnittest.BarResponse.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.BarResponse.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.BarResponse
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}

// @@protoc_insertion_point(global_scope)
