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

import Foundation
import ProtocolBuffers


public extension ProtobufUnittest{}

public var UnittestCustomOptionsRootfileOpt1:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfileOpt1Static
    }
}
public var UnittestCustomOptionsRootmessageOpt1:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmessageOpt1Static
    }
}
public var UnittestCustomOptionsRootfieldOpt1:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfieldOpt1Static
    }
}
/// This is useful for testing that we correctly register default values for
/// extension options.
public var UnittestCustomOptionsRootfieldOpt2:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfieldOpt2Static
    }
}
public var UnittestCustomOptionsRootenumOpt1:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumOpt1Static
    }
}
public var UnittestCustomOptionsRootenumValueOpt1:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumValueOpt1Static
    }
}
public var UnittestCustomOptionsRootserviceOpt1:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootserviceOpt1Static
    }
}
public var UnittestCustomOptionsRootmethodOpt1:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmethodOpt1Static
    }
}
public var UnittestCustomOptionsRootboolOpt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootboolOptStatic
    }
}
public var UnittestCustomOptionsRootint32Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootint32OptStatic
    }
}
public var UnittestCustomOptionsRootint64Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootint64OptStatic
    }
}
public var UnittestCustomOptionsRootuint32Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootuint32OptStatic
    }
}
public var UnittestCustomOptionsRootuint64Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootuint64OptStatic
    }
}
public var UnittestCustomOptionsRootsint32Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootsint32OptStatic
    }
}
public var UnittestCustomOptionsRootsint64Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootsint64OptStatic
    }
}
public var UnittestCustomOptionsRootfixed32Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfixed32OptStatic
    }
}
public var UnittestCustomOptionsRootfixed64Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfixed64OptStatic
    }
}
public var UnittestCustomOptionsRootsfixed32Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootsfixed32OptStatic
    }
}
public var UnittestCustomOptionsRootsfixed64Opt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootsfixed64OptStatic
    }
}
public var UnittestCustomOptionsRootfloatOpt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfloatOptStatic
    }
}
public var UnittestCustomOptionsRootdoubleOpt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootdoubleOptStatic
    }
}
public var UnittestCustomOptionsRootstringOpt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootstringOptStatic
    }
}
public var UnittestCustomOptionsRootbytesOpt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootbytesOptStatic
    }
}
public var UnittestCustomOptionsRootenumOpt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumOptStatic
    }
}
public var UnittestCustomOptionsRootmessageTypeOpt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmessageTypeOptStatic
    }
}
public var UnittestCustomOptionsRootquux:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootquuxStatic
    }
}
public var UnittestCustomOptionsRootcorge:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcorgeStatic
    }
}
public var UnittestCustomOptionsRootgrault:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootgraultStatic
    }
}
public var UnittestCustomOptionsRootgarply:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootgarplyStatic
    }
}
public var UnittestCustomOptionsRootcomplexOpt1:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcomplexOpt1Static
    }
}
public var UnittestCustomOptionsRootcomplexOpt2:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcomplexOpt2Static
    }
}
public var UnittestCustomOptionsRootcomplexOpt3:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcomplexOpt3Static
    }
}
public var UnittestCustomOptionsRootcomplexOpt6:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcomplexOpt6Static
    }
}
public var UnittestCustomOptionsRootfileopt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfileoptStatic
    }
}
public var UnittestCustomOptionsRootmsgopt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmsgoptStatic
    }
}
public var UnittestCustomOptionsRootfieldopt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfieldoptStatic
    }
}
public var UnittestCustomOptionsRootenumopt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumoptStatic
    }
}
public var UnittestCustomOptionsRootenumvalopt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumvaloptStatic
    }
}
public var UnittestCustomOptionsRootserviceopt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootserviceoptStatic
    }
}
public var UnittestCustomOptionsRootmethodopt:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmethodoptStatic
    }
}
public var ComplexOptionType2ComplexOptionType4complexOpt4:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.ComplexOptionType2ComplexOptionType4complexOpt4Static
    }
}
public var AggregateMessageSetElementmessageSetExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.AggregateMessageSetElementmessageSetExtensionStatic
    }
}
public var Aggregatenested:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.AggregatenestedStatic
    }
}
public var NestedOptionTypenestedExtension:ConcreateExtensionField {
    get {
        return ProtobufUnittest.UnittestCustomOptionsRoot.default.NestedOptionTypenestedExtensionStatic
    }
}
public extension ProtobufUnittest {
    public struct UnittestCustomOptionsRoot {
        public static let `default` = UnittestCustomOptionsRoot()
        var UnittestCustomOptionsRootfileOpt1Static:ConcreateExtensionField
        var UnittestCustomOptionsRootmessageOpt1Static:ConcreateExtensionField
        var UnittestCustomOptionsRootfieldOpt1Static:ConcreateExtensionField
        var UnittestCustomOptionsRootfieldOpt2Static:ConcreateExtensionField
        var UnittestCustomOptionsRootenumOpt1Static:ConcreateExtensionField
        var UnittestCustomOptionsRootenumValueOpt1Static:ConcreateExtensionField
        var UnittestCustomOptionsRootserviceOpt1Static:ConcreateExtensionField
        var UnittestCustomOptionsRootmethodOpt1Static:ConcreateExtensionField
        var UnittestCustomOptionsRootboolOptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootint32OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootint64OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootuint32OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootuint64OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootsint32OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootsint64OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootfixed32OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootfixed64OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootsfixed32OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootsfixed64OptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootfloatOptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootdoubleOptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootstringOptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootbytesOptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootenumOptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootmessageTypeOptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootquuxStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootcorgeStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootgraultStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootgarplyStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootcomplexOpt1Static:ConcreateExtensionField
        var UnittestCustomOptionsRootcomplexOpt2Static:ConcreateExtensionField
        var UnittestCustomOptionsRootcomplexOpt3Static:ConcreateExtensionField
        var UnittestCustomOptionsRootcomplexOpt6Static:ConcreateExtensionField
        var UnittestCustomOptionsRootfileoptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootmsgoptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootfieldoptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootenumoptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootenumvaloptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootserviceoptStatic:ConcreateExtensionField
        var UnittestCustomOptionsRootmethodoptStatic:ConcreateExtensionField
        var ComplexOptionType2ComplexOptionType4complexOpt4Static:ConcreateExtensionField
        var AggregateMessageSetElementmessageSetExtensionStatic:ConcreateExtensionField
        var AggregatenestedStatic:ConcreateExtensionField
        var NestedOptionTypenestedExtensionStatic:ConcreateExtensionField
        public var extensionRegistry:ExtensionRegistry

        init() {
            UnittestCustomOptionsRootfileOpt1Static = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt64, extendedClass:Google.Protobuf.FileOptions.self, fieldNumber: 7736974, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootmessageOpt1Static = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7739036, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootfieldOpt1Static = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed64, extendedClass:Google.Protobuf.FieldOptions.self, fieldNumber: 7740936, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootfieldOpt2Static = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:Google.Protobuf.FieldOptions.self, fieldNumber: 7753913, defaultValue:Int32(42), messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootenumOpt1Static = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed32, extendedClass:Google.Protobuf.EnumOptions.self, fieldNumber: 7753576, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootenumValueOpt1Static = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:Google.Protobuf.EnumValueOptions.self, fieldNumber: 1560678, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootserviceOpt1Static = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt64, extendedClass:Google.Protobuf.ServiceOptions.self, fieldNumber: 7887650, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootmethodOpt1Static = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:Google.Protobuf.MethodOptions.self, fieldNumber: 7890860, defaultValue:ProtobufUnittest.MethodOpt1.methodopt1Val1.rawValue, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootboolOptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBool, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7706090, defaultValue:nil, messageOrGroupClass:Bool.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootint32OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7705709, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootint64OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt64, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7705542, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootuint32OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt32, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7704880, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootuint64OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeUInt64, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7702367, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootsint32OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt32, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7701568, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootsint64OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSInt64, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7700863, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootfixed32OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed32, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7700307, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootfixed64OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFixed64, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7700194, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootsfixed32OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed32, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7698645, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootsfixed64OptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeSFixed64, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7685475, defaultValue:nil, messageOrGroupClass:Int64.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootfloatOptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeFloat, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7675390, defaultValue:nil, messageOrGroupClass:Float.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootdoubleOptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeDouble, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7673293, defaultValue:nil, messageOrGroupClass:Double.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootstringOptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeString, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7673285, defaultValue:nil, messageOrGroupClass:String.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootbytesOptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeBytes, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7673238, defaultValue:nil, messageOrGroupClass:Data.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootenumOptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeEnum, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7673233, defaultValue:ProtobufUnittest.DummyMessageContainingEnum.TestEnumType.testOptionEnumType1.rawValue, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootmessageTypeOptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7665967, defaultValue:ProtobufUnittest.DummyMessageInvalidAsOptionType(), messageOrGroupClass:ProtobufUnittest.DummyMessageInvalidAsOptionType.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootquuxStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:ProtobufUnittest.ComplexOptionType1.self, fieldNumber: 7663707, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootcorgeStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.ComplexOptionType1.self, fieldNumber: 7663442, defaultValue:ProtobufUnittest.ComplexOptionType3(), messageOrGroupClass:ProtobufUnittest.ComplexOptionType3.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootgraultStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:ProtobufUnittest.ComplexOptionType2.self, fieldNumber: 7650927, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootgarplyStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.ComplexOptionType2.self, fieldNumber: 7649992, defaultValue:ProtobufUnittest.ComplexOptionType1(), messageOrGroupClass:ProtobufUnittest.ComplexOptionType1.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootcomplexOpt1Static = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7646756, defaultValue:ProtobufUnittest.ComplexOptionType1(), messageOrGroupClass:ProtobufUnittest.ComplexOptionType1.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootcomplexOpt2Static = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7636949, defaultValue:ProtobufUnittest.ComplexOptionType2(), messageOrGroupClass:ProtobufUnittest.ComplexOptionType2.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootcomplexOpt3Static = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7636463, defaultValue:ProtobufUnittest.ComplexOptionType3(), messageOrGroupClass:ProtobufUnittest.ComplexOptionType3.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootcomplexOpt6Static = ConcreateExtensionField(type:ExtensionType.extensionTypeGroup, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7595468, defaultValue:ProtobufUnittest.ComplexOpt6(), messageOrGroupClass:ProtobufUnittest.ComplexOpt6.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootfileoptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.FileOptions.self, fieldNumber: 15478479, defaultValue:ProtobufUnittest.Aggregate(), messageOrGroupClass:ProtobufUnittest.Aggregate.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootmsgoptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 15480088, defaultValue:ProtobufUnittest.Aggregate(), messageOrGroupClass:ProtobufUnittest.Aggregate.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootfieldoptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.FieldOptions.self, fieldNumber: 15481374, defaultValue:ProtobufUnittest.Aggregate(), messageOrGroupClass:ProtobufUnittest.Aggregate.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootenumoptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.EnumOptions.self, fieldNumber: 15483218, defaultValue:ProtobufUnittest.Aggregate(), messageOrGroupClass:ProtobufUnittest.Aggregate.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootenumvaloptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.EnumValueOptions.self, fieldNumber: 15486921, defaultValue:ProtobufUnittest.Aggregate(), messageOrGroupClass:ProtobufUnittest.Aggregate.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootserviceoptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.ServiceOptions.self, fieldNumber: 15497145, defaultValue:ProtobufUnittest.Aggregate(), messageOrGroupClass:ProtobufUnittest.Aggregate.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            UnittestCustomOptionsRootmethodoptStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.MethodOptions.self, fieldNumber: 15512713, defaultValue:ProtobufUnittest.Aggregate(), messageOrGroupClass:ProtobufUnittest.Aggregate.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            ComplexOptionType2ComplexOptionType4complexOpt4Static = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.MessageOptions.self, fieldNumber: 7633546, defaultValue:ProtobufUnittest.ComplexOptionType2.ComplexOptionType4(), messageOrGroupClass:ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            AggregateMessageSetElementmessageSetExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:ProtobufUnittest.AggregateMessageSet.self, fieldNumber: 15447542, defaultValue:ProtobufUnittest.AggregateMessageSetElement(), messageOrGroupClass:ProtobufUnittest.AggregateMessageSetElement.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:true)
            AggregatenestedStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeMessage, extendedClass:Google.Protobuf.FileOptions.self, fieldNumber: 15476903, defaultValue:ProtobufUnittest.Aggregate(), messageOrGroupClass:ProtobufUnittest.Aggregate.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            NestedOptionTypenestedExtensionStatic = ConcreateExtensionField(type:ExtensionType.extensionTypeInt32, extendedClass:Google.Protobuf.FileOptions.self, fieldNumber: 7912573, defaultValue:nil, messageOrGroupClass:Int32.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
            extensionRegistry = ExtensionRegistry()
            registerAllExtensions(registry: extensionRegistry)
            Google.Protobuf.DescriptorRoot.default.registerAllExtensions(registry: extensionRegistry)
        }
        public func registerAllExtensions(registry: ExtensionRegistry) {
            registry.addExtension(extensions: UnittestCustomOptionsRootfileOpt1Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootmessageOpt1Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootfieldOpt1Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootfieldOpt2Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootenumOpt1Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootenumValueOpt1Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootserviceOpt1Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootmethodOpt1Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootboolOptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootint32OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootint64OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootuint32OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootuint64OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootsint32OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootsint64OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootfixed32OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootfixed64OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootsfixed32OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootsfixed64OptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootfloatOptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootdoubleOptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootstringOptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootbytesOptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootenumOptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootmessageTypeOptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootquuxStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootcorgeStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootgraultStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootgarplyStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootcomplexOpt1Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootcomplexOpt2Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootcomplexOpt3Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootcomplexOpt6Static)
            registry.addExtension(extensions: UnittestCustomOptionsRootfileoptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootmsgoptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootfieldoptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootenumoptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootenumvaloptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootserviceoptStatic)
            registry.addExtension(extensions: UnittestCustomOptionsRootmethodoptStatic)
            registry.addExtension(extensions: ComplexOptionType2ComplexOptionType4complexOpt4Static)
            registry.addExtension(extensions: AggregateMessageSetElementmessageSetExtensionStatic)
            registry.addExtension(extensions: AggregatenestedStatic)
            registry.addExtension(extensions: NestedOptionTypenestedExtensionStatic)
        }
        public static func fileOpt1() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfileOpt1Static
        }
        public static func messageOpt1() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmessageOpt1Static
        }
        public static func fieldOpt1() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfieldOpt1Static
        }
        public static func fieldOpt2() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfieldOpt2Static
        }
        public static func enumOpt1() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumOpt1Static
        }
        public static func enumValueOpt1() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumValueOpt1Static
        }
        public static func serviceOpt1() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootserviceOpt1Static
        }
        public static func methodOpt1() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmethodOpt1Static
        }
        public static func boolOpt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootboolOptStatic
        }
        public static func int32Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootint32OptStatic
        }
        public static func int64Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootint64OptStatic
        }
        public static func uint32Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootuint32OptStatic
        }
        public static func uint64Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootuint64OptStatic
        }
        public static func sint32Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootsint32OptStatic
        }
        public static func sint64Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootsint64OptStatic
        }
        public static func fixed32Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfixed32OptStatic
        }
        public static func fixed64Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfixed64OptStatic
        }
        public static func sfixed32Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootsfixed32OptStatic
        }
        public static func sfixed64Opt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootsfixed64OptStatic
        }
        public static func floatOpt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfloatOptStatic
        }
        public static func doubleOpt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootdoubleOptStatic
        }
        public static func stringOpt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootstringOptStatic
        }
        public static func bytesOpt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootbytesOptStatic
        }
        public static func enumOpt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumOptStatic
        }
        public static func messageTypeOpt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmessageTypeOptStatic
        }
        public static func quux() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootquuxStatic
        }
        public static func corge() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcorgeStatic
        }
        public static func grault() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootgraultStatic
        }
        public static func garply() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootgarplyStatic
        }
        public static func complexOpt1() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcomplexOpt1Static
        }
        public static func complexOpt2() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcomplexOpt2Static
        }
        public static func complexOpt3() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcomplexOpt3Static
        }
        public static func complexOpt6() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootcomplexOpt6Static
        }
        public static func fileopt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfileoptStatic
        }
        public static func msgopt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmsgoptStatic
        }
        public static func fieldopt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootfieldoptStatic
        }
        public static func enumopt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumoptStatic
        }
        public static func enumvalopt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootenumvaloptStatic
        }
        public static func serviceopt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootserviceoptStatic
        }
        public static func methodopt() -> ConcreateExtensionField {
               return UnittestCustomOptionsRoot.default.UnittestCustomOptionsRootmethodoptStatic
        }
    }



    //Enum type declaration start 

    public enum MethodOpt1:Int32, GeneratedEnum {
        case methodopt1Val1 = 1
        case methodopt1Val2 = 2
        public func toString() -> String {
            switch self {
            case .methodopt1Val1: return "METHODOPT1_VAL1"
            case .methodopt1Val2: return "METHODOPT1_VAL2"
            }
        }
        public static func fromString(_ str:String) throws -> ProtobufUnittest.MethodOpt1 {
            switch str {
            case "METHODOPT1_VAL1":    return .methodopt1Val1
            case "METHODOPT1_VAL2":    return .methodopt1Val2
            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 .methodopt1Val1: return ".methodopt1Val1"
            case .methodopt1Val2: return ".methodopt1Val2"
            }
        }
        public var hashValue:Int {
            return self.rawValue.hashValue
        }
        public static func ==(lhs:MethodOpt1, rhs:MethodOpt1) -> Bool {
            return lhs.hashValue == rhs.hashValue
        }
    }

    //Enum type declaration end 



    //Enum type declaration start 

    public enum AggregateEnum:Int32, GeneratedEnum {
        case value = 1
        public func toString() -> String {
            switch self {
            case .value: return "VALUE"
            }
        }
        public static func fromString(_ str:String) throws -> ProtobufUnittest.AggregateEnum {
            switch str {
            case "VALUE":    return .value
            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 .value: return ".value"
            }
        }
        public var hashValue:Int {
            return self.rawValue.hashValue
        }
        public static func ==(lhs:AggregateEnum, rhs:AggregateEnum) -> Bool {
            return lhs.hashValue == rhs.hashValue
        }
    }

    //Enum type declaration end 

    /// A test message with custom options at all possible locations (and also some
    /// regular options, to make sure they interact nicely).
    final public class TestMessageWithCustomOptions : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.TestMessageWithCustomOptions.Builder

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



            //Enum type declaration start 

            public enum AnEnum:Int32, GeneratedEnum {
                case anenumVal1 = 1
                case anenumVal2 = 2
                public func toString() -> String {
                    switch self {
                    case .anenumVal1: return "ANENUM_VAL1"
                    case .anenumVal2: return "ANENUM_VAL2"
                    }
                }
                public static func fromString(_ str:String) throws -> ProtobufUnittest.TestMessageWithCustomOptions.AnEnum {
                    switch str {
                    case "ANENUM_VAL1":    return .anenumVal1
                    case "ANENUM_VAL2":    return .anenumVal2
                    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 .anenumVal1: return ".anenumVal1"
                    case .anenumVal2: return ".anenumVal2"
                    }
                }
                public var hashValue:Int {
                    return self.rawValue.hashValue
                }
                public static func ==(lhs:AnEnum, rhs:AnEnum) -> Bool {
                    return lhs.hashValue == rhs.hashValue
                }
            }

            //Enum type declaration end 

        public fileprivate(set) var field1:String! = nil
        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.writeString(fieldNumber: 1, 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 {
                serialize_size += field1.computeStringSize(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.TestMessageWithCustomOptions.Builder {
            return ProtobufUnittest.TestMessageWithCustomOptions.classBuilder() as! ProtobufUnittest.TestMessageWithCustomOptions.Builder
        }
        public func getBuilder() -> ProtobufUnittest.TestMessageWithCustomOptions.Builder {
            return classBuilder() as! ProtobufUnittest.TestMessageWithCustomOptions.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestMessageWithCustomOptions.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.TestMessageWithCustomOptions.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.TestMessageWithCustomOptions.Builder {
            return try ProtobufUnittest.TestMessageWithCustomOptions.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.TestMessageWithCustomOptions) throws -> ProtobufUnittest.TestMessageWithCustomOptions.Builder {
            return try ProtobufUnittest.TestMessageWithCustomOptions.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"] = field1
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.TestMessageWithCustomOptions {
            return try ProtobufUnittest.TestMessageWithCustomOptions.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.TestMessageWithCustomOptions {
            return try ProtobufUnittest.TestMessageWithCustomOptions.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasField1 {
                output += "\(indent) field1: \(String(describing: field1)) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasField1 {
                    hashCode = (hashCode &* 31) &+ field1.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

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

    }

    /// A test RPC service with custom options at all possible locations (and also
    /// some regular options, to make sure they interact nicely).
    final public class CustomOptionFooRequest : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.CustomOptionFooRequest.Builder

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

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

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

    }

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

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

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

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

    }

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

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

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

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

    }

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

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

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

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

    }

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

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



            //Enum type declaration start 

            public enum TestEnumType:Int32, GeneratedEnum {
                case testOptionEnumType1 = 22
                case testOptionEnumType2 = -23
                public func toString() -> String {
                    switch self {
                    case .testOptionEnumType1: return "TEST_OPTION_ENUM_TYPE1"
                    case .testOptionEnumType2: return "TEST_OPTION_ENUM_TYPE2"
                    }
                }
                public static func fromString(_ str:String) throws -> ProtobufUnittest.DummyMessageContainingEnum.TestEnumType {
                    switch str {
                    case "TEST_OPTION_ENUM_TYPE1":    return .testOptionEnumType1
                    case "TEST_OPTION_ENUM_TYPE2":    return .testOptionEnumType2
                    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 .testOptionEnumType1: return ".testOptionEnumType1"
                    case .testOptionEnumType2: return ".testOptionEnumType2"
                    }
                }
                public var hashValue:Int {
                    return self.rawValue.hashValue
                }
                public static func ==(lhs:TestEnumType, rhs:TestEnumType) -> Bool {
                    return lhs.hashValue == rhs.hashValue
                }
            }

            //Enum type declaration end 

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

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

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

    }

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

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

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

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

    }

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

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

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

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

    }

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

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

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

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

    }

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

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

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

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

    }

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

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

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

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

    }

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

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

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

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

    }

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

        public static func == (lhs: ProtobufUnittest.ComplexOptionType1, rhs: ProtobufUnittest.ComplexOptionType1) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasFoo == rhs.hasFoo) && (!lhs.hasFoo || lhs.foo == rhs.foo)
            fieldCheck = fieldCheck && (lhs.hasFoo2 == rhs.hasFoo2) && (!lhs.hasFoo2 || lhs.foo2 == rhs.foo2)
            fieldCheck = fieldCheck && (lhs.hasFoo3 == rhs.hasFoo3) && (!lhs.hasFoo3 || lhs.foo3 == rhs.foo3)
            fieldCheck = fieldCheck && (lhs.foo4 == rhs.foo4)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:100, endExclusive:536870912)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var foo:Int32! = nil
        public fileprivate(set) var hasFoo:Bool = false

        public fileprivate(set) var foo2:Int32! = nil
        public fileprivate(set) var hasFoo2:Bool = false

        public fileprivate(set) var foo3:Int32! = nil
        public fileprivate(set) var hasFoo3:Bool = false

        public fileprivate(set) var foo4:Array<Int32> = Array<Int32>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            try extensionsAreInitialized()}
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasFoo {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:foo)
            }
            if hasFoo2 {
                try codedOutputStream.writeInt32(fieldNumber: 2, value:foo2)
            }
            if hasFoo3 {
                try codedOutputStream.writeInt32(fieldNumber: 3, value:foo3)
            }
            if !foo4.isEmpty {
                for oneValuefoo4 in foo4 {
                    try codedOutputStream.writeInt32(fieldNumber: 4, value:oneValuefoo4)
                }
            }
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:100, 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 hasFoo {
                serialize_size += foo.computeInt32Size(fieldNumber: 1)
            }
            if hasFoo2 {
                serialize_size += foo2.computeInt32Size(fieldNumber: 2)
            }
            if hasFoo3 {
                serialize_size += foo3.computeInt32Size(fieldNumber: 3)
            }
            var dataSizeFoo4:Int32 = 0
            for oneValuefoo4 in foo4 {
                dataSizeFoo4 += oneValuefoo4.computeInt32SizeNoTag()
            }
            serialize_size += dataSizeFoo4
            serialize_size += 1 * Int32(foo4.count)
            serialize_size += extensionsSerializedSize()
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.ComplexOptionType1.Builder {
            return ProtobufUnittest.ComplexOptionType1.classBuilder() as! ProtobufUnittest.ComplexOptionType1.Builder
        }
        public func getBuilder() -> ProtobufUnittest.ComplexOptionType1.Builder {
            return classBuilder() as! ProtobufUnittest.ComplexOptionType1.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.ComplexOptionType1.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.ComplexOptionType1.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.ComplexOptionType1.Builder {
            return try ProtobufUnittest.ComplexOptionType1.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.ComplexOptionType1) throws -> ProtobufUnittest.ComplexOptionType1.Builder {
            return try ProtobufUnittest.ComplexOptionType1.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasFoo {
                jsonMap["foo"] = Int(foo)
            }
            if hasFoo2 {
                jsonMap["foo2"] = Int(foo2)
            }
            if hasFoo3 {
                jsonMap["foo3"] = Int(foo3)
            }
            if !foo4.isEmpty {
                var jsonArrayFoo4:Array<Int> = []
                for oneValueFoo4 in foo4 {
                    jsonArrayFoo4.append(Int(oneValueFoo4))
                }
                jsonMap["foo4"] = jsonArrayFoo4
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.ComplexOptionType1 {
            return try ProtobufUnittest.ComplexOptionType1.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.ComplexOptionType1 {
            return try ProtobufUnittest.ComplexOptionType1.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasFoo {
                output += "\(indent) foo: \(String(describing: foo)) \n"
            }
            if hasFoo2 {
                output += "\(indent) foo2: \(String(describing: foo2)) \n"
            }
            if hasFoo3 {
                output += "\(indent) foo3: \(String(describing: foo3)) \n"
            }
            var foo4ElementIndex:Int = 0
            for oneValueFoo4 in foo4  {
                output += "\(indent) foo4[\(foo4ElementIndex)]: \(oneValueFoo4)\n"
                foo4ElementIndex += 1
            }
            output += try getExtensionDescription(startInclusive:100, endExclusive:536870912, indent:indent)
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasFoo {
                    hashCode = (hashCode &* 31) &+ foo.hashValue
                }
                if hasFoo2 {
                    hashCode = (hashCode &* 31) &+ foo2.hashValue
                }
                if hasFoo3 {
                    hashCode = (hashCode &* 31) &+ foo3.hashValue
                }
                for oneValueFoo4 in foo4 {
                    hashCode = (hashCode &* 31) &+ oneValueFoo4.hashValue
                }
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 100, endExclusive:536870912))
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var foo:Int32 {
                get {
                    return builderResult.foo
                }
                set (value) {
                    builderResult.hasFoo = true
                    builderResult.foo = value
                }
            }
            public var hasFoo:Bool {
                get {
                    return builderResult.hasFoo
                }
            }
            @discardableResult
            public func setFoo(_ value:Int32) -> ProtobufUnittest.ComplexOptionType1.Builder {
                self.foo = value
                return self
            }
            @discardableResult
            public func clearFoo() -> ProtobufUnittest.ComplexOptionType1.Builder{
                builderResult.hasFoo = false
                builderResult.foo = nil
                return self
            }
            public var foo2:Int32 {
                get {
                    return builderResult.foo2
                }
                set (value) {
                    builderResult.hasFoo2 = true
                    builderResult.foo2 = value
                }
            }
            public var hasFoo2:Bool {
                get {
                    return builderResult.hasFoo2
                }
            }
            @discardableResult
            public func setFoo2(_ value:Int32) -> ProtobufUnittest.ComplexOptionType1.Builder {
                self.foo2 = value
                return self
            }
            @discardableResult
            public func clearFoo2() -> ProtobufUnittest.ComplexOptionType1.Builder{
                builderResult.hasFoo2 = false
                builderResult.foo2 = nil
                return self
            }
            public var foo3:Int32 {
                get {
                    return builderResult.foo3
                }
                set (value) {
                    builderResult.hasFoo3 = true
                    builderResult.foo3 = value
                }
            }
            public var hasFoo3:Bool {
                get {
                    return builderResult.hasFoo3
                }
            }
            @discardableResult
            public func setFoo3(_ value:Int32) -> ProtobufUnittest.ComplexOptionType1.Builder {
                self.foo3 = value
                return self
            }
            @discardableResult
            public func clearFoo3() -> ProtobufUnittest.ComplexOptionType1.Builder{
                builderResult.hasFoo3 = false
                builderResult.foo3 = nil
                return self
            }
            public var foo4:Array<Int32> {
                get {
                    return builderResult.foo4
                }
                set (array) {
                    builderResult.foo4 = array
                }
            }
            @discardableResult
            public func setFoo4(_ value:Array<Int32>) -> ProtobufUnittest.ComplexOptionType1.Builder {
                self.foo4 = value
                return self
            }
            @discardableResult
            public func clearFoo4() -> ProtobufUnittest.ComplexOptionType1.Builder {
                builderResult.foo4.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:ExtendableMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.ComplexOptionType1.Builder {
                builderResult = ProtobufUnittest.ComplexOptionType1()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.ComplexOptionType1.Builder {
                return try ProtobufUnittest.ComplexOptionType1.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.ComplexOptionType1 {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.ComplexOptionType1 {
                let returnMe:ProtobufUnittest.ComplexOptionType1 = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.ComplexOptionType1) throws -> ProtobufUnittest.ComplexOptionType1.Builder {
                if other == ProtobufUnittest.ComplexOptionType1() {
                    return self
                }
                if other.hasFoo {
                    foo = other.foo
                }
                if other.hasFoo2 {
                    foo2 = other.foo2
                }
                if other.hasFoo3 {
                    foo3 = other.foo3
                }
                if !other.foo4.isEmpty {
                    builderResult.foo4 += other.foo4
                }
                try mergeExtensionFields(other: other)
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ComplexOptionType1.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType1.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:
                        foo = try codedInputStream.readInt32()

                    case 16:
                        foo2 = try codedInputStream.readInt32()

                    case 24:
                        foo3 = try codedInputStream.readInt32()

                    case 32:
                        foo4 += [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.ComplexOptionType1.Builder {
                let resultDecodedBuilder = ProtobufUnittest.ComplexOptionType1.Builder()
                if let jsonValueFoo = jsonMap["foo"] as? Int {
                    resultDecodedBuilder.foo = Int32(jsonValueFoo)
                } else if let jsonValueFoo = jsonMap["foo"] as? String {
                    resultDecodedBuilder.foo = Int32(jsonValueFoo)!
                }
                if let jsonValueFoo2 = jsonMap["foo2"] as? Int {
                    resultDecodedBuilder.foo2 = Int32(jsonValueFoo2)
                } else if let jsonValueFoo2 = jsonMap["foo2"] as? String {
                    resultDecodedBuilder.foo2 = Int32(jsonValueFoo2)!
                }
                if let jsonValueFoo3 = jsonMap["foo3"] as? Int {
                    resultDecodedBuilder.foo3 = Int32(jsonValueFoo3)
                } else if let jsonValueFoo3 = jsonMap["foo3"] as? String {
                    resultDecodedBuilder.foo3 = Int32(jsonValueFoo3)!
                }
                if let jsonValueFoo4 = jsonMap["foo4"] as? Array<Int> {
                    var jsonArrayFoo4:Array<Int32> = []
                    for oneValueFoo4 in jsonValueFoo4 {
                        jsonArrayFoo4.append(Int32(oneValueFoo4))
                    }
                    resultDecodedBuilder.foo4 = jsonArrayFoo4
                }
                return resultDecodedBuilder
            }
            override class public func fromJSONToBuilder(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.ComplexOptionType1.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.ComplexOptionType1.Builder.decodeToBuilder(jsonMap:jsDataCast)
            }
        }

    }

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

        public static func == (lhs: ProtobufUnittest.ComplexOptionType2, rhs: ProtobufUnittest.ComplexOptionType2) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasBar == rhs.hasBar) && (!lhs.hasBar || lhs.bar == rhs.bar)
            fieldCheck = fieldCheck && (lhs.hasBaz == rhs.hasBaz) && (!lhs.hasBaz || lhs.baz == rhs.baz)
            fieldCheck = fieldCheck && (lhs.hasFred == rhs.hasFred) && (!lhs.hasFred || lhs.fred == rhs.fred)
            fieldCheck = fieldCheck && (lhs.barney == rhs.barney)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:100, endExclusive:536870912)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

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

            public static func == (lhs: ProtobufUnittest.ComplexOptionType2.ComplexOptionType4, rhs: ProtobufUnittest.ComplexOptionType2.ComplexOptionType4) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasWaldo == rhs.hasWaldo) && (!lhs.hasWaldo || lhs.waldo == rhs.waldo)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var waldo:Int32! = nil
            public fileprivate(set) var hasWaldo:Bool = false

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


            //Meta information declaration start

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

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

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

        }

        //Nested type declaration end

        public fileprivate(set) var bar:ProtobufUnittest.ComplexOptionType1!
        public fileprivate(set) var hasBar:Bool = false
        public fileprivate(set) var baz:Int32! = nil
        public fileprivate(set) var hasBaz:Bool = false

        public fileprivate(set) var fred:ProtobufUnittest.ComplexOptionType2.ComplexOptionType4!
        public fileprivate(set) var hasFred:Bool = false
        public fileprivate(set) var barney:Array<ProtobufUnittest.ComplexOptionType2.ComplexOptionType4>  = Array<ProtobufUnittest.ComplexOptionType2.ComplexOptionType4>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            if hasBar {
                try bar.isInitialized()
            }
            try extensionsAreInitialized()}
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasBar {
                try codedOutputStream.writeMessage(fieldNumber: 1, value:bar)
            }
            if hasBaz {
                try codedOutputStream.writeInt32(fieldNumber: 2, value:baz)
            }
            if hasFred {
                try codedOutputStream.writeMessage(fieldNumber: 3, value:fred)
            }
            for oneElementBarney in barney {
                  try codedOutputStream.writeMessage(fieldNumber: 4, value:oneElementBarney)
            }
            try writeExtensionsTo(codedOutputStream: codedOutputStream, startInclusive:100, 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 hasBar {
                if let varSizebar = bar?.computeMessageSize(fieldNumber: 1) {
                    serialize_size += varSizebar
                }
            }
            if hasBaz {
                serialize_size += baz.computeInt32Size(fieldNumber: 2)
            }
            if hasFred {
                if let varSizefred = fred?.computeMessageSize(fieldNumber: 3) {
                    serialize_size += varSizefred
                }
            }
            for oneElementBarney in barney {
                serialize_size += oneElementBarney.computeMessageSize(fieldNumber: 4)
            }
            serialize_size += extensionsSerializedSize()
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.ComplexOptionType2.Builder {
            return ProtobufUnittest.ComplexOptionType2.classBuilder() as! ProtobufUnittest.ComplexOptionType2.Builder
        }
        public func getBuilder() -> ProtobufUnittest.ComplexOptionType2.Builder {
            return classBuilder() as! ProtobufUnittest.ComplexOptionType2.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.ComplexOptionType2.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.ComplexOptionType2.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.ComplexOptionType2.Builder {
            return try ProtobufUnittest.ComplexOptionType2.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.ComplexOptionType2) throws -> ProtobufUnittest.ComplexOptionType2.Builder {
            return try ProtobufUnittest.ComplexOptionType2.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasBar {
                jsonMap["bar"] = try bar.encode()
            }
            if hasBaz {
                jsonMap["baz"] = Int(baz)
            }
            if hasFred {
                jsonMap["fred"] = try fred.encode()
            }
            if !barney.isEmpty {
                var jsonArrayBarney:Array<Dictionary<String,Any>> = []
                for oneValueBarney in barney {
                    let ecodedMessageBarney = try oneValueBarney.encode()
                    jsonArrayBarney.append(ecodedMessageBarney)
                }
                jsonMap["barney"] = jsonArrayBarney
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.ComplexOptionType2 {
            return try ProtobufUnittest.ComplexOptionType2.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.ComplexOptionType2 {
            return try ProtobufUnittest.ComplexOptionType2.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasBar {
                output += "\(indent) bar {\n"
                if let outDescBar = bar {
                    output += try outDescBar.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasBaz {
                output += "\(indent) baz: \(String(describing: baz)) \n"
            }
            if hasFred {
                output += "\(indent) fred {\n"
                if let outDescFred = fred {
                    output += try outDescFred.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            var barneyElementIndex:Int = 0
            for oneElementBarney in barney {
                output += "\(indent) barney[\(barneyElementIndex)] {\n"
                output += try oneElementBarney.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                barneyElementIndex += 1
            }
            output += try getExtensionDescription(startInclusive:100, endExclusive:536870912, indent:indent)
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasBar {
                    if let hashValuebar = bar?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuebar
                    }
                }
                if hasBaz {
                    hashCode = (hashCode &* 31) &+ baz.hashValue
                }
                if hasFred {
                    if let hashValuefred = fred?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefred
                    }
                }
                for oneElementBarney in barney {
                    hashCode = (hashCode &* 31) &+ oneElementBarney.hashValue
                }
                hashCode = (hashCode &* 31) &+ Int(hashExtensionsFrom(startInclusive: 100, endExclusive:536870912))
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var bar:ProtobufUnittest.ComplexOptionType1! {
                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.ComplexOptionType1.Builder! {
                didSet {
                    builderResult.hasBar = true
                }
            }
            public func getBarBuilder() -> ProtobufUnittest.ComplexOptionType1.Builder {
                if barBuilder_ == nil {
                    barBuilder_ = ProtobufUnittest.ComplexOptionType1.Builder()
                    builderResult.bar = barBuilder_.getMessage()
                    if bar != nil {
                        try! barBuilder_.mergeFrom(other: bar)
                    }
                }
                return barBuilder_
            }
            @discardableResult
            public func setBar(_ value:ProtobufUnittest.ComplexOptionType1!) -> ProtobufUnittest.ComplexOptionType2.Builder {
                self.bar = value
                return self
            }
            @discardableResult
            public func mergeBar(value:ProtobufUnittest.ComplexOptionType1) throws -> ProtobufUnittest.ComplexOptionType2.Builder {
                if builderResult.hasBar {
                    builderResult.bar = try ProtobufUnittest.ComplexOptionType1.builderWithPrototype(prototype:builderResult.bar).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.bar = value
                }
                builderResult.hasBar = true
                return self
            }
            @discardableResult
            public func clearBar() -> ProtobufUnittest.ComplexOptionType2.Builder {
                barBuilder_ = nil
                builderResult.hasBar = false
                builderResult.bar = nil
                return self
            }
            public var baz:Int32 {
                get {
                    return builderResult.baz
                }
                set (value) {
                    builderResult.hasBaz = true
                    builderResult.baz = value
                }
            }
            public var hasBaz:Bool {
                get {
                    return builderResult.hasBaz
                }
            }
            @discardableResult
            public func setBaz(_ value:Int32) -> ProtobufUnittest.ComplexOptionType2.Builder {
                self.baz = value
                return self
            }
            @discardableResult
            public func clearBaz() -> ProtobufUnittest.ComplexOptionType2.Builder{
                builderResult.hasBaz = false
                builderResult.baz = nil
                return self
            }
            public var fred:ProtobufUnittest.ComplexOptionType2.ComplexOptionType4! {
                get {
                    if fredBuilder_ != nil {
                        builderResult.fred = fredBuilder_.getMessage()
                    }
                    return builderResult.fred
                }
                set (value) {
                    builderResult.hasFred = value != nil
                    builderResult.fred = value
                }
            }
            public var hasFred:Bool {
                get {
                    return builderResult.hasFred
                }
            }
            fileprivate var fredBuilder_:ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder! {
                didSet {
                    builderResult.hasFred = true
                }
            }
            public func getFredBuilder() -> ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder {
                if fredBuilder_ == nil {
                    fredBuilder_ = ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder()
                    builderResult.fred = fredBuilder_.getMessage()
                    if fred != nil {
                        try! fredBuilder_.mergeFrom(other: fred)
                    }
                }
                return fredBuilder_
            }
            @discardableResult
            public func setFred(_ value:ProtobufUnittest.ComplexOptionType2.ComplexOptionType4!) -> ProtobufUnittest.ComplexOptionType2.Builder {
                self.fred = value
                return self
            }
            @discardableResult
            public func mergeFred(value:ProtobufUnittest.ComplexOptionType2.ComplexOptionType4) throws -> ProtobufUnittest.ComplexOptionType2.Builder {
                if builderResult.hasFred {
                    builderResult.fred = try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.builderWithPrototype(prototype:builderResult.fred).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.fred = value
                }
                builderResult.hasFred = true
                return self
            }
            @discardableResult
            public func clearFred() -> ProtobufUnittest.ComplexOptionType2.Builder {
                fredBuilder_ = nil
                builderResult.hasFred = false
                builderResult.fred = nil
                return self
            }
            public var barney:Array<ProtobufUnittest.ComplexOptionType2.ComplexOptionType4> {
                get {
                    return builderResult.barney
                }
                set (value) {
                    builderResult.barney = value
                }
            }
            @discardableResult
            public func setBarney(_ value:Array<ProtobufUnittest.ComplexOptionType2.ComplexOptionType4>) -> ProtobufUnittest.ComplexOptionType2.Builder {
                self.barney = value
                return self
            }
            @discardableResult
            public func clearBarney() -> ProtobufUnittest.ComplexOptionType2.Builder {
                builderResult.barney.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:ExtendableMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.ComplexOptionType2.Builder {
                builderResult = ProtobufUnittest.ComplexOptionType2()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.ComplexOptionType2.Builder {
                return try ProtobufUnittest.ComplexOptionType2.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.ComplexOptionType2 {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.ComplexOptionType2 {
                let returnMe:ProtobufUnittest.ComplexOptionType2 = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.ComplexOptionType2) throws -> ProtobufUnittest.ComplexOptionType2.Builder {
                if other == ProtobufUnittest.ComplexOptionType2() {
                    return self
                }
                if (other.hasBar) {
                    try mergeBar(value: other.bar)
                }
                if other.hasBaz {
                    baz = other.baz
                }
                if (other.hasFred) {
                    try mergeFred(value: other.fred)
                }
                if !other.barney.isEmpty  {
                     builderResult.barney += other.barney
                }
                try mergeExtensionFields(other: other)
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ComplexOptionType2.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType2.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.ComplexOptionType1.Builder = ProtobufUnittest.ComplexOptionType1.Builder()
                        if hasBar {
                            try subBuilder.mergeFrom(other: bar)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        bar = subBuilder.buildPartial()

                    case 16:
                        baz = try codedInputStream.readInt32()

                    case 26:
                        let subBuilder:ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder = ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder()
                        if hasFred {
                            try subBuilder.mergeFrom(other: fred)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        fred = subBuilder.buildPartial()

                    case 34:
                        let subBuilder = ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        barney.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.ComplexOptionType2.Builder {
                let resultDecodedBuilder = ProtobufUnittest.ComplexOptionType2.Builder()
                if let jsonValueBar = jsonMap["bar"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.bar = try ProtobufUnittest.ComplexOptionType1.Builder.decodeToBuilder(jsonMap:jsonValueBar).build()

                }
                if let jsonValueBaz = jsonMap["baz"] as? Int {
                    resultDecodedBuilder.baz = Int32(jsonValueBaz)
                } else if let jsonValueBaz = jsonMap["baz"] as? String {
                    resultDecodedBuilder.baz = Int32(jsonValueBaz)!
                }
                if let jsonValueFred = jsonMap["fred"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.fred = try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder.decodeToBuilder(jsonMap:jsonValueFred).build()

                }
                if let jsonValueBarney = jsonMap["barney"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayBarney:Array<ProtobufUnittest.ComplexOptionType2.ComplexOptionType4> = []
                    for oneValueBarney in jsonValueBarney {
                        let messageFromStringBarney = try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder.decodeToBuilder(jsonMap:oneValueBarney).build()

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

    }

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

        public static func == (lhs: ProtobufUnittest.ComplexOptionType3, rhs: ProtobufUnittest.ComplexOptionType3) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasQux == rhs.hasQux) && (!lhs.hasQux || lhs.qux == rhs.qux)
            fieldCheck = fieldCheck && (lhs.hasComplexOptionType5 == rhs.hasComplexOptionType5) && (!lhs.hasComplexOptionType5 || lhs.complexOptionType5 == rhs.complexOptionType5)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

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

            public static func == (lhs: ProtobufUnittest.ComplexOptionType3.ComplexOptionType5, rhs: ProtobufUnittest.ComplexOptionType3.ComplexOptionType5) -> Bool {
                if lhs === rhs {
                    return true
                }
                var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
                fieldCheck = fieldCheck && (lhs.hasPlugh == rhs.hasPlugh) && (!lhs.hasPlugh || lhs.plugh == rhs.plugh)
                fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
                return fieldCheck
            }

            public fileprivate(set) var plugh:Int32! = nil
            public fileprivate(set) var hasPlugh:Bool = false

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


            //Meta information declaration start

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

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

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

        }

        //Nested type declaration end

        public fileprivate(set) var qux:Int32! = nil
        public fileprivate(set) var hasQux:Bool = false

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


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public var qux:Int32 {
                get {
                    return builderResult.qux
                }
                set (value) {
                    builderResult.hasQux = true
                    builderResult.qux = value
                }
            }
            public var hasQux:Bool {
                get {
                    return builderResult.hasQux
                }
            }
            @discardableResult
            public func setQux(_ value:Int32) -> ProtobufUnittest.ComplexOptionType3.Builder {
                self.qux = value
                return self
            }
            @discardableResult
            public func clearQux() -> ProtobufUnittest.ComplexOptionType3.Builder{
                builderResult.hasQux = false
                builderResult.qux = nil
                return self
            }
            public var complexOptionType5:ProtobufUnittest.ComplexOptionType3.ComplexOptionType5! {
                get {
                    if complexOptionType5Builder_ != nil {
                        builderResult.complexOptionType5 = complexOptionType5Builder_.getMessage()
                    }
                    return builderResult.complexOptionType5
                }
                set (value) {
                    builderResult.hasComplexOptionType5 = value != nil
                    builderResult.complexOptionType5 = value
                }
            }
            public var hasComplexOptionType5:Bool {
                get {
                    return builderResult.hasComplexOptionType5
                }
            }
            fileprivate var complexOptionType5Builder_:ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder! {
                didSet {
                    builderResult.hasComplexOptionType5 = true
                }
            }
            public func getComplexOptionType5Builder() -> ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder {
                if complexOptionType5Builder_ == nil {
                    complexOptionType5Builder_ = ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder()
                    builderResult.complexOptionType5 = complexOptionType5Builder_.getMessage()
                    if complexOptionType5 != nil {
                        try! complexOptionType5Builder_.mergeFrom(other: complexOptionType5)
                    }
                }
                return complexOptionType5Builder_
            }
            @discardableResult
            public func setComplexOptionType5(_ value:ProtobufUnittest.ComplexOptionType3.ComplexOptionType5!) -> ProtobufUnittest.ComplexOptionType3.Builder {
                self.complexOptionType5 = value
                return self
            }
            @discardableResult
            public func mergeComplexOptionType5(value:ProtobufUnittest.ComplexOptionType3.ComplexOptionType5) throws -> ProtobufUnittest.ComplexOptionType3.Builder {
                if builderResult.hasComplexOptionType5 {
                    builderResult.complexOptionType5 = try ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.builderWithPrototype(prototype:builderResult.complexOptionType5).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.complexOptionType5 = value
                }
                builderResult.hasComplexOptionType5 = true
                return self
            }
            @discardableResult
            public func clearComplexOptionType5() -> ProtobufUnittest.ComplexOptionType3.Builder {
                complexOptionType5Builder_ = nil
                builderResult.hasComplexOptionType5 = false
                builderResult.complexOptionType5 = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.ComplexOptionType3.Builder {
                builderResult = ProtobufUnittest.ComplexOptionType3()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.ComplexOptionType3.Builder {
                return try ProtobufUnittest.ComplexOptionType3.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.ComplexOptionType3 {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.ComplexOptionType3 {
                let returnMe:ProtobufUnittest.ComplexOptionType3 = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.ComplexOptionType3) throws -> ProtobufUnittest.ComplexOptionType3.Builder {
                if other == ProtobufUnittest.ComplexOptionType3() {
                    return self
                }
                if other.hasQux {
                    qux = other.qux
                }
                if (other.hasComplexOptionType5) {
                    try mergeComplexOptionType5(value: other.complexOptionType5)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ComplexOptionType3.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType3.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:
                        qux = try codedInputStream.readInt32()

                    case 19:
                        let subBuilder:ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder = ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder()
                        if hasComplexOptionType5 {
                            try subBuilder.mergeFrom(other: complexOptionType5)
                        }
                        try codedInputStream.readGroup(fieldNumber: 2, builder:subBuilder, extensionRegistry:extensionRegistry)
                        complexOptionType5 = 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.ComplexOptionType3.Builder {
                let resultDecodedBuilder = ProtobufUnittest.ComplexOptionType3.Builder()
                if let jsonValueQux = jsonMap["qux"] as? Int {
                    resultDecodedBuilder.qux = Int32(jsonValueQux)
                } else if let jsonValueQux = jsonMap["qux"] as? String {
                    resultDecodedBuilder.qux = Int32(jsonValueQux)!
                }
                if let jsonValueComplexOptionType5 = jsonMap["complexoptiontype5"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.complexOptionType5 = try ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder.decodeToBuilder(jsonMap:jsonValueComplexOptionType5).build()

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

    }

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

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

        public fileprivate(set) var xyzzy:Int32! = nil
        public fileprivate(set) var hasXyzzy:Bool = false

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


        //Meta information declaration start

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

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

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

    }

    /// Note that we try various different ways of naming the same extension.
    final public class VariousComplexOptions : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.VariousComplexOptions.Builder

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

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

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

    }

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

        public static func == (lhs: ProtobufUnittest.AggregateMessageSet, rhs: ProtobufUnittest.AggregateMessageSet) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && lhs.isEqualExtensionsInOther(otherMessage: rhs, startInclusive:4, endExclusive:2147483647)
            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:4, endExclusive:2147483647)
            try unknownFields.writeAsMessageSetTo(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.serializedSizeAsMessageSet()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.AggregateMessageSet.Builder {
            return ProtobufUnittest.AggregateMessageSet.classBuilder() as! ProtobufUnittest.AggregateMessageSet.Builder
        }
        public func getBuilder() -> ProtobufUnittest.AggregateMessageSet.Builder {
            return classBuilder() as! ProtobufUnittest.AggregateMessageSet.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.AggregateMessageSet.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.AggregateMessageSet.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.AggregateMessageSet.Builder {
            return try ProtobufUnittest.AggregateMessageSet.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.AggregateMessageSet) throws -> ProtobufUnittest.AggregateMessageSet.Builder {
            return try ProtobufUnittest.AggregateMessageSet.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.AggregateMessageSet {
            return try ProtobufUnittest.AggregateMessageSet.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.AggregateMessageSet {
            return try ProtobufUnittest.AggregateMessageSet.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            output += try getExtensionDescription(startInclusive:4, endExclusive:2147483647, 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: 4, endExclusive:2147483647))
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

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

    }

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

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

        public fileprivate(set) var s:String! = nil
        public fileprivate(set) var hasS:Bool = false

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


        //Meta information declaration start

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

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

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

    }

    /// A helper type used to test aggregate option parsing
    final public class Aggregate : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.Aggregate.Builder

        public static func == (lhs: ProtobufUnittest.Aggregate, rhs: ProtobufUnittest.Aggregate) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasI == rhs.hasI) && (!lhs.hasI || lhs.i == rhs.i)
            fieldCheck = fieldCheck && (lhs.hasS == rhs.hasS) && (!lhs.hasS || lhs.s == rhs.s)
            fieldCheck = fieldCheck && (lhs.hasSub == rhs.hasSub) && (!lhs.hasSub || lhs.sub == rhs.sub)
            fieldCheck = fieldCheck && (lhs.hasFile == rhs.hasFile) && (!lhs.hasFile || lhs.file == rhs.file)
            fieldCheck = fieldCheck && (lhs.hasMset == rhs.hasMset) && (!lhs.hasMset || lhs.mset == rhs.mset)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        public fileprivate(set) var i:Int32! = nil
        public fileprivate(set) var hasI:Bool = false

        public fileprivate(set) var s:String! = nil
        public fileprivate(set) var hasS:Bool = false

        public fileprivate(set) var sub:ProtobufUnittest.Aggregate!
        public fileprivate(set) var hasSub:Bool = false
        public fileprivate(set) var file:Google.Protobuf.FileOptions!
        public fileprivate(set) var hasFile:Bool = false
        public fileprivate(set) var mset:ProtobufUnittest.AggregateMessageSet!
        public fileprivate(set) var hasMset:Bool = false
        public class func nested() -> ConcreateExtensionField {
               return Aggregatenested
        }
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
            if hasSub {
                try sub.isInitialized()
            }
            if hasFile {
                try file.isInitialized()
            }
            if hasMset {
                try mset.isInitialized()
            }
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasI {
                try codedOutputStream.writeInt32(fieldNumber: 1, value:i)
            }
            if hasS {
                try codedOutputStream.writeString(fieldNumber: 2, value:s)
            }
            if hasSub {
                try codedOutputStream.writeMessage(fieldNumber: 3, value:sub)
            }
            if hasFile {
                try codedOutputStream.writeMessage(fieldNumber: 4, value:file)
            }
            if hasMset {
                try codedOutputStream.writeMessage(fieldNumber: 5, value:mset)
            }
            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 hasI {
                serialize_size += i.computeInt32Size(fieldNumber: 1)
            }
            if hasS {
                serialize_size += s.computeStringSize(fieldNumber: 2)
            }
            if hasSub {
                if let varSizesub = sub?.computeMessageSize(fieldNumber: 3) {
                    serialize_size += varSizesub
                }
            }
            if hasFile {
                if let varSizefile = file?.computeMessageSize(fieldNumber: 4) {
                    serialize_size += varSizefile
                }
            }
            if hasMset {
                if let varSizemset = mset?.computeMessageSize(fieldNumber: 5) {
                    serialize_size += varSizemset
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> ProtobufUnittest.Aggregate.Builder {
            return ProtobufUnittest.Aggregate.classBuilder() as! ProtobufUnittest.Aggregate.Builder
        }
        public func getBuilder() -> ProtobufUnittest.Aggregate.Builder {
            return classBuilder() as! ProtobufUnittest.Aggregate.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Aggregate.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.Aggregate.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.Aggregate.Builder {
            return try ProtobufUnittest.Aggregate.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.Aggregate) throws -> ProtobufUnittest.Aggregate.Builder {
            return try ProtobufUnittest.Aggregate.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasI {
                jsonMap["i"] = Int(i)
            }
            if hasS {
                jsonMap["s"] = s
            }
            if hasSub {
                jsonMap["sub"] = try sub.encode()
            }
            if hasFile {
                jsonMap["file"] = try file.encode()
            }
            if hasMset {
                jsonMap["mset"] = try mset.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> ProtobufUnittest.Aggregate {
            return try ProtobufUnittest.Aggregate.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.Aggregate {
            return try ProtobufUnittest.Aggregate.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasI {
                output += "\(indent) i: \(String(describing: i)) \n"
            }
            if hasS {
                output += "\(indent) s: \(String(describing: s)) \n"
            }
            if hasSub {
                output += "\(indent) sub {\n"
                if let outDescSub = sub {
                    output += try outDescSub.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasFile {
                output += "\(indent) file {\n"
                if let outDescFile = file {
                    output += try outDescFile.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasMset {
                output += "\(indent) mset {\n"
                if let outDescMset = mset {
                    output += try outDescMset.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasI {
                    hashCode = (hashCode &* 31) &+ i.hashValue
                }
                if hasS {
                    hashCode = (hashCode &* 31) &+ s.hashValue
                }
                if hasSub {
                    if let hashValuesub = sub?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuesub
                    }
                }
                if hasFile {
                    if let hashValuefile = file?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuefile
                    }
                }
                if hasMset {
                    if let hashValuemset = mset?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuemset
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            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.Aggregate.Builder {
                self.i = value
                return self
            }
            @discardableResult
            public func clearI() -> ProtobufUnittest.Aggregate.Builder{
                builderResult.hasI = false
                builderResult.i = nil
                return self
            }
            public var s:String {
                get {
                    return builderResult.s
                }
                set (value) {
                    builderResult.hasS = true
                    builderResult.s = value
                }
            }
            public var hasS:Bool {
                get {
                    return builderResult.hasS
                }
            }
            @discardableResult
            public func setS(_ value:String) -> ProtobufUnittest.Aggregate.Builder {
                self.s = value
                return self
            }
            @discardableResult
            public func clearS() -> ProtobufUnittest.Aggregate.Builder{
                builderResult.hasS = false
                builderResult.s = nil
                return self
            }
            /// A nested object
            public var sub:ProtobufUnittest.Aggregate! {
                get {
                    if subBuilder_ != nil {
                        builderResult.sub = subBuilder_.getMessage()
                    }
                    return builderResult.sub
                }
                set (value) {
                    builderResult.hasSub = value != nil
                    builderResult.sub = value
                }
            }
            public var hasSub:Bool {
                get {
                    return builderResult.hasSub
                }
            }
            fileprivate var subBuilder_:ProtobufUnittest.Aggregate.Builder! {
                didSet {
                    builderResult.hasSub = true
                }
            }
            public func getSubBuilder() -> ProtobufUnittest.Aggregate.Builder {
                if subBuilder_ == nil {
                    subBuilder_ = ProtobufUnittest.Aggregate.Builder()
                    builderResult.sub = subBuilder_.getMessage()
                    if sub != nil {
                        try! subBuilder_.mergeFrom(other: sub)
                    }
                }
                return subBuilder_
            }
            @discardableResult
            public func setSub(_ value:ProtobufUnittest.Aggregate!) -> ProtobufUnittest.Aggregate.Builder {
                self.sub = value
                return self
            }
            @discardableResult
            public func mergeSub(value:ProtobufUnittest.Aggregate) throws -> ProtobufUnittest.Aggregate.Builder {
                if builderResult.hasSub {
                    builderResult.sub = try ProtobufUnittest.Aggregate.builderWithPrototype(prototype:builderResult.sub).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.sub = value
                }
                builderResult.hasSub = true
                return self
            }
            @discardableResult
            public func clearSub() -> ProtobufUnittest.Aggregate.Builder {
                subBuilder_ = nil
                builderResult.hasSub = false
                builderResult.sub = nil
                return self
            }
            /// To test the parsing of extensions inside aggregate values
            public var file:Google.Protobuf.FileOptions! {
                get {
                    if fileBuilder_ != nil {
                        builderResult.file = fileBuilder_.getMessage()
                    }
                    return builderResult.file
                }
                set (value) {
                    builderResult.hasFile = value != nil
                    builderResult.file = value
                }
            }
            public var hasFile:Bool {
                get {
                    return builderResult.hasFile
                }
            }
            fileprivate var fileBuilder_:Google.Protobuf.FileOptions.Builder! {
                didSet {
                    builderResult.hasFile = true
                }
            }
            public func getFileBuilder() -> Google.Protobuf.FileOptions.Builder {
                if fileBuilder_ == nil {
                    fileBuilder_ = Google.Protobuf.FileOptions.Builder()
                    builderResult.file = fileBuilder_.getMessage()
                    if file != nil {
                        try! fileBuilder_.mergeFrom(other: file)
                    }
                }
                return fileBuilder_
            }
            @discardableResult
            public func setFile(_ value:Google.Protobuf.FileOptions!) -> ProtobufUnittest.Aggregate.Builder {
                self.file = value
                return self
            }
            @discardableResult
            public func mergeFile(value:Google.Protobuf.FileOptions) throws -> ProtobufUnittest.Aggregate.Builder {
                if builderResult.hasFile {
                    builderResult.file = try Google.Protobuf.FileOptions.builderWithPrototype(prototype:builderResult.file).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.file = value
                }
                builderResult.hasFile = true
                return self
            }
            @discardableResult
            public func clearFile() -> ProtobufUnittest.Aggregate.Builder {
                fileBuilder_ = nil
                builderResult.hasFile = false
                builderResult.file = nil
                return self
            }
            /// An embedded message set
            public var mset:ProtobufUnittest.AggregateMessageSet! {
                get {
                    if msetBuilder_ != nil {
                        builderResult.mset = msetBuilder_.getMessage()
                    }
                    return builderResult.mset
                }
                set (value) {
                    builderResult.hasMset = value != nil
                    builderResult.mset = value
                }
            }
            public var hasMset:Bool {
                get {
                    return builderResult.hasMset
                }
            }
            fileprivate var msetBuilder_:ProtobufUnittest.AggregateMessageSet.Builder! {
                didSet {
                    builderResult.hasMset = true
                }
            }
            public func getMsetBuilder() -> ProtobufUnittest.AggregateMessageSet.Builder {
                if msetBuilder_ == nil {
                    msetBuilder_ = ProtobufUnittest.AggregateMessageSet.Builder()
                    builderResult.mset = msetBuilder_.getMessage()
                    if mset != nil {
                        try! msetBuilder_.mergeFrom(other: mset)
                    }
                }
                return msetBuilder_
            }
            @discardableResult
            public func setMset(_ value:ProtobufUnittest.AggregateMessageSet!) -> ProtobufUnittest.Aggregate.Builder {
                self.mset = value
                return self
            }
            @discardableResult
            public func mergeMset(value:ProtobufUnittest.AggregateMessageSet) throws -> ProtobufUnittest.Aggregate.Builder {
                if builderResult.hasMset {
                    builderResult.mset = try ProtobufUnittest.AggregateMessageSet.builderWithPrototype(prototype:builderResult.mset).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.mset = value
                }
                builderResult.hasMset = true
                return self
            }
            @discardableResult
            public func clearMset() -> ProtobufUnittest.Aggregate.Builder {
                msetBuilder_ = nil
                builderResult.hasMset = false
                builderResult.mset = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> ProtobufUnittest.Aggregate.Builder {
                builderResult = ProtobufUnittest.Aggregate()
                return self
            }
            override public func clone() throws -> ProtobufUnittest.Aggregate.Builder {
                return try ProtobufUnittest.Aggregate.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> ProtobufUnittest.Aggregate {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> ProtobufUnittest.Aggregate {
                let returnMe:ProtobufUnittest.Aggregate = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:ProtobufUnittest.Aggregate) throws -> ProtobufUnittest.Aggregate.Builder {
                if other == ProtobufUnittest.Aggregate() {
                    return self
                }
                if other.hasI {
                    i = other.i
                }
                if other.hasS {
                    s = other.s
                }
                if (other.hasSub) {
                    try mergeSub(value: other.sub)
                }
                if (other.hasFile) {
                    try mergeFile(value: other.file)
                }
                if (other.hasMset) {
                    try mergeMset(value: other.mset)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Aggregate.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Aggregate.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:
                        i = try codedInputStream.readInt32()

                    case 18:
                        s = try codedInputStream.readString()

                    case 26:
                        let subBuilder:ProtobufUnittest.Aggregate.Builder = ProtobufUnittest.Aggregate.Builder()
                        if hasSub {
                            try subBuilder.mergeFrom(other: sub)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        sub = subBuilder.buildPartial()

                    case 34:
                        let subBuilder:Google.Protobuf.FileOptions.Builder = Google.Protobuf.FileOptions.Builder()
                        if hasFile {
                            try subBuilder.mergeFrom(other: file)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        file = subBuilder.buildPartial()

                    case 42:
                        let subBuilder:ProtobufUnittest.AggregateMessageSet.Builder = ProtobufUnittest.AggregateMessageSet.Builder()
                        if hasMset {
                            try subBuilder.mergeFrom(other: mset)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        mset = 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.Aggregate.Builder {
                let resultDecodedBuilder = ProtobufUnittest.Aggregate.Builder()
                if let jsonValueI = jsonMap["i"] as? Int {
                    resultDecodedBuilder.i = Int32(jsonValueI)
                } else if let jsonValueI = jsonMap["i"] as? String {
                    resultDecodedBuilder.i = Int32(jsonValueI)!
                }
                if let jsonValueS = jsonMap["s"] as? String {
                    resultDecodedBuilder.s = jsonValueS
                }
                if let jsonValueSub = jsonMap["sub"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.sub = try ProtobufUnittest.Aggregate.Builder.decodeToBuilder(jsonMap:jsonValueSub).build()

                }
                if let jsonValueFile = jsonMap["file"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.file = try Google.Protobuf.FileOptions.Builder.decodeToBuilder(jsonMap:jsonValueFile).build()

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

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

    }

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

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

        public fileprivate(set) var fieldname:Int32! = nil
        public fileprivate(set) var hasFieldname:Bool = false

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


        //Meta information declaration start

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

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

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

    }

    /// Test custom options for nested type.
    final public class NestedOptionType : GeneratedMessage {
        public typealias BuilderType = ProtobufUnittest.NestedOptionType.Builder

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



        //Nested type declaration start

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

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

            public fileprivate(set) var nestedField:Int32! = nil
            public fileprivate(set) var hasNestedField:Bool = false

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


            //Meta information declaration start

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

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

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

        }

        //Nested type declaration end



            //Enum type declaration start 

            public enum NestedEnum:Int32, GeneratedEnum {
                case nestedEnumValue = 1
                public func toString() -> String {
                    switch self {
                    case .nestedEnumValue: return "NESTED_ENUM_VALUE"
                    }
                }
                public static func fromString(_ str:String) throws -> ProtobufUnittest.NestedOptionType.NestedEnum {
                    switch str {
                    case "NESTED_ENUM_VALUE":    return .nestedEnumValue
                    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 .nestedEnumValue: return ".nestedEnumValue"
                    }
                }
                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 class func nestedExtension() -> ConcreateExtensionField {
               return NestedOptionTypenestedExtension
        }
        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.NestedOptionType.Builder {
            return ProtobufUnittest.NestedOptionType.classBuilder() as! ProtobufUnittest.NestedOptionType.Builder
        }
        public func getBuilder() -> ProtobufUnittest.NestedOptionType.Builder {
            return classBuilder() as! ProtobufUnittest.NestedOptionType.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.NestedOptionType.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return ProtobufUnittest.NestedOptionType.Builder()
        }
        public func toBuilder() throws -> ProtobufUnittest.NestedOptionType.Builder {
            return try ProtobufUnittest.NestedOptionType.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:ProtobufUnittest.NestedOptionType) throws -> ProtobufUnittest.NestedOptionType.Builder {
            return try ProtobufUnittest.NestedOptionType.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.NestedOptionType {
            return try ProtobufUnittest.NestedOptionType.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> ProtobufUnittest.NestedOptionType {
            return try ProtobufUnittest.NestedOptionType.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.NestedOptionType"
        }
        override public func className() -> String {
            return "ProtobufUnittest.NestedOptionType"
        }
        //Meta information declaration end

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

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

    }

}
extension ProtobufUnittest.TestMessageWithCustomOptions: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.TestMessageWithCustomOptions> {
        var mergedArray = Array<ProtobufUnittest.TestMessageWithCustomOptions>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestMessageWithCustomOptions? {
        return try ProtobufUnittest.TestMessageWithCustomOptions.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.TestMessageWithCustomOptions {
        return try ProtobufUnittest.TestMessageWithCustomOptions.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMessageWithCustomOptions {
        return try ProtobufUnittest.TestMessageWithCustomOptions.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.TestMessageWithCustomOptions {
        return try ProtobufUnittest.TestMessageWithCustomOptions.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMessageWithCustomOptions {
        return try ProtobufUnittest.TestMessageWithCustomOptions.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.TestMessageWithCustomOptions {
        return try ProtobufUnittest.TestMessageWithCustomOptions.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.TestMessageWithCustomOptions {
        return try ProtobufUnittest.TestMessageWithCustomOptions.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "field1": return self.field1
        default: return nil
        }
    }
}
extension ProtobufUnittest.TestMessageWithCustomOptions.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.TestMessageWithCustomOptions
    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? String else {
                    return
                }
                self.field1 = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.CustomOptionFooRequest: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.CustomOptionFooRequest> {
        var mergedArray = Array<ProtobufUnittest.CustomOptionFooRequest>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionFooRequest? {
        return try ProtobufUnittest.CustomOptionFooRequest.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.CustomOptionFooRequest {
        return try ProtobufUnittest.CustomOptionFooRequest.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooRequest {
        return try ProtobufUnittest.CustomOptionFooRequest.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionFooRequest {
        return try ProtobufUnittest.CustomOptionFooRequest.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooRequest {
        return try ProtobufUnittest.CustomOptionFooRequest.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.CustomOptionFooRequest {
        return try ProtobufUnittest.CustomOptionFooRequest.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooRequest {
        return try ProtobufUnittest.CustomOptionFooRequest.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.CustomOptionFooRequest.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.CustomOptionFooRequest
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.CustomOptionFooResponse: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.CustomOptionFooResponse> {
        var mergedArray = Array<ProtobufUnittest.CustomOptionFooResponse>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionFooResponse? {
        return try ProtobufUnittest.CustomOptionFooResponse.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.CustomOptionFooResponse {
        return try ProtobufUnittest.CustomOptionFooResponse.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooResponse {
        return try ProtobufUnittest.CustomOptionFooResponse.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionFooResponse {
        return try ProtobufUnittest.CustomOptionFooResponse.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooResponse {
        return try ProtobufUnittest.CustomOptionFooResponse.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.CustomOptionFooResponse {
        return try ProtobufUnittest.CustomOptionFooResponse.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooResponse {
        return try ProtobufUnittest.CustomOptionFooResponse.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.CustomOptionFooResponse.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.CustomOptionFooResponse
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.CustomOptionFooClientMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.CustomOptionFooClientMessage> {
        var mergedArray = Array<ProtobufUnittest.CustomOptionFooClientMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionFooClientMessage? {
        return try ProtobufUnittest.CustomOptionFooClientMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.CustomOptionFooClientMessage {
        return try ProtobufUnittest.CustomOptionFooClientMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooClientMessage {
        return try ProtobufUnittest.CustomOptionFooClientMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionFooClientMessage {
        return try ProtobufUnittest.CustomOptionFooClientMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooClientMessage {
        return try ProtobufUnittest.CustomOptionFooClientMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.CustomOptionFooClientMessage {
        return try ProtobufUnittest.CustomOptionFooClientMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooClientMessage {
        return try ProtobufUnittest.CustomOptionFooClientMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.CustomOptionFooClientMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.CustomOptionFooClientMessage
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.CustomOptionFooServerMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.CustomOptionFooServerMessage> {
        var mergedArray = Array<ProtobufUnittest.CustomOptionFooServerMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionFooServerMessage? {
        return try ProtobufUnittest.CustomOptionFooServerMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.CustomOptionFooServerMessage {
        return try ProtobufUnittest.CustomOptionFooServerMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooServerMessage {
        return try ProtobufUnittest.CustomOptionFooServerMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionFooServerMessage {
        return try ProtobufUnittest.CustomOptionFooServerMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooServerMessage {
        return try ProtobufUnittest.CustomOptionFooServerMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.CustomOptionFooServerMessage {
        return try ProtobufUnittest.CustomOptionFooServerMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionFooServerMessage {
        return try ProtobufUnittest.CustomOptionFooServerMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.CustomOptionFooServerMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.CustomOptionFooServerMessage
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.DummyMessageContainingEnum: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.DummyMessageContainingEnum> {
        var mergedArray = Array<ProtobufUnittest.DummyMessageContainingEnum>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.DummyMessageContainingEnum? {
        return try ProtobufUnittest.DummyMessageContainingEnum.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.DummyMessageContainingEnum {
        return try ProtobufUnittest.DummyMessageContainingEnum.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.DummyMessageContainingEnum {
        return try ProtobufUnittest.DummyMessageContainingEnum.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.DummyMessageContainingEnum {
        return try ProtobufUnittest.DummyMessageContainingEnum.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.DummyMessageContainingEnum {
        return try ProtobufUnittest.DummyMessageContainingEnum.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.DummyMessageContainingEnum {
        return try ProtobufUnittest.DummyMessageContainingEnum.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.DummyMessageContainingEnum {
        return try ProtobufUnittest.DummyMessageContainingEnum.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.DummyMessageContainingEnum.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.DummyMessageContainingEnum
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.DummyMessageInvalidAsOptionType: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.DummyMessageInvalidAsOptionType> {
        var mergedArray = Array<ProtobufUnittest.DummyMessageInvalidAsOptionType>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.DummyMessageInvalidAsOptionType? {
        return try ProtobufUnittest.DummyMessageInvalidAsOptionType.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.DummyMessageInvalidAsOptionType {
        return try ProtobufUnittest.DummyMessageInvalidAsOptionType.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.DummyMessageInvalidAsOptionType {
        return try ProtobufUnittest.DummyMessageInvalidAsOptionType.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.DummyMessageInvalidAsOptionType {
        return try ProtobufUnittest.DummyMessageInvalidAsOptionType.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.DummyMessageInvalidAsOptionType {
        return try ProtobufUnittest.DummyMessageInvalidAsOptionType.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.DummyMessageInvalidAsOptionType {
        return try ProtobufUnittest.DummyMessageInvalidAsOptionType.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.DummyMessageInvalidAsOptionType {
        return try ProtobufUnittest.DummyMessageInvalidAsOptionType.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.DummyMessageInvalidAsOptionType.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.DummyMessageInvalidAsOptionType
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.CustomOptionMinIntegerValues: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.CustomOptionMinIntegerValues> {
        var mergedArray = Array<ProtobufUnittest.CustomOptionMinIntegerValues>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionMinIntegerValues? {
        return try ProtobufUnittest.CustomOptionMinIntegerValues.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.CustomOptionMinIntegerValues {
        return try ProtobufUnittest.CustomOptionMinIntegerValues.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionMinIntegerValues {
        return try ProtobufUnittest.CustomOptionMinIntegerValues.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionMinIntegerValues {
        return try ProtobufUnittest.CustomOptionMinIntegerValues.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionMinIntegerValues {
        return try ProtobufUnittest.CustomOptionMinIntegerValues.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.CustomOptionMinIntegerValues {
        return try ProtobufUnittest.CustomOptionMinIntegerValues.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionMinIntegerValues {
        return try ProtobufUnittest.CustomOptionMinIntegerValues.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.CustomOptionMinIntegerValues.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.CustomOptionMinIntegerValues
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.CustomOptionMaxIntegerValues: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.CustomOptionMaxIntegerValues> {
        var mergedArray = Array<ProtobufUnittest.CustomOptionMaxIntegerValues>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionMaxIntegerValues? {
        return try ProtobufUnittest.CustomOptionMaxIntegerValues.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.CustomOptionMaxIntegerValues {
        return try ProtobufUnittest.CustomOptionMaxIntegerValues.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionMaxIntegerValues {
        return try ProtobufUnittest.CustomOptionMaxIntegerValues.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionMaxIntegerValues {
        return try ProtobufUnittest.CustomOptionMaxIntegerValues.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionMaxIntegerValues {
        return try ProtobufUnittest.CustomOptionMaxIntegerValues.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.CustomOptionMaxIntegerValues {
        return try ProtobufUnittest.CustomOptionMaxIntegerValues.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionMaxIntegerValues {
        return try ProtobufUnittest.CustomOptionMaxIntegerValues.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.CustomOptionMaxIntegerValues.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.CustomOptionMaxIntegerValues
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.CustomOptionOtherValues: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.CustomOptionOtherValues> {
        var mergedArray = Array<ProtobufUnittest.CustomOptionOtherValues>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionOtherValues? {
        return try ProtobufUnittest.CustomOptionOtherValues.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.CustomOptionOtherValues {
        return try ProtobufUnittest.CustomOptionOtherValues.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionOtherValues {
        return try ProtobufUnittest.CustomOptionOtherValues.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.CustomOptionOtherValues {
        return try ProtobufUnittest.CustomOptionOtherValues.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionOtherValues {
        return try ProtobufUnittest.CustomOptionOtherValues.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.CustomOptionOtherValues {
        return try ProtobufUnittest.CustomOptionOtherValues.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.CustomOptionOtherValues {
        return try ProtobufUnittest.CustomOptionOtherValues.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.CustomOptionOtherValues.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.CustomOptionOtherValues
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.SettingRealsFromPositiveInts: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.SettingRealsFromPositiveInts> {
        var mergedArray = Array<ProtobufUnittest.SettingRealsFromPositiveInts>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.SettingRealsFromPositiveInts? {
        return try ProtobufUnittest.SettingRealsFromPositiveInts.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.SettingRealsFromPositiveInts {
        return try ProtobufUnittest.SettingRealsFromPositiveInts.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SettingRealsFromPositiveInts {
        return try ProtobufUnittest.SettingRealsFromPositiveInts.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.SettingRealsFromPositiveInts {
        return try ProtobufUnittest.SettingRealsFromPositiveInts.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SettingRealsFromPositiveInts {
        return try ProtobufUnittest.SettingRealsFromPositiveInts.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.SettingRealsFromPositiveInts {
        return try ProtobufUnittest.SettingRealsFromPositiveInts.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SettingRealsFromPositiveInts {
        return try ProtobufUnittest.SettingRealsFromPositiveInts.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.SettingRealsFromPositiveInts.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.SettingRealsFromPositiveInts
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.SettingRealsFromNegativeInts: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.SettingRealsFromNegativeInts> {
        var mergedArray = Array<ProtobufUnittest.SettingRealsFromNegativeInts>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.SettingRealsFromNegativeInts? {
        return try ProtobufUnittest.SettingRealsFromNegativeInts.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.SettingRealsFromNegativeInts {
        return try ProtobufUnittest.SettingRealsFromNegativeInts.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SettingRealsFromNegativeInts {
        return try ProtobufUnittest.SettingRealsFromNegativeInts.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.SettingRealsFromNegativeInts {
        return try ProtobufUnittest.SettingRealsFromNegativeInts.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SettingRealsFromNegativeInts {
        return try ProtobufUnittest.SettingRealsFromNegativeInts.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.SettingRealsFromNegativeInts {
        return try ProtobufUnittest.SettingRealsFromNegativeInts.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.SettingRealsFromNegativeInts {
        return try ProtobufUnittest.SettingRealsFromNegativeInts.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.SettingRealsFromNegativeInts.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.SettingRealsFromNegativeInts
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.ComplexOptionType1: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.ComplexOptionType1> {
        var mergedArray = Array<ProtobufUnittest.ComplexOptionType1>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType1? {
        return try ProtobufUnittest.ComplexOptionType1.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.ComplexOptionType1 {
        return try ProtobufUnittest.ComplexOptionType1.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType1 {
        return try ProtobufUnittest.ComplexOptionType1.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType1 {
        return try ProtobufUnittest.ComplexOptionType1.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType1 {
        return try ProtobufUnittest.ComplexOptionType1.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ComplexOptionType1 {
        return try ProtobufUnittest.ComplexOptionType1.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType1 {
        return try ProtobufUnittest.ComplexOptionType1.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "foo": return self.foo
        case "foo2": return self.foo2
        case "foo3": return self.foo3
        case "foo4": return self.foo4
        default: return nil
        }
    }
}
extension ProtobufUnittest.ComplexOptionType1.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.ComplexOptionType1
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "foo": return self.foo
            case "foo2": return self.foo2
            case "foo3": return self.foo3
            case "foo4": return self.foo4
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "foo":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.foo = newSubscriptValue
            case "foo2":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.foo2 = newSubscriptValue
            case "foo3":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.foo3 = newSubscriptValue
            case "foo4":
                guard let newSubscriptValue = newSubscriptValue as? Array<Int32> else {
                    return
                }
                self.foo4 = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.ComplexOptionType2: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.ComplexOptionType2> {
        var mergedArray = Array<ProtobufUnittest.ComplexOptionType2>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType2? {
        return try ProtobufUnittest.ComplexOptionType2.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.ComplexOptionType2 {
        return try ProtobufUnittest.ComplexOptionType2.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType2 {
        return try ProtobufUnittest.ComplexOptionType2.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType2 {
        return try ProtobufUnittest.ComplexOptionType2.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType2 {
        return try ProtobufUnittest.ComplexOptionType2.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ComplexOptionType2 {
        return try ProtobufUnittest.ComplexOptionType2.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType2 {
        return try ProtobufUnittest.ComplexOptionType2.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "bar": return self.bar
        case "baz": return self.baz
        case "fred": return self.fred
        case "barney": return self.barney
        default: return nil
        }
    }
}
extension ProtobufUnittest.ComplexOptionType2.ComplexOptionType4: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.ComplexOptionType2.ComplexOptionType4> {
        var mergedArray = Array<ProtobufUnittest.ComplexOptionType2.ComplexOptionType4>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType2.ComplexOptionType4? {
        return try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.ComplexOptionType2.ComplexOptionType4 {
        return try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType2.ComplexOptionType4 {
        return try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType2.ComplexOptionType4 {
        return try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType2.ComplexOptionType4 {
        return try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ComplexOptionType2.ComplexOptionType4 {
        return try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType2.ComplexOptionType4 {
        return try ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "waldo": return self.waldo
        default: return nil
        }
    }
}
extension ProtobufUnittest.ComplexOptionType2.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.ComplexOptionType2
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "bar": return self.bar
            case "baz": return self.baz
            case "fred": return self.fred
            case "barney": return self.barney
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "bar":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.ComplexOptionType1 else {
                    return
                }
                self.bar = newSubscriptValue
            case "baz":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.baz = newSubscriptValue
            case "fred":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.ComplexOptionType2.ComplexOptionType4 else {
                    return
                }
                self.fred = newSubscriptValue
            case "barney":
                guard let newSubscriptValue = newSubscriptValue as? Array<ProtobufUnittest.ComplexOptionType2.ComplexOptionType4> else {
                    return
                }
                self.barney = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.ComplexOptionType2.ComplexOptionType4.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.ComplexOptionType2.ComplexOptionType4
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "waldo": return self.waldo
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "waldo":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.waldo = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.ComplexOptionType3: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.ComplexOptionType3> {
        var mergedArray = Array<ProtobufUnittest.ComplexOptionType3>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType3? {
        return try ProtobufUnittest.ComplexOptionType3.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.ComplexOptionType3 {
        return try ProtobufUnittest.ComplexOptionType3.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType3 {
        return try ProtobufUnittest.ComplexOptionType3.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType3 {
        return try ProtobufUnittest.ComplexOptionType3.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType3 {
        return try ProtobufUnittest.ComplexOptionType3.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ComplexOptionType3 {
        return try ProtobufUnittest.ComplexOptionType3.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType3 {
        return try ProtobufUnittest.ComplexOptionType3.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "qux": return self.qux
        case "complexOptionType5": return self.complexOptionType5
        default: return nil
        }
    }
}
extension ProtobufUnittest.ComplexOptionType3.ComplexOptionType5: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.ComplexOptionType3.ComplexOptionType5> {
        var mergedArray = Array<ProtobufUnittest.ComplexOptionType3.ComplexOptionType5>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType3.ComplexOptionType5? {
        return try ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.ComplexOptionType3.ComplexOptionType5 {
        return try ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType3.ComplexOptionType5 {
        return try ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOptionType3.ComplexOptionType5 {
        return try ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType3.ComplexOptionType5 {
        return try ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ComplexOptionType3.ComplexOptionType5 {
        return try ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOptionType3.ComplexOptionType5 {
        return try ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "plugh": return self.plugh
        default: return nil
        }
    }
}
extension ProtobufUnittest.ComplexOptionType3.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.ComplexOptionType3
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "qux": return self.qux
            case "complexOptionType5": return self.complexOptionType5
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "qux":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.qux = newSubscriptValue
            case "complexOptionType5":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.ComplexOptionType3.ComplexOptionType5 else {
                    return
                }
                self.complexOptionType5 = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.ComplexOptionType3.ComplexOptionType5.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.ComplexOptionType3.ComplexOptionType5
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "plugh": return self.plugh
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "plugh":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.plugh = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.ComplexOpt6: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.ComplexOpt6> {
        var mergedArray = Array<ProtobufUnittest.ComplexOpt6>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOpt6? {
        return try ProtobufUnittest.ComplexOpt6.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.ComplexOpt6 {
        return try ProtobufUnittest.ComplexOpt6.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOpt6 {
        return try ProtobufUnittest.ComplexOpt6.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.ComplexOpt6 {
        return try ProtobufUnittest.ComplexOpt6.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOpt6 {
        return try ProtobufUnittest.ComplexOpt6.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.ComplexOpt6 {
        return try ProtobufUnittest.ComplexOpt6.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.ComplexOpt6 {
        return try ProtobufUnittest.ComplexOpt6.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "xyzzy": return self.xyzzy
        default: return nil
        }
    }
}
extension ProtobufUnittest.ComplexOpt6.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.ComplexOpt6
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "xyzzy": return self.xyzzy
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "xyzzy":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.xyzzy = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.VariousComplexOptions: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.VariousComplexOptions> {
        var mergedArray = Array<ProtobufUnittest.VariousComplexOptions>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.VariousComplexOptions? {
        return try ProtobufUnittest.VariousComplexOptions.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.VariousComplexOptions {
        return try ProtobufUnittest.VariousComplexOptions.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.VariousComplexOptions {
        return try ProtobufUnittest.VariousComplexOptions.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.VariousComplexOptions {
        return try ProtobufUnittest.VariousComplexOptions.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.VariousComplexOptions {
        return try ProtobufUnittest.VariousComplexOptions.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.VariousComplexOptions {
        return try ProtobufUnittest.VariousComplexOptions.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.VariousComplexOptions {
        return try ProtobufUnittest.VariousComplexOptions.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.VariousComplexOptions.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.VariousComplexOptions
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.AggregateMessageSet: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.AggregateMessageSet> {
        var mergedArray = Array<ProtobufUnittest.AggregateMessageSet>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.AggregateMessageSet? {
        return try ProtobufUnittest.AggregateMessageSet.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.AggregateMessageSet {
        return try ProtobufUnittest.AggregateMessageSet.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.AggregateMessageSet {
        return try ProtobufUnittest.AggregateMessageSet.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.AggregateMessageSet {
        return try ProtobufUnittest.AggregateMessageSet.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.AggregateMessageSet {
        return try ProtobufUnittest.AggregateMessageSet.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.AggregateMessageSet {
        return try ProtobufUnittest.AggregateMessageSet.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.AggregateMessageSet {
        return try ProtobufUnittest.AggregateMessageSet.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.AggregateMessageSet.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.AggregateMessageSet
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.AggregateMessageSetElement: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.AggregateMessageSetElement> {
        var mergedArray = Array<ProtobufUnittest.AggregateMessageSetElement>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.AggregateMessageSetElement? {
        return try ProtobufUnittest.AggregateMessageSetElement.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.AggregateMessageSetElement {
        return try ProtobufUnittest.AggregateMessageSetElement.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.AggregateMessageSetElement {
        return try ProtobufUnittest.AggregateMessageSetElement.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.AggregateMessageSetElement {
        return try ProtobufUnittest.AggregateMessageSetElement.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.AggregateMessageSetElement {
        return try ProtobufUnittest.AggregateMessageSetElement.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.AggregateMessageSetElement {
        return try ProtobufUnittest.AggregateMessageSetElement.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.AggregateMessageSetElement {
        return try ProtobufUnittest.AggregateMessageSetElement.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "s": return self.s
        default: return nil
        }
    }
}
extension ProtobufUnittest.AggregateMessageSetElement.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.AggregateMessageSetElement
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "s": return self.s
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "s":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.s = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.Aggregate: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.Aggregate> {
        var mergedArray = Array<ProtobufUnittest.Aggregate>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.Aggregate? {
        return try ProtobufUnittest.Aggregate.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.Aggregate {
        return try ProtobufUnittest.Aggregate.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Aggregate {
        return try ProtobufUnittest.Aggregate.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.Aggregate {
        return try ProtobufUnittest.Aggregate.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Aggregate {
        return try ProtobufUnittest.Aggregate.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.Aggregate {
        return try ProtobufUnittest.Aggregate.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.Aggregate {
        return try ProtobufUnittest.Aggregate.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "i": return self.i
        case "s": return self.s
        case "sub": return self.sub
        case "file": return self.file
        case "mset": return self.mset
        default: return nil
        }
    }
}
extension ProtobufUnittest.Aggregate.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.Aggregate
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "i": return self.i
            case "s": return self.s
            case "sub": return self.sub
            case "file": return self.file
            case "mset": return self.mset
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "i":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.i = newSubscriptValue
            case "s":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.s = newSubscriptValue
            case "sub":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.Aggregate else {
                    return
                }
                self.sub = newSubscriptValue
            case "file":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.FileOptions else {
                    return
                }
                self.file = newSubscriptValue
            case "mset":
                guard let newSubscriptValue = newSubscriptValue as? ProtobufUnittest.AggregateMessageSet else {
                    return
                }
                self.mset = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.AggregateMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.AggregateMessage> {
        var mergedArray = Array<ProtobufUnittest.AggregateMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.AggregateMessage? {
        return try ProtobufUnittest.AggregateMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.AggregateMessage {
        return try ProtobufUnittest.AggregateMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.AggregateMessage {
        return try ProtobufUnittest.AggregateMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.AggregateMessage {
        return try ProtobufUnittest.AggregateMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.AggregateMessage {
        return try ProtobufUnittest.AggregateMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.AggregateMessage {
        return try ProtobufUnittest.AggregateMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.AggregateMessage {
        return try ProtobufUnittest.AggregateMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "fieldname": return self.fieldname
        default: return nil
        }
    }
}
extension ProtobufUnittest.AggregateMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.AggregateMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "fieldname": return self.fieldname
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "fieldname":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.fieldname = newSubscriptValue
            default: return
            }
        }
    }
}
extension ProtobufUnittest.NestedOptionType: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.NestedOptionType> {
        var mergedArray = Array<ProtobufUnittest.NestedOptionType>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.NestedOptionType? {
        return try ProtobufUnittest.NestedOptionType.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.NestedOptionType {
        return try ProtobufUnittest.NestedOptionType.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.NestedOptionType {
        return try ProtobufUnittest.NestedOptionType.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.NestedOptionType {
        return try ProtobufUnittest.NestedOptionType.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.NestedOptionType {
        return try ProtobufUnittest.NestedOptionType.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.NestedOptionType {
        return try ProtobufUnittest.NestedOptionType.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.NestedOptionType {
        return try ProtobufUnittest.NestedOptionType.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        return nil
    }
}
extension ProtobufUnittest.NestedOptionType.NestedMessage: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<ProtobufUnittest.NestedOptionType.NestedMessage> {
        var mergedArray = Array<ProtobufUnittest.NestedOptionType.NestedMessage>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> ProtobufUnittest.NestedOptionType.NestedMessage? {
        return try ProtobufUnittest.NestedOptionType.NestedMessage.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> ProtobufUnittest.NestedOptionType.NestedMessage {
        return try ProtobufUnittest.NestedOptionType.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:ProtobufUnittest.UnittestCustomOptionsRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.NestedOptionType.NestedMessage {
        return try ProtobufUnittest.NestedOptionType.NestedMessage.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> ProtobufUnittest.NestedOptionType.NestedMessage {
        return try ProtobufUnittest.NestedOptionType.NestedMessage.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.NestedOptionType.NestedMessage {
        return try ProtobufUnittest.NestedOptionType.NestedMessage.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> ProtobufUnittest.NestedOptionType.NestedMessage {
        return try ProtobufUnittest.NestedOptionType.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> ProtobufUnittest.NestedOptionType.NestedMessage {
        return try ProtobufUnittest.NestedOptionType.NestedMessage.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "nestedField": return self.nestedField
        default: return nil
        }
    }
}
extension ProtobufUnittest.NestedOptionType.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.NestedOptionType
    public subscript(key: String) -> Any? {
        get { return nil }
        set { }
    }
}
extension ProtobufUnittest.NestedOptionType.NestedMessage.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = ProtobufUnittest.NestedOptionType.NestedMessage
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "nestedField": return self.nestedField
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "nestedField":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.nestedField = newSubscriptValue
            default: return
            }
        }
    }
}

// @@protoc_insertion_point(global_scope)
