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

import Foundation

public extension Google.Protobuf{}

public extension Google.Protobuf {
    public struct TypeRoot {
        public static let `default` = TypeRoot()
        public var extensionRegistry:ExtensionRegistry

        init() {
            extensionRegistry = ExtensionRegistry()
            registerAllExtensions(registry: extensionRegistry)
            Google.Protobuf.SwiftDescriptorRoot.default.registerAllExtensions(registry: extensionRegistry)
            Google.Protobuf.AnyRoot.default.registerAllExtensions(registry: extensionRegistry)
            Google.Protobuf.SourceContextRoot.default.registerAllExtensions(registry: extensionRegistry)
        }
        public func registerAllExtensions(registry: ExtensionRegistry) {
        }
    }

    /// A light-weight descriptor for a proto message type.
    final public class ProtoType : GeneratedMessage {
        public typealias BuilderType = Google.Protobuf.ProtoType.Builder

        public static func == (lhs: Google.Protobuf.ProtoType, rhs: Google.Protobuf.ProtoType) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasName == rhs.hasName) && (!lhs.hasName || lhs.name == rhs.name)
            fieldCheck = fieldCheck && (lhs.fields == rhs.fields)
            fieldCheck = fieldCheck && (lhs.oneofs == rhs.oneofs)
            fieldCheck = fieldCheck && (lhs.options == rhs.options)
            fieldCheck = fieldCheck && (lhs.hasSourceContext == rhs.hasSourceContext) && (!lhs.hasSourceContext || lhs.sourceContext == rhs.sourceContext)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        /// The fully qualified message name.
        public fileprivate(set) var name:String! = nil
        public fileprivate(set) var hasName:Bool = false

        public fileprivate(set) var fields:Array<Google.Protobuf.Field>  = Array<Google.Protobuf.Field>()
        /// The list of oneof definitions.
        /// The list of oneofs declared in this Type
        public fileprivate(set) var oneofs:Array<String> = Array<String>()
        public fileprivate(set) var options:Array<Google.Protobuf.Option>  = Array<Google.Protobuf.Option>()
        public fileprivate(set) var sourceContext:Google.Protobuf.SourceContext!
        public fileprivate(set) var hasSourceContext:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasName {
                try codedOutputStream.writeString(fieldNumber: 1, value:name)
            }
            for oneElementFields in fields {
                  try codedOutputStream.writeMessage(fieldNumber: 2, value:oneElementFields)
            }
            if !oneofs.isEmpty {
                for oneValueoneofs in oneofs {
                    try codedOutputStream.writeString(fieldNumber: 3, value:oneValueoneofs)
                }
            }
            for oneElementOptions in options {
                  try codedOutputStream.writeMessage(fieldNumber: 4, value:oneElementOptions)
            }
            if hasSourceContext {
                try codedOutputStream.writeMessage(fieldNumber: 5, value:sourceContext)
            }
            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 hasName {
                serialize_size += name.computeStringSize(fieldNumber: 1)
            }
            for oneElementFields in fields {
                serialize_size += oneElementFields.computeMessageSize(fieldNumber: 2)
            }
            var dataSizeOneofs:Int32 = 0
            for oneValueoneofs in oneofs {
                dataSizeOneofs += oneValueoneofs.computeStringSizeNoTag()
            }
            serialize_size += dataSizeOneofs
            serialize_size += 1 * Int32(oneofs.count)
            for oneElementOptions in options {
                serialize_size += oneElementOptions.computeMessageSize(fieldNumber: 4)
            }
            if hasSourceContext {
                if let varSizesourceContext = sourceContext?.computeMessageSize(fieldNumber: 5) {
                    serialize_size += varSizesourceContext
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Google.Protobuf.ProtoType.Builder {
            return Google.Protobuf.ProtoType.classBuilder() as! Google.Protobuf.ProtoType.Builder
        }
        public func getBuilder() -> Google.Protobuf.ProtoType.Builder {
            return classBuilder() as! Google.Protobuf.ProtoType.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.ProtoType.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.ProtoType.Builder()
        }
        public func toBuilder() throws -> Google.Protobuf.ProtoType.Builder {
            return try Google.Protobuf.ProtoType.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Google.Protobuf.ProtoType) throws -> Google.Protobuf.ProtoType.Builder {
            return try Google.Protobuf.ProtoType.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasName {
                jsonMap["name"] = name
            }
            if !fields.isEmpty {
                var jsonArrayFields:Array<Dictionary<String,Any>> = []
                for oneValueFields in fields {
                    let ecodedMessageFields = try oneValueFields.encode()
                    jsonArrayFields.append(ecodedMessageFields)
                }
                jsonMap["fields"] = jsonArrayFields
            }
            if !oneofs.isEmpty {
                var jsonArrayOneofs:Array<String> = []
                for oneValueOneofs in oneofs {
                    jsonArrayOneofs.append(oneValueOneofs)
                }
                jsonMap["oneofs"] = jsonArrayOneofs
            }
            if !options.isEmpty {
                var jsonArrayOptions:Array<Dictionary<String,Any>> = []
                for oneValueOptions in options {
                    let ecodedMessageOptions = try oneValueOptions.encode()
                    jsonArrayOptions.append(ecodedMessageOptions)
                }
                jsonMap["options"] = jsonArrayOptions
            }
            if hasSourceContext {
                jsonMap["sourceContext"] = try sourceContext.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Google.Protobuf.ProtoType {
            return try Google.Protobuf.ProtoType.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Google.Protobuf.ProtoType {
            return try Google.Protobuf.ProtoType.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasName {
                output += "\(indent) name: \(String(describing: name)) \n"
            }
            var fieldsElementIndex:Int = 0
            for oneElementFields in fields {
                output += "\(indent) fields[\(fieldsElementIndex)] {\n"
                output += try oneElementFields.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                fieldsElementIndex += 1
            }
            var oneofsElementIndex:Int = 0
            for oneValueOneofs in oneofs  {
                output += "\(indent) oneofs[\(oneofsElementIndex)]: \(oneValueOneofs)\n"
                oneofsElementIndex += 1
            }
            var optionsElementIndex:Int = 0
            for oneElementOptions in options {
                output += "\(indent) options[\(optionsElementIndex)] {\n"
                output += try oneElementOptions.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                optionsElementIndex += 1
            }
            if hasSourceContext {
                output += "\(indent) sourceContext {\n"
                if let outDescSourceContext = sourceContext {
                    output += try outDescSourceContext.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasName {
                    hashCode = (hashCode &* 31) &+ name.hashValue
                }
                for oneElementFields in fields {
                    hashCode = (hashCode &* 31) &+ oneElementFields.hashValue
                }
                for oneValueOneofs in oneofs {
                    hashCode = (hashCode &* 31) &+ oneValueOneofs.hashValue
                }
                for oneElementOptions in options {
                    hashCode = (hashCode &* 31) &+ oneElementOptions.hashValue
                }
                if hasSourceContext {
                    if let hashValuesourceContext = sourceContext?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuesourceContext
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// The fully qualified message name.
            public var name:String {
                get {
                    return builderResult.name
                }
                set (value) {
                    builderResult.hasName = true
                    builderResult.name = value
                }
            }
            public var hasName:Bool {
                get {
                    return builderResult.hasName
                }
            }
            @discardableResult
            public func setName(_ value:String) -> Google.Protobuf.ProtoType.Builder {
                self.name = value
                return self
            }
            @discardableResult
            public func clearName() -> Google.Protobuf.ProtoType.Builder{
                builderResult.hasName = false
                builderResult.name = nil
                return self
            }
            /// The list of fields.
            public var fields:Array<Google.Protobuf.Field> {
                get {
                    return builderResult.fields
                }
                set (value) {
                    builderResult.fields = value
                }
            }
            @discardableResult
            public func setFields(_ value:Array<Google.Protobuf.Field>) -> Google.Protobuf.ProtoType.Builder {
                self.fields = value
                return self
            }
            @discardableResult
            public func clearFields() -> Google.Protobuf.ProtoType.Builder {
                builderResult.fields.removeAll(keepingCapacity: false)
                return self
            }
            /// The list of oneof definitions.
            /// The list of oneofs declared in this Type
            public var oneofs:Array<String> {
                get {
                    return builderResult.oneofs
                }
                set (array) {
                    builderResult.oneofs = array
                }
            }
            @discardableResult
            public func setOneofs(_ value:Array<String>) -> Google.Protobuf.ProtoType.Builder {
                self.oneofs = value
                return self
            }
            @discardableResult
            public func clearOneofs() -> Google.Protobuf.ProtoType.Builder {
                builderResult.oneofs.removeAll(keepingCapacity: false)
                return self
            }
            /// The proto options.
            public var options:Array<Google.Protobuf.Option> {
                get {
                    return builderResult.options
                }
                set (value) {
                    builderResult.options = value
                }
            }
            @discardableResult
            public func setOptions(_ value:Array<Google.Protobuf.Option>) -> Google.Protobuf.ProtoType.Builder {
                self.options = value
                return self
            }
            @discardableResult
            public func clearOptions() -> Google.Protobuf.ProtoType.Builder {
                builderResult.options.removeAll(keepingCapacity: false)
                return self
            }
            /// The source context.
            public var sourceContext:Google.Protobuf.SourceContext! {
                get {
                    if sourceContextBuilder_ != nil {
                        builderResult.sourceContext = sourceContextBuilder_.getMessage()
                    }
                    return builderResult.sourceContext
                }
                set (value) {
                    builderResult.hasSourceContext = value != nil
                    builderResult.sourceContext = value
                }
            }
            public var hasSourceContext:Bool {
                get {
                    return builderResult.hasSourceContext
                }
            }
            fileprivate var sourceContextBuilder_:Google.Protobuf.SourceContext.Builder! {
                didSet {
                    builderResult.hasSourceContext = true
                }
            }
            public func getSourceContextBuilder() -> Google.Protobuf.SourceContext.Builder {
                if sourceContextBuilder_ == nil {
                    sourceContextBuilder_ = Google.Protobuf.SourceContext.Builder()
                    builderResult.sourceContext = sourceContextBuilder_.getMessage()
                    if sourceContext != nil {
                        try! sourceContextBuilder_.mergeFrom(other: sourceContext)
                    }
                }
                return sourceContextBuilder_
            }
            @discardableResult
            public func setSourceContext(_ value:Google.Protobuf.SourceContext!) -> Google.Protobuf.ProtoType.Builder {
                self.sourceContext = value
                return self
            }
            @discardableResult
            public func mergeSourceContext(value:Google.Protobuf.SourceContext) throws -> Google.Protobuf.ProtoType.Builder {
                if builderResult.hasSourceContext {
                    builderResult.sourceContext = try Google.Protobuf.SourceContext.builderWithPrototype(prototype:builderResult.sourceContext).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.sourceContext = value
                }
                builderResult.hasSourceContext = true
                return self
            }
            @discardableResult
            public func clearSourceContext() -> Google.Protobuf.ProtoType.Builder {
                sourceContextBuilder_ = nil
                builderResult.hasSourceContext = false
                builderResult.sourceContext = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Google.Protobuf.ProtoType.Builder {
                builderResult = Google.Protobuf.ProtoType()
                return self
            }
            override public func clone() throws -> Google.Protobuf.ProtoType.Builder {
                return try Google.Protobuf.ProtoType.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Google.Protobuf.ProtoType {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Google.Protobuf.ProtoType {
                let returnMe:Google.Protobuf.ProtoType = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Google.Protobuf.ProtoType) throws -> Google.Protobuf.ProtoType.Builder {
                if other == Google.Protobuf.ProtoType() {
                    return self
                }
                if other.hasName {
                    name = other.name
                }
                if !other.fields.isEmpty  {
                     builderResult.fields += other.fields
                }
                if !other.oneofs.isEmpty {
                    builderResult.oneofs += other.oneofs
                }
                if !other.options.isEmpty  {
                     builderResult.options += other.options
                }
                if (other.hasSourceContext) {
                    try mergeSourceContext(value: other.sourceContext)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.ProtoType.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.ProtoType.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:
                        name = try codedInputStream.readString()

                    case 18:
                        let subBuilder = Google.Protobuf.Field.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        fields.append(subBuilder.buildPartial())

                    case 26:
                        oneofs += [try codedInputStream.readString()]

                    case 34:
                        let subBuilder = Google.Protobuf.Option.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        options.append(subBuilder.buildPartial())

                    case 42:
                        let subBuilder:Google.Protobuf.SourceContext.Builder = Google.Protobuf.SourceContext.Builder()
                        if hasSourceContext {
                            try subBuilder.mergeFrom(other: sourceContext)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        sourceContext = 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 -> Google.Protobuf.ProtoType.Builder {
                let resultDecodedBuilder = Google.Protobuf.ProtoType.Builder()
                if let jsonValueName = jsonMap["name"] as? String {
                    resultDecodedBuilder.name = jsonValueName
                }
                if let jsonValueFields = jsonMap["fields"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayFields:Array<Google.Protobuf.Field> = []
                    for oneValueFields in jsonValueFields {
                        let messageFromStringFields = try Google.Protobuf.Field.Builder.decodeToBuilder(jsonMap:oneValueFields).build()

                        jsonArrayFields.append(messageFromStringFields)
                    }
                    resultDecodedBuilder.fields = jsonArrayFields
                }
                if let jsonValueOneofs = jsonMap["oneofs"] as? Array<String> {
                    var jsonArrayOneofs:Array<String> = []
                    for oneValueOneofs in jsonValueOneofs {
                        jsonArrayOneofs.append(oneValueOneofs)
                    }
                    resultDecodedBuilder.oneofs = jsonArrayOneofs
                }
                if let jsonValueOptions = jsonMap["options"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayOptions:Array<Google.Protobuf.Option> = []
                    for oneValueOptions in jsonValueOptions {
                        let messageFromStringOptions = try Google.Protobuf.Option.Builder.decodeToBuilder(jsonMap:oneValueOptions).build()

                        jsonArrayOptions.append(messageFromStringOptions)
                    }
                    resultDecodedBuilder.options = jsonArrayOptions
                }
                if let jsonValueSourceContext = jsonMap["sourceContext"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.sourceContext = try Google.Protobuf.SourceContext.Builder.decodeToBuilder(jsonMap:jsonValueSourceContext).build()

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

    }

    /// Field represents a single field of a message type.
    final public class Field : GeneratedMessage {
        public typealias BuilderType = Google.Protobuf.Field.Builder

        public static func == (lhs: Google.Protobuf.Field, rhs: Google.Protobuf.Field) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasKind == rhs.hasKind) && (!lhs.hasKind || lhs.kind == rhs.kind)
            fieldCheck = fieldCheck && (lhs.hasCardinality == rhs.hasCardinality) && (!lhs.hasCardinality || lhs.cardinality == rhs.cardinality)
            fieldCheck = fieldCheck && (lhs.hasNumber == rhs.hasNumber) && (!lhs.hasNumber || lhs.number == rhs.number)
            fieldCheck = fieldCheck && (lhs.hasName == rhs.hasName) && (!lhs.hasName || lhs.name == rhs.name)
            fieldCheck = fieldCheck && (lhs.hasTypeUrl == rhs.hasTypeUrl) && (!lhs.hasTypeUrl || lhs.typeUrl == rhs.typeUrl)
            fieldCheck = fieldCheck && (lhs.hasOneofIndex == rhs.hasOneofIndex) && (!lhs.hasOneofIndex || lhs.oneofIndex == rhs.oneofIndex)
            fieldCheck = fieldCheck && (lhs.hasPacked == rhs.hasPacked) && (!lhs.hasPacked || lhs.packed == rhs.packed)
            fieldCheck = fieldCheck && (lhs.options == rhs.options)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



            //Enum type declaration start 

            /// Kind represents a basic field type.
            public enum Kind:Int32, GeneratedEnum {
                /// Field type unknown.
                case typeUnknown = 0

                /// Field type double.
                case typeDouble = 1

                /// Field type float.
                case typeFloat = 2

                /// Field type int64.
                case typeInt64 = 3

                /// Field type uint64.
                case typeUint64 = 4

                /// Field type int32.
                case typeInt32 = 5

                /// Field type fixed64.
                case typeFixed64 = 6

                /// Field type fixed32.
                case typeFixed32 = 7

                /// Field type bool.
                case typeBool = 8

                /// Field type string.
                case typeString = 9

                /// Field type message.
                case typeMessage = 11

                /// Field type bytes.
                case typeBytes = 12

                /// Field type uint32.
                case typeUint32 = 13

                /// Field type enum.
                case typeEnum = 14

                /// Field type sfixed32.
                case typeSfixed32 = 15

                /// Field type sfixed64.
                case typeSfixed64 = 16

                /// Field type sint32.
                case typeSint32 = 17

                /// Field type sint64.
                case typeSint64 = 18
                public func toString() -> String {
                    switch self {
                    case .typeUnknown: return "TYPE_UNKNOWN"
                    case .typeDouble: return "TYPE_DOUBLE"
                    case .typeFloat: return "TYPE_FLOAT"
                    case .typeInt64: return "TYPE_INT64"
                    case .typeUint64: return "TYPE_UINT64"
                    case .typeInt32: return "TYPE_INT32"
                    case .typeFixed64: return "TYPE_FIXED64"
                    case .typeFixed32: return "TYPE_FIXED32"
                    case .typeBool: return "TYPE_BOOL"
                    case .typeString: return "TYPE_STRING"
                    case .typeMessage: return "TYPE_MESSAGE"
                    case .typeBytes: return "TYPE_BYTES"
                    case .typeUint32: return "TYPE_UINT32"
                    case .typeEnum: return "TYPE_ENUM"
                    case .typeSfixed32: return "TYPE_SFIXED32"
                    case .typeSfixed64: return "TYPE_SFIXED64"
                    case .typeSint32: return "TYPE_SINT32"
                    case .typeSint64: return "TYPE_SINT64"
                    }
                }
                public static func fromString(_ str:String) throws -> Google.Protobuf.Field.Kind {
                    switch str {
                    case "TYPE_UNKNOWN":    return .typeUnknown
                    case "TYPE_DOUBLE":    return .typeDouble
                    case "TYPE_FLOAT":    return .typeFloat
                    case "TYPE_INT64":    return .typeInt64
                    case "TYPE_UINT64":    return .typeUint64
                    case "TYPE_INT32":    return .typeInt32
                    case "TYPE_FIXED64":    return .typeFixed64
                    case "TYPE_FIXED32":    return .typeFixed32
                    case "TYPE_BOOL":    return .typeBool
                    case "TYPE_STRING":    return .typeString
                    case "TYPE_MESSAGE":    return .typeMessage
                    case "TYPE_BYTES":    return .typeBytes
                    case "TYPE_UINT32":    return .typeUint32
                    case "TYPE_ENUM":    return .typeEnum
                    case "TYPE_SFIXED32":    return .typeSfixed32
                    case "TYPE_SFIXED64":    return .typeSfixed64
                    case "TYPE_SINT32":    return .typeSint32
                    case "TYPE_SINT64":    return .typeSint64
                    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 .typeUnknown: return ".typeUnknown"
                    case .typeDouble: return ".typeDouble"
                    case .typeFloat: return ".typeFloat"
                    case .typeInt64: return ".typeInt64"
                    case .typeUint64: return ".typeUint64"
                    case .typeInt32: return ".typeInt32"
                    case .typeFixed64: return ".typeFixed64"
                    case .typeFixed32: return ".typeFixed32"
                    case .typeBool: return ".typeBool"
                    case .typeString: return ".typeString"
                    case .typeMessage: return ".typeMessage"
                    case .typeBytes: return ".typeBytes"
                    case .typeUint32: return ".typeUint32"
                    case .typeEnum: return ".typeEnum"
                    case .typeSfixed32: return ".typeSfixed32"
                    case .typeSfixed64: return ".typeSfixed64"
                    case .typeSint32: return ".typeSint32"
                    case .typeSint64: return ".typeSint64"
                    }
                }
                public var hashValue:Int {
                    return self.rawValue.hashValue
                }
                public static func ==(lhs:Kind, rhs:Kind) -> Bool {
                    return lhs.hashValue == rhs.hashValue
                }
            }

            //Enum type declaration end 



            //Enum type declaration start 

            /// Cardinality represents whether a field is optional, required, or
            /// repeated.
            public enum Cardinality:Int32, GeneratedEnum {
                /// The field cardinality is unknown. Typically an error condition.
                case cardinalityUnknown = 0

                /// For optional fields.
                case cardinalityOptional = 1

                /// For required fields. Not used for proto3.
                case cardinalityRequired = 2

                /// For repeated fields.
                case cardinalityRepeated = 3
                public func toString() -> String {
                    switch self {
                    case .cardinalityUnknown: return "CARDINALITY_UNKNOWN"
                    case .cardinalityOptional: return "CARDINALITY_OPTIONAL"
                    case .cardinalityRequired: return "CARDINALITY_REQUIRED"
                    case .cardinalityRepeated: return "CARDINALITY_REPEATED"
                    }
                }
                public static func fromString(_ str:String) throws -> Google.Protobuf.Field.Cardinality {
                    switch str {
                    case "CARDINALITY_UNKNOWN":    return .cardinalityUnknown
                    case "CARDINALITY_OPTIONAL":    return .cardinalityOptional
                    case "CARDINALITY_REQUIRED":    return .cardinalityRequired
                    case "CARDINALITY_REPEATED":    return .cardinalityRepeated
                    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 .cardinalityUnknown: return ".cardinalityUnknown"
                    case .cardinalityOptional: return ".cardinalityOptional"
                    case .cardinalityRequired: return ".cardinalityRequired"
                    case .cardinalityRepeated: return ".cardinalityRepeated"
                    }
                }
                public var hashValue:Int {
                    return self.rawValue.hashValue
                }
                public static func ==(lhs:Cardinality, rhs:Cardinality) -> Bool {
                    return lhs.hashValue == rhs.hashValue
                }
            }

            //Enum type declaration end 

        public fileprivate(set) var kind:Google.Protobuf.Field.Kind = Google.Protobuf.Field.Kind.typeUnknown
        public fileprivate(set) var hasKind:Bool = false
        public fileprivate(set) var cardinality:Google.Protobuf.Field.Cardinality = Google.Protobuf.Field.Cardinality.cardinalityUnknown
        public fileprivate(set) var hasCardinality:Bool = false
        /// The proto field number.
        public fileprivate(set) var number:Int32! = nil
        public fileprivate(set) var hasNumber:Bool = false

        /// The field name.
        public fileprivate(set) var name:String! = nil
        public fileprivate(set) var hasName:Bool = false

        /// The type URL (without the scheme) when the type is MESSAGE or ENUM,
        /// such as `type.googleapis.com/google.protobuf.Empty`.
        public fileprivate(set) var typeUrl:String! = nil
        public fileprivate(set) var hasTypeUrl:Bool = false

        /// Index in Type.oneofs. Starts at 1. Zero means no oneof mapping.
        public fileprivate(set) var oneofIndex:Int32! = nil
        public fileprivate(set) var hasOneofIndex:Bool = false

        /// Whether to use alternative packed wire representation.
        public fileprivate(set) var packed:Bool! = nil
        public fileprivate(set) var hasPacked:Bool = false

        public fileprivate(set) var options:Array<Google.Protobuf.Option>  = Array<Google.Protobuf.Option>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasKind {
                try codedOutputStream.writeEnum(fieldNumber: 1, value:kind.rawValue)
            }
            if hasCardinality {
                try codedOutputStream.writeEnum(fieldNumber: 2, value:cardinality.rawValue)
            }
            if hasNumber {
                try codedOutputStream.writeInt32(fieldNumber: 3, value:number)
            }
            if hasName {
                try codedOutputStream.writeString(fieldNumber: 4, value:name)
            }
            if hasTypeUrl {
                try codedOutputStream.writeString(fieldNumber: 6, value:typeUrl)
            }
            if hasOneofIndex {
                try codedOutputStream.writeInt32(fieldNumber: 7, value:oneofIndex)
            }
            if hasPacked {
                try codedOutputStream.writeBool(fieldNumber: 8, value:packed)
            }
            for oneElementOptions in options {
                  try codedOutputStream.writeMessage(fieldNumber: 9, value:oneElementOptions)
            }
            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 (hasKind) {
                serialize_size += kind.rawValue.computeEnumSize(fieldNumber: 1)
            }
            if (hasCardinality) {
                serialize_size += cardinality.rawValue.computeEnumSize(fieldNumber: 2)
            }
            if hasNumber {
                serialize_size += number.computeInt32Size(fieldNumber: 3)
            }
            if hasName {
                serialize_size += name.computeStringSize(fieldNumber: 4)
            }
            if hasTypeUrl {
                serialize_size += typeUrl.computeStringSize(fieldNumber: 6)
            }
            if hasOneofIndex {
                serialize_size += oneofIndex.computeInt32Size(fieldNumber: 7)
            }
            if hasPacked {
                serialize_size += packed.computeBoolSize(fieldNumber: 8)
            }
            for oneElementOptions in options {
                serialize_size += oneElementOptions.computeMessageSize(fieldNumber: 9)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Google.Protobuf.Field.Builder {
            return Google.Protobuf.Field.classBuilder() as! Google.Protobuf.Field.Builder
        }
        public func getBuilder() -> Google.Protobuf.Field.Builder {
            return classBuilder() as! Google.Protobuf.Field.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.Field.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.Field.Builder()
        }
        public func toBuilder() throws -> Google.Protobuf.Field.Builder {
            return try Google.Protobuf.Field.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Google.Protobuf.Field) throws -> Google.Protobuf.Field.Builder {
            return try Google.Protobuf.Field.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasKind {
                jsonMap["kind"] = kind.toString()
            }
            if hasCardinality {
                jsonMap["cardinality"] = cardinality.toString()
            }
            if hasNumber {
                jsonMap["number"] = Int(number)
            }
            if hasName {
                jsonMap["name"] = name
            }
            if hasTypeUrl {
                jsonMap["typeUrl"] = typeUrl
            }
            if hasOneofIndex {
                jsonMap["oneofIndex"] = Int(oneofIndex)
            }
            if hasPacked {
                jsonMap["packed"] = packed
            }
            if !options.isEmpty {
                var jsonArrayOptions:Array<Dictionary<String,Any>> = []
                for oneValueOptions in options {
                    let ecodedMessageOptions = try oneValueOptions.encode()
                    jsonArrayOptions.append(ecodedMessageOptions)
                }
                jsonMap["options"] = jsonArrayOptions
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Google.Protobuf.Field {
            return try Google.Protobuf.Field.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Google.Protobuf.Field {
            return try Google.Protobuf.Field.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if (hasKind) {
                output += "\(indent) kind: \(kind.description)\n"
            }
            if (hasCardinality) {
                output += "\(indent) cardinality: \(cardinality.description)\n"
            }
            if hasNumber {
                output += "\(indent) number: \(String(describing: number)) \n"
            }
            if hasName {
                output += "\(indent) name: \(String(describing: name)) \n"
            }
            if hasTypeUrl {
                output += "\(indent) typeUrl: \(String(describing: typeUrl)) \n"
            }
            if hasOneofIndex {
                output += "\(indent) oneofIndex: \(String(describing: oneofIndex)) \n"
            }
            if hasPacked {
                output += "\(indent) packed: \(String(describing: packed)) \n"
            }
            var optionsElementIndex:Int = 0
            for oneElementOptions in options {
                output += "\(indent) options[\(optionsElementIndex)] {\n"
                output += try oneElementOptions.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                optionsElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasKind {
                     hashCode = (hashCode &* 31) &+ kind.hashValue
                }
                if hasCardinality {
                     hashCode = (hashCode &* 31) &+ cardinality.hashValue
                }
                if hasNumber {
                    hashCode = (hashCode &* 31) &+ number.hashValue
                }
                if hasName {
                    hashCode = (hashCode &* 31) &+ name.hashValue
                }
                if hasTypeUrl {
                    hashCode = (hashCode &* 31) &+ typeUrl.hashValue
                }
                if hasOneofIndex {
                    hashCode = (hashCode &* 31) &+ oneofIndex.hashValue
                }
                if hasPacked {
                    hashCode = (hashCode &* 31) &+ packed.hashValue
                }
                for oneElementOptions in options {
                    hashCode = (hashCode &* 31) &+ oneElementOptions.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// The field kind.
                public var kind:Google.Protobuf.Field.Kind {
                    get {
                        return builderResult.kind
                    }
                    set (value) {
                        builderResult.hasKind = true
                        builderResult.kind = value
                    }
                }
                public var hasKind:Bool{
                    get {
                        return builderResult.hasKind
                    }
                }
            @discardableResult
                public func setKind(_ value:Google.Protobuf.Field.Kind) -> Google.Protobuf.Field.Builder {
                  self.kind = value
                  return self
                }
            @discardableResult
                public func clearKind() -> Google.Protobuf.Field.Builder {
                   builderResult.hasKind = false
                   builderResult.kind = .typeUnknown
                   return self
                }
            /// The field cardinality, i.e. optional/required/repeated.
                public var cardinality:Google.Protobuf.Field.Cardinality {
                    get {
                        return builderResult.cardinality
                    }
                    set (value) {
                        builderResult.hasCardinality = true
                        builderResult.cardinality = value
                    }
                }
                public var hasCardinality:Bool{
                    get {
                        return builderResult.hasCardinality
                    }
                }
            @discardableResult
                public func setCardinality(_ value:Google.Protobuf.Field.Cardinality) -> Google.Protobuf.Field.Builder {
                  self.cardinality = value
                  return self
                }
            @discardableResult
                public func clearCardinality() -> Google.Protobuf.Field.Builder {
                   builderResult.hasCardinality = false
                   builderResult.cardinality = .cardinalityUnknown
                   return self
                }
            /// The proto field number.
            public var number:Int32 {
                get {
                    return builderResult.number
                }
                set (value) {
                    builderResult.hasNumber = true
                    builderResult.number = value
                }
            }
            public var hasNumber:Bool {
                get {
                    return builderResult.hasNumber
                }
            }
            @discardableResult
            public func setNumber(_ value:Int32) -> Google.Protobuf.Field.Builder {
                self.number = value
                return self
            }
            @discardableResult
            public func clearNumber() -> Google.Protobuf.Field.Builder{
                builderResult.hasNumber = false
                builderResult.number = nil
                return self
            }
            /// The field name.
            public var name:String {
                get {
                    return builderResult.name
                }
                set (value) {
                    builderResult.hasName = true
                    builderResult.name = value
                }
            }
            public var hasName:Bool {
                get {
                    return builderResult.hasName
                }
            }
            @discardableResult
            public func setName(_ value:String) -> Google.Protobuf.Field.Builder {
                self.name = value
                return self
            }
            @discardableResult
            public func clearName() -> Google.Protobuf.Field.Builder{
                builderResult.hasName = false
                builderResult.name = nil
                return self
            }
            /// The type URL (without the scheme) when the type is MESSAGE or ENUM,
            /// such as `type.googleapis.com/google.protobuf.Empty`.
            public var typeUrl:String {
                get {
                    return builderResult.typeUrl
                }
                set (value) {
                    builderResult.hasTypeUrl = true
                    builderResult.typeUrl = value
                }
            }
            public var hasTypeUrl:Bool {
                get {
                    return builderResult.hasTypeUrl
                }
            }
            @discardableResult
            public func setTypeUrl(_ value:String) -> Google.Protobuf.Field.Builder {
                self.typeUrl = value
                return self
            }
            @discardableResult
            public func clearTypeUrl() -> Google.Protobuf.Field.Builder{
                builderResult.hasTypeUrl = false
                builderResult.typeUrl = nil
                return self
            }
            /// Index in Type.oneofs. Starts at 1. Zero means no oneof mapping.
            public var oneofIndex:Int32 {
                get {
                    return builderResult.oneofIndex
                }
                set (value) {
                    builderResult.hasOneofIndex = true
                    builderResult.oneofIndex = value
                }
            }
            public var hasOneofIndex:Bool {
                get {
                    return builderResult.hasOneofIndex
                }
            }
            @discardableResult
            public func setOneofIndex(_ value:Int32) -> Google.Protobuf.Field.Builder {
                self.oneofIndex = value
                return self
            }
            @discardableResult
            public func clearOneofIndex() -> Google.Protobuf.Field.Builder{
                builderResult.hasOneofIndex = false
                builderResult.oneofIndex = nil
                return self
            }
            /// Whether to use alternative packed wire representation.
            public var packed:Bool {
                get {
                    return builderResult.packed
                }
                set (value) {
                    builderResult.hasPacked = true
                    builderResult.packed = value
                }
            }
            public var hasPacked:Bool {
                get {
                    return builderResult.hasPacked
                }
            }
            @discardableResult
            public func setPacked(_ value:Bool) -> Google.Protobuf.Field.Builder {
                self.packed = value
                return self
            }
            @discardableResult
            public func clearPacked() -> Google.Protobuf.Field.Builder{
                builderResult.hasPacked = false
                builderResult.packed = nil
                return self
            }
            /// The proto options.
            public var options:Array<Google.Protobuf.Option> {
                get {
                    return builderResult.options
                }
                set (value) {
                    builderResult.options = value
                }
            }
            @discardableResult
            public func setOptions(_ value:Array<Google.Protobuf.Option>) -> Google.Protobuf.Field.Builder {
                self.options = value
                return self
            }
            @discardableResult
            public func clearOptions() -> Google.Protobuf.Field.Builder {
                builderResult.options.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Google.Protobuf.Field.Builder {
                builderResult = Google.Protobuf.Field()
                return self
            }
            override public func clone() throws -> Google.Protobuf.Field.Builder {
                return try Google.Protobuf.Field.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Google.Protobuf.Field {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Google.Protobuf.Field {
                let returnMe:Google.Protobuf.Field = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Google.Protobuf.Field) throws -> Google.Protobuf.Field.Builder {
                if other == Google.Protobuf.Field() {
                    return self
                }
                if other.hasKind {
                    kind = other.kind
                }
                if other.hasCardinality {
                    cardinality = other.cardinality
                }
                if other.hasNumber {
                    number = other.number
                }
                if other.hasName {
                    name = other.name
                }
                if other.hasTypeUrl {
                    typeUrl = other.typeUrl
                }
                if other.hasOneofIndex {
                    oneofIndex = other.oneofIndex
                }
                if other.hasPacked {
                    packed = other.packed
                }
                if !other.options.isEmpty  {
                     builderResult.options += other.options
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Field.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Field.Builder {
                let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                while (true) {
                    let protobufTag = try codedInputStream.readTag()
                    switch protobufTag {
                    case 0: 
                        self.unknownFields = try unknownFieldsBuilder.build()
                        return self

                    case 8:
                        let valueIntkind = try codedInputStream.readEnum()
                        if let enumskind = Google.Protobuf.Field.Kind(rawValue:valueIntkind){
                            kind = enumskind
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 1, value:Int64(valueIntkind))
                        }

                    case 16:
                        let valueIntcardinality = try codedInputStream.readEnum()
                        if let enumscardinality = Google.Protobuf.Field.Cardinality(rawValue:valueIntcardinality){
                            cardinality = enumscardinality
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 2, value:Int64(valueIntcardinality))
                        }

                    case 24:
                        number = try codedInputStream.readInt32()

                    case 34:
                        name = try codedInputStream.readString()

                    case 50:
                        typeUrl = try codedInputStream.readString()

                    case 56:
                        oneofIndex = try codedInputStream.readInt32()

                    case 64:
                        packed = try codedInputStream.readBool()

                    case 74:
                        let subBuilder = Google.Protobuf.Option.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        options.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 -> Google.Protobuf.Field.Builder {
                let resultDecodedBuilder = Google.Protobuf.Field.Builder()
                if let jsonValueKind = jsonMap["kind"] as? String {
                    resultDecodedBuilder.kind = try Google.Protobuf.Field.Kind.fromString(jsonValueKind)
                }
                if let jsonValueCardinality = jsonMap["cardinality"] as? String {
                    resultDecodedBuilder.cardinality = try Google.Protobuf.Field.Cardinality.fromString(jsonValueCardinality)
                }
                if let jsonValueNumber = jsonMap["number"] as? Int {
                    resultDecodedBuilder.number = Int32(jsonValueNumber)
                } else if let jsonValueNumber = jsonMap["number"] as? String {
                    resultDecodedBuilder.number = Int32(jsonValueNumber)!
                }
                if let jsonValueName = jsonMap["name"] as? String {
                    resultDecodedBuilder.name = jsonValueName
                }
                if let jsonValueTypeUrl = jsonMap["typeUrl"] as? String {
                    resultDecodedBuilder.typeUrl = jsonValueTypeUrl
                }
                if let jsonValueOneofIndex = jsonMap["oneofIndex"] as? Int {
                    resultDecodedBuilder.oneofIndex = Int32(jsonValueOneofIndex)
                } else if let jsonValueOneofIndex = jsonMap["oneofIndex"] as? String {
                    resultDecodedBuilder.oneofIndex = Int32(jsonValueOneofIndex)!
                }
                if let jsonValuePacked = jsonMap["packed"] as? Bool {
                    resultDecodedBuilder.packed = jsonValuePacked
                }
                if let jsonValueOptions = jsonMap["options"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayOptions:Array<Google.Protobuf.Option> = []
                    for oneValueOptions in jsonValueOptions {
                        let messageFromStringOptions = try Google.Protobuf.Option.Builder.decodeToBuilder(jsonMap:oneValueOptions).build()

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

    }

    /// Enum type definition.
    final public class Enum : GeneratedMessage {
        public typealias BuilderType = Google.Protobuf.Enum.Builder

        public static func == (lhs: Google.Protobuf.Enum, rhs: Google.Protobuf.Enum) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasName == rhs.hasName) && (!lhs.hasName || lhs.name == rhs.name)
            fieldCheck = fieldCheck && (lhs.enumvalue == rhs.enumvalue)
            fieldCheck = fieldCheck && (lhs.options == rhs.options)
            fieldCheck = fieldCheck && (lhs.hasSourceContext == rhs.hasSourceContext) && (!lhs.hasSourceContext || lhs.sourceContext == rhs.sourceContext)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        /// Enum type name.
        public fileprivate(set) var name:String! = nil
        public fileprivate(set) var hasName:Bool = false

        public fileprivate(set) var enumvalue:Array<Google.Protobuf.EnumValue>  = Array<Google.Protobuf.EnumValue>()
        public fileprivate(set) var options:Array<Google.Protobuf.Option>  = Array<Google.Protobuf.Option>()
        public fileprivate(set) var sourceContext:Google.Protobuf.SourceContext!
        public fileprivate(set) var hasSourceContext:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasName {
                try codedOutputStream.writeString(fieldNumber: 1, value:name)
            }
            for oneElementEnumvalue in enumvalue {
                  try codedOutputStream.writeMessage(fieldNumber: 2, value:oneElementEnumvalue)
            }
            for oneElementOptions in options {
                  try codedOutputStream.writeMessage(fieldNumber: 3, value:oneElementOptions)
            }
            if hasSourceContext {
                try codedOutputStream.writeMessage(fieldNumber: 4, value:sourceContext)
            }
            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 hasName {
                serialize_size += name.computeStringSize(fieldNumber: 1)
            }
            for oneElementEnumvalue in enumvalue {
                serialize_size += oneElementEnumvalue.computeMessageSize(fieldNumber: 2)
            }
            for oneElementOptions in options {
                serialize_size += oneElementOptions.computeMessageSize(fieldNumber: 3)
            }
            if hasSourceContext {
                if let varSizesourceContext = sourceContext?.computeMessageSize(fieldNumber: 4) {
                    serialize_size += varSizesourceContext
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Google.Protobuf.Enum.Builder {
            return Google.Protobuf.Enum.classBuilder() as! Google.Protobuf.Enum.Builder
        }
        public func getBuilder() -> Google.Protobuf.Enum.Builder {
            return classBuilder() as! Google.Protobuf.Enum.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.Enum.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.Enum.Builder()
        }
        public func toBuilder() throws -> Google.Protobuf.Enum.Builder {
            return try Google.Protobuf.Enum.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Google.Protobuf.Enum) throws -> Google.Protobuf.Enum.Builder {
            return try Google.Protobuf.Enum.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasName {
                jsonMap["name"] = name
            }
            if !enumvalue.isEmpty {
                var jsonArrayEnumvalue:Array<Dictionary<String,Any>> = []
                for oneValueEnumvalue in enumvalue {
                    let ecodedMessageEnumvalue = try oneValueEnumvalue.encode()
                    jsonArrayEnumvalue.append(ecodedMessageEnumvalue)
                }
                jsonMap["enumvalue"] = jsonArrayEnumvalue
            }
            if !options.isEmpty {
                var jsonArrayOptions:Array<Dictionary<String,Any>> = []
                for oneValueOptions in options {
                    let ecodedMessageOptions = try oneValueOptions.encode()
                    jsonArrayOptions.append(ecodedMessageOptions)
                }
                jsonMap["options"] = jsonArrayOptions
            }
            if hasSourceContext {
                jsonMap["sourceContext"] = try sourceContext.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Google.Protobuf.Enum {
            return try Google.Protobuf.Enum.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Google.Protobuf.Enum {
            return try Google.Protobuf.Enum.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasName {
                output += "\(indent) name: \(String(describing: name)) \n"
            }
            var enumvalueElementIndex:Int = 0
            for oneElementEnumvalue in enumvalue {
                output += "\(indent) enumvalue[\(enumvalueElementIndex)] {\n"
                output += try oneElementEnumvalue.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                enumvalueElementIndex += 1
            }
            var optionsElementIndex:Int = 0
            for oneElementOptions in options {
                output += "\(indent) options[\(optionsElementIndex)] {\n"
                output += try oneElementOptions.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                optionsElementIndex += 1
            }
            if hasSourceContext {
                output += "\(indent) sourceContext {\n"
                if let outDescSourceContext = sourceContext {
                    output += try outDescSourceContext.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasName {
                    hashCode = (hashCode &* 31) &+ name.hashValue
                }
                for oneElementEnumvalue in enumvalue {
                    hashCode = (hashCode &* 31) &+ oneElementEnumvalue.hashValue
                }
                for oneElementOptions in options {
                    hashCode = (hashCode &* 31) &+ oneElementOptions.hashValue
                }
                if hasSourceContext {
                    if let hashValuesourceContext = sourceContext?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuesourceContext
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// Enum type name.
            public var name:String {
                get {
                    return builderResult.name
                }
                set (value) {
                    builderResult.hasName = true
                    builderResult.name = value
                }
            }
            public var hasName:Bool {
                get {
                    return builderResult.hasName
                }
            }
            @discardableResult
            public func setName(_ value:String) -> Google.Protobuf.Enum.Builder {
                self.name = value
                return self
            }
            @discardableResult
            public func clearName() -> Google.Protobuf.Enum.Builder{
                builderResult.hasName = false
                builderResult.name = nil
                return self
            }
            /// Enum value definitions.
            public var enumvalue:Array<Google.Protobuf.EnumValue> {
                get {
                    return builderResult.enumvalue
                }
                set (value) {
                    builderResult.enumvalue = value
                }
            }
            @discardableResult
            public func setEnumvalue(_ value:Array<Google.Protobuf.EnumValue>) -> Google.Protobuf.Enum.Builder {
                self.enumvalue = value
                return self
            }
            @discardableResult
            public func clearEnumvalue() -> Google.Protobuf.Enum.Builder {
                builderResult.enumvalue.removeAll(keepingCapacity: false)
                return self
            }
            /// Proto options for the enum type.
            public var options:Array<Google.Protobuf.Option> {
                get {
                    return builderResult.options
                }
                set (value) {
                    builderResult.options = value
                }
            }
            @discardableResult
            public func setOptions(_ value:Array<Google.Protobuf.Option>) -> Google.Protobuf.Enum.Builder {
                self.options = value
                return self
            }
            @discardableResult
            public func clearOptions() -> Google.Protobuf.Enum.Builder {
                builderResult.options.removeAll(keepingCapacity: false)
                return self
            }
            /// The source context.
            public var sourceContext:Google.Protobuf.SourceContext! {
                get {
                    if sourceContextBuilder_ != nil {
                        builderResult.sourceContext = sourceContextBuilder_.getMessage()
                    }
                    return builderResult.sourceContext
                }
                set (value) {
                    builderResult.hasSourceContext = value != nil
                    builderResult.sourceContext = value
                }
            }
            public var hasSourceContext:Bool {
                get {
                    return builderResult.hasSourceContext
                }
            }
            fileprivate var sourceContextBuilder_:Google.Protobuf.SourceContext.Builder! {
                didSet {
                    builderResult.hasSourceContext = true
                }
            }
            public func getSourceContextBuilder() -> Google.Protobuf.SourceContext.Builder {
                if sourceContextBuilder_ == nil {
                    sourceContextBuilder_ = Google.Protobuf.SourceContext.Builder()
                    builderResult.sourceContext = sourceContextBuilder_.getMessage()
                    if sourceContext != nil {
                        try! sourceContextBuilder_.mergeFrom(other: sourceContext)
                    }
                }
                return sourceContextBuilder_
            }
            @discardableResult
            public func setSourceContext(_ value:Google.Protobuf.SourceContext!) -> Google.Protobuf.Enum.Builder {
                self.sourceContext = value
                return self
            }
            @discardableResult
            public func mergeSourceContext(value:Google.Protobuf.SourceContext) throws -> Google.Protobuf.Enum.Builder {
                if builderResult.hasSourceContext {
                    builderResult.sourceContext = try Google.Protobuf.SourceContext.builderWithPrototype(prototype:builderResult.sourceContext).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.sourceContext = value
                }
                builderResult.hasSourceContext = true
                return self
            }
            @discardableResult
            public func clearSourceContext() -> Google.Protobuf.Enum.Builder {
                sourceContextBuilder_ = nil
                builderResult.hasSourceContext = false
                builderResult.sourceContext = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Google.Protobuf.Enum.Builder {
                builderResult = Google.Protobuf.Enum()
                return self
            }
            override public func clone() throws -> Google.Protobuf.Enum.Builder {
                return try Google.Protobuf.Enum.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Google.Protobuf.Enum {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Google.Protobuf.Enum {
                let returnMe:Google.Protobuf.Enum = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Google.Protobuf.Enum) throws -> Google.Protobuf.Enum.Builder {
                if other == Google.Protobuf.Enum() {
                    return self
                }
                if other.hasName {
                    name = other.name
                }
                if !other.enumvalue.isEmpty  {
                     builderResult.enumvalue += other.enumvalue
                }
                if !other.options.isEmpty  {
                     builderResult.options += other.options
                }
                if (other.hasSourceContext) {
                    try mergeSourceContext(value: other.sourceContext)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Enum.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Enum.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:
                        name = try codedInputStream.readString()

                    case 18:
                        let subBuilder = Google.Protobuf.EnumValue.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        enumvalue.append(subBuilder.buildPartial())

                    case 26:
                        let subBuilder = Google.Protobuf.Option.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        options.append(subBuilder.buildPartial())

                    case 34:
                        let subBuilder:Google.Protobuf.SourceContext.Builder = Google.Protobuf.SourceContext.Builder()
                        if hasSourceContext {
                            try subBuilder.mergeFrom(other: sourceContext)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        sourceContext = 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 -> Google.Protobuf.Enum.Builder {
                let resultDecodedBuilder = Google.Protobuf.Enum.Builder()
                if let jsonValueName = jsonMap["name"] as? String {
                    resultDecodedBuilder.name = jsonValueName
                }
                if let jsonValueEnumvalue = jsonMap["enumvalue"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayEnumvalue:Array<Google.Protobuf.EnumValue> = []
                    for oneValueEnumvalue in jsonValueEnumvalue {
                        let messageFromStringEnumvalue = try Google.Protobuf.EnumValue.Builder.decodeToBuilder(jsonMap:oneValueEnumvalue).build()

                        jsonArrayEnumvalue.append(messageFromStringEnumvalue)
                    }
                    resultDecodedBuilder.enumvalue = jsonArrayEnumvalue
                }
                if let jsonValueOptions = jsonMap["options"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayOptions:Array<Google.Protobuf.Option> = []
                    for oneValueOptions in jsonValueOptions {
                        let messageFromStringOptions = try Google.Protobuf.Option.Builder.decodeToBuilder(jsonMap:oneValueOptions).build()

                        jsonArrayOptions.append(messageFromStringOptions)
                    }
                    resultDecodedBuilder.options = jsonArrayOptions
                }
                if let jsonValueSourceContext = jsonMap["sourceContext"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.sourceContext = try Google.Protobuf.SourceContext.Builder.decodeToBuilder(jsonMap:jsonValueSourceContext).build()

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

    }

    /// Enum value definition.
    final public class EnumValue : GeneratedMessage {
        public typealias BuilderType = Google.Protobuf.EnumValue.Builder

        public static func == (lhs: Google.Protobuf.EnumValue, rhs: Google.Protobuf.EnumValue) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasName == rhs.hasName) && (!lhs.hasName || lhs.name == rhs.name)
            fieldCheck = fieldCheck && (lhs.hasNumber == rhs.hasNumber) && (!lhs.hasNumber || lhs.number == rhs.number)
            fieldCheck = fieldCheck && (lhs.options == rhs.options)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        /// Enum value name.
        public fileprivate(set) var name:String! = nil
        public fileprivate(set) var hasName:Bool = false

        /// Enum value number.
        public fileprivate(set) var number:Int32! = nil
        public fileprivate(set) var hasNumber:Bool = false

        public fileprivate(set) var options:Array<Google.Protobuf.Option>  = Array<Google.Protobuf.Option>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasName {
                try codedOutputStream.writeString(fieldNumber: 1, value:name)
            }
            if hasNumber {
                try codedOutputStream.writeInt32(fieldNumber: 2, value:number)
            }
            for oneElementOptions in options {
                  try codedOutputStream.writeMessage(fieldNumber: 3, value:oneElementOptions)
            }
            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 hasName {
                serialize_size += name.computeStringSize(fieldNumber: 1)
            }
            if hasNumber {
                serialize_size += number.computeInt32Size(fieldNumber: 2)
            }
            for oneElementOptions in options {
                serialize_size += oneElementOptions.computeMessageSize(fieldNumber: 3)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Google.Protobuf.EnumValue.Builder {
            return Google.Protobuf.EnumValue.classBuilder() as! Google.Protobuf.EnumValue.Builder
        }
        public func getBuilder() -> Google.Protobuf.EnumValue.Builder {
            return classBuilder() as! Google.Protobuf.EnumValue.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.EnumValue.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.EnumValue.Builder()
        }
        public func toBuilder() throws -> Google.Protobuf.EnumValue.Builder {
            return try Google.Protobuf.EnumValue.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Google.Protobuf.EnumValue) throws -> Google.Protobuf.EnumValue.Builder {
            return try Google.Protobuf.EnumValue.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasName {
                jsonMap["name"] = name
            }
            if hasNumber {
                jsonMap["number"] = Int(number)
            }
            if !options.isEmpty {
                var jsonArrayOptions:Array<Dictionary<String,Any>> = []
                for oneValueOptions in options {
                    let ecodedMessageOptions = try oneValueOptions.encode()
                    jsonArrayOptions.append(ecodedMessageOptions)
                }
                jsonMap["options"] = jsonArrayOptions
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Google.Protobuf.EnumValue {
            return try Google.Protobuf.EnumValue.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Google.Protobuf.EnumValue {
            return try Google.Protobuf.EnumValue.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasName {
                output += "\(indent) name: \(String(describing: name)) \n"
            }
            if hasNumber {
                output += "\(indent) number: \(String(describing: number)) \n"
            }
            var optionsElementIndex:Int = 0
            for oneElementOptions in options {
                output += "\(indent) options[\(optionsElementIndex)] {\n"
                output += try oneElementOptions.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                optionsElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasName {
                    hashCode = (hashCode &* 31) &+ name.hashValue
                }
                if hasNumber {
                    hashCode = (hashCode &* 31) &+ number.hashValue
                }
                for oneElementOptions in options {
                    hashCode = (hashCode &* 31) &+ oneElementOptions.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// Enum value name.
            public var name:String {
                get {
                    return builderResult.name
                }
                set (value) {
                    builderResult.hasName = true
                    builderResult.name = value
                }
            }
            public var hasName:Bool {
                get {
                    return builderResult.hasName
                }
            }
            @discardableResult
            public func setName(_ value:String) -> Google.Protobuf.EnumValue.Builder {
                self.name = value
                return self
            }
            @discardableResult
            public func clearName() -> Google.Protobuf.EnumValue.Builder{
                builderResult.hasName = false
                builderResult.name = nil
                return self
            }
            /// Enum value number.
            public var number:Int32 {
                get {
                    return builderResult.number
                }
                set (value) {
                    builderResult.hasNumber = true
                    builderResult.number = value
                }
            }
            public var hasNumber:Bool {
                get {
                    return builderResult.hasNumber
                }
            }
            @discardableResult
            public func setNumber(_ value:Int32) -> Google.Protobuf.EnumValue.Builder {
                self.number = value
                return self
            }
            @discardableResult
            public func clearNumber() -> Google.Protobuf.EnumValue.Builder{
                builderResult.hasNumber = false
                builderResult.number = nil
                return self
            }
            /// Proto options for the enum value.
            public var options:Array<Google.Protobuf.Option> {
                get {
                    return builderResult.options
                }
                set (value) {
                    builderResult.options = value
                }
            }
            @discardableResult
            public func setOptions(_ value:Array<Google.Protobuf.Option>) -> Google.Protobuf.EnumValue.Builder {
                self.options = value
                return self
            }
            @discardableResult
            public func clearOptions() -> Google.Protobuf.EnumValue.Builder {
                builderResult.options.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Google.Protobuf.EnumValue.Builder {
                builderResult = Google.Protobuf.EnumValue()
                return self
            }
            override public func clone() throws -> Google.Protobuf.EnumValue.Builder {
                return try Google.Protobuf.EnumValue.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Google.Protobuf.EnumValue {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Google.Protobuf.EnumValue {
                let returnMe:Google.Protobuf.EnumValue = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Google.Protobuf.EnumValue) throws -> Google.Protobuf.EnumValue.Builder {
                if other == Google.Protobuf.EnumValue() {
                    return self
                }
                if other.hasName {
                    name = other.name
                }
                if other.hasNumber {
                    number = other.number
                }
                if !other.options.isEmpty  {
                     builderResult.options += other.options
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.EnumValue.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.EnumValue.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:
                        name = try codedInputStream.readString()

                    case 16:
                        number = try codedInputStream.readInt32()

                    case 26:
                        let subBuilder = Google.Protobuf.Option.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        options.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 -> Google.Protobuf.EnumValue.Builder {
                let resultDecodedBuilder = Google.Protobuf.EnumValue.Builder()
                if let jsonValueName = jsonMap["name"] as? String {
                    resultDecodedBuilder.name = jsonValueName
                }
                if let jsonValueNumber = jsonMap["number"] as? Int {
                    resultDecodedBuilder.number = Int32(jsonValueNumber)
                } else if let jsonValueNumber = jsonMap["number"] as? String {
                    resultDecodedBuilder.number = Int32(jsonValueNumber)!
                }
                if let jsonValueOptions = jsonMap["options"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayOptions:Array<Google.Protobuf.Option> = []
                    for oneValueOptions in jsonValueOptions {
                        let messageFromStringOptions = try Google.Protobuf.Option.Builder.decodeToBuilder(jsonMap:oneValueOptions).build()

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

    }

    /// Proto option attached to messages/fields/enums etc.
    final public class Option : GeneratedMessage {
        public typealias BuilderType = Google.Protobuf.Option.Builder

        public static func == (lhs: Google.Protobuf.Option, rhs: Google.Protobuf.Option) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasName == rhs.hasName) && (!lhs.hasName || lhs.name == rhs.name)
            fieldCheck = fieldCheck && (lhs.hasValue == rhs.hasValue) && (!lhs.hasValue || lhs.value == rhs.value)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }

        /// Proto option name.
        public fileprivate(set) var name:String! = nil
        public fileprivate(set) var hasName:Bool = false

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


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// Proto option name.
            public var name:String {
                get {
                    return builderResult.name
                }
                set (value) {
                    builderResult.hasName = true
                    builderResult.name = value
                }
            }
            public var hasName:Bool {
                get {
                    return builderResult.hasName
                }
            }
            @discardableResult
            public func setName(_ value:String) -> Google.Protobuf.Option.Builder {
                self.name = value
                return self
            }
            @discardableResult
            public func clearName() -> Google.Protobuf.Option.Builder{
                builderResult.hasName = false
                builderResult.name = nil
                return self
            }
            /// Proto option value.
            public var value:Google.Protobuf.`Any`! {
                get {
                    if valueBuilder_ != nil {
                        builderResult.value = valueBuilder_.getMessage()
                    }
                    return builderResult.value
                }
                set (value) {
                    builderResult.hasValue = value != nil
                    builderResult.value = value
                }
            }
            public var hasValue:Bool {
                get {
                    return builderResult.hasValue
                }
            }
            fileprivate var valueBuilder_:Google.Protobuf.`Any`.Builder! {
                didSet {
                    builderResult.hasValue = true
                }
            }
            public func getValueBuilder() -> Google.Protobuf.`Any`.Builder {
                if valueBuilder_ == nil {
                    valueBuilder_ = Google.Protobuf.`Any`.Builder()
                    builderResult.value = valueBuilder_.getMessage()
                    if value != nil {
                        try! valueBuilder_.mergeFrom(other: value)
                    }
                }
                return valueBuilder_
            }
            @discardableResult
            public func setValue(_ value:Google.Protobuf.`Any`!) -> Google.Protobuf.Option.Builder {
                self.value = value
                return self
            }
            @discardableResult
            public func mergeValue(value:Google.Protobuf.`Any`) throws -> Google.Protobuf.Option.Builder {
                if builderResult.hasValue {
                    builderResult.value = try Google.Protobuf.`Any`.builderWithPrototype(prototype:builderResult.value).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.value = value
                }
                builderResult.hasValue = true
                return self
            }
            @discardableResult
            public func clearValue() -> Google.Protobuf.Option.Builder {
                valueBuilder_ = nil
                builderResult.hasValue = false
                builderResult.value = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Google.Protobuf.Option.Builder {
                builderResult = Google.Protobuf.Option()
                return self
            }
            override public func clone() throws -> Google.Protobuf.Option.Builder {
                return try Google.Protobuf.Option.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Google.Protobuf.Option {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Google.Protobuf.Option {
                let returnMe:Google.Protobuf.Option = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Google.Protobuf.Option) throws -> Google.Protobuf.Option.Builder {
                if other == Google.Protobuf.Option() {
                    return self
                }
                if other.hasName {
                    name = other.name
                }
                if (other.hasValue) {
                    try mergeValue(value: other.value)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Option.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Option.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:
                        name = try codedInputStream.readString()

                    case 18:
                        let subBuilder:Google.Protobuf.`Any`.Builder = Google.Protobuf.`Any`.Builder()
                        if hasValue {
                            try subBuilder.mergeFrom(other: value)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        value = 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 -> Google.Protobuf.Option.Builder {
                let resultDecodedBuilder = Google.Protobuf.Option.Builder()
                if let jsonValueName = jsonMap["name"] as? String {
                    resultDecodedBuilder.name = jsonValueName
                }
                if let jsonValueValue = jsonMap["value"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.value = try Google.Protobuf.`Any`.Builder.decodeToBuilder(jsonMap:jsonValueValue).build()

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

    }

}
extension Google.Protobuf.ProtoType: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Google.Protobuf.ProtoType> {
        var mergedArray = Array<Google.Protobuf.ProtoType>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Google.Protobuf.ProtoType? {
        return try Google.Protobuf.ProtoType.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Google.Protobuf.ProtoType {
        return try Google.Protobuf.ProtoType.Builder().mergeFrom(data: data, extensionRegistry:Google.Protobuf.TypeRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.ProtoType {
        return try Google.Protobuf.ProtoType.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Google.Protobuf.ProtoType {
        return try Google.Protobuf.ProtoType.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.ProtoType {
        return try Google.Protobuf.ProtoType.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.ProtoType {
        return try Google.Protobuf.ProtoType.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.ProtoType {
        return try Google.Protobuf.ProtoType.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "name": return self.name
        case "fields": return self.fields
        case "oneofs": return self.oneofs
        case "options": return self.options
        case "sourceContext": return self.sourceContext
        default: return nil
        }
    }
}
extension Google.Protobuf.ProtoType.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Google.Protobuf.ProtoType
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "name": return self.name
            case "fields": return self.fields
            case "oneofs": return self.oneofs
            case "options": return self.options
            case "sourceContext": return self.sourceContext
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "name":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.name = newSubscriptValue
            case "fields":
                guard let newSubscriptValue = newSubscriptValue as? Array<Google.Protobuf.Field> else {
                    return
                }
                self.fields = newSubscriptValue
            case "oneofs":
                guard let newSubscriptValue = newSubscriptValue as? Array<String> else {
                    return
                }
                self.oneofs = newSubscriptValue
            case "options":
                guard let newSubscriptValue = newSubscriptValue as? Array<Google.Protobuf.Option> else {
                    return
                }
                self.options = newSubscriptValue
            case "sourceContext":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.SourceContext else {
                    return
                }
                self.sourceContext = newSubscriptValue
            default: return
            }
        }
    }
}
extension Google.Protobuf.Field: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Google.Protobuf.Field> {
        var mergedArray = Array<Google.Protobuf.Field>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Google.Protobuf.Field? {
        return try Google.Protobuf.Field.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Google.Protobuf.Field {
        return try Google.Protobuf.Field.Builder().mergeFrom(data: data, extensionRegistry:Google.Protobuf.TypeRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Field {
        return try Google.Protobuf.Field.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Google.Protobuf.Field {
        return try Google.Protobuf.Field.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Field {
        return try Google.Protobuf.Field.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Field {
        return try Google.Protobuf.Field.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Field {
        return try Google.Protobuf.Field.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "kind": return self.kind
        case "cardinality": return self.cardinality
        case "number": return self.number
        case "name": return self.name
        case "typeUrl": return self.typeUrl
        case "oneofIndex": return self.oneofIndex
        case "packed": return self.packed
        case "options": return self.options
        default: return nil
        }
    }
}
extension Google.Protobuf.Field.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Google.Protobuf.Field
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "kind": return self.kind
            case "cardinality": return self.cardinality
            case "number": return self.number
            case "name": return self.name
            case "typeUrl": return self.typeUrl
            case "oneofIndex": return self.oneofIndex
            case "packed": return self.packed
            case "options": return self.options
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "kind":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.Field.Kind else {
                    return
                }
                self.kind = newSubscriptValue
            case "cardinality":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.Field.Cardinality else {
                    return
                }
                self.cardinality = newSubscriptValue
            case "number":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.number = newSubscriptValue
            case "name":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.name = newSubscriptValue
            case "typeUrl":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.typeUrl = newSubscriptValue
            case "oneofIndex":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.oneofIndex = newSubscriptValue
            case "packed":
                guard let newSubscriptValue = newSubscriptValue as? Bool else {
                    return
                }
                self.packed = newSubscriptValue
            case "options":
                guard let newSubscriptValue = newSubscriptValue as? Array<Google.Protobuf.Option> else {
                    return
                }
                self.options = newSubscriptValue
            default: return
            }
        }
    }
}
extension Google.Protobuf.Enum: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Google.Protobuf.Enum> {
        var mergedArray = Array<Google.Protobuf.Enum>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Google.Protobuf.Enum? {
        return try Google.Protobuf.Enum.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Google.Protobuf.Enum {
        return try Google.Protobuf.Enum.Builder().mergeFrom(data: data, extensionRegistry:Google.Protobuf.TypeRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Enum {
        return try Google.Protobuf.Enum.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Google.Protobuf.Enum {
        return try Google.Protobuf.Enum.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Enum {
        return try Google.Protobuf.Enum.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Enum {
        return try Google.Protobuf.Enum.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Enum {
        return try Google.Protobuf.Enum.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "name": return self.name
        case "enumvalue": return self.enumvalue
        case "options": return self.options
        case "sourceContext": return self.sourceContext
        default: return nil
        }
    }
}
extension Google.Protobuf.Enum.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Google.Protobuf.Enum
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "name": return self.name
            case "enumvalue": return self.enumvalue
            case "options": return self.options
            case "sourceContext": return self.sourceContext
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "name":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.name = newSubscriptValue
            case "enumvalue":
                guard let newSubscriptValue = newSubscriptValue as? Array<Google.Protobuf.EnumValue> else {
                    return
                }
                self.enumvalue = newSubscriptValue
            case "options":
                guard let newSubscriptValue = newSubscriptValue as? Array<Google.Protobuf.Option> else {
                    return
                }
                self.options = newSubscriptValue
            case "sourceContext":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.SourceContext else {
                    return
                }
                self.sourceContext = newSubscriptValue
            default: return
            }
        }
    }
}
extension Google.Protobuf.EnumValue: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Google.Protobuf.EnumValue> {
        var mergedArray = Array<Google.Protobuf.EnumValue>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Google.Protobuf.EnumValue? {
        return try Google.Protobuf.EnumValue.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Google.Protobuf.EnumValue {
        return try Google.Protobuf.EnumValue.Builder().mergeFrom(data: data, extensionRegistry:Google.Protobuf.TypeRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.EnumValue {
        return try Google.Protobuf.EnumValue.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Google.Protobuf.EnumValue {
        return try Google.Protobuf.EnumValue.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.EnumValue {
        return try Google.Protobuf.EnumValue.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.EnumValue {
        return try Google.Protobuf.EnumValue.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.EnumValue {
        return try Google.Protobuf.EnumValue.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "name": return self.name
        case "number": return self.number
        case "options": return self.options
        default: return nil
        }
    }
}
extension Google.Protobuf.EnumValue.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Google.Protobuf.EnumValue
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "name": return self.name
            case "number": return self.number
            case "options": return self.options
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "name":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.name = newSubscriptValue
            case "number":
                guard let newSubscriptValue = newSubscriptValue as? Int32 else {
                    return
                }
                self.number = newSubscriptValue
            case "options":
                guard let newSubscriptValue = newSubscriptValue as? Array<Google.Protobuf.Option> else {
                    return
                }
                self.options = newSubscriptValue
            default: return
            }
        }
    }
}
extension Google.Protobuf.Option: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Google.Protobuf.Option> {
        var mergedArray = Array<Google.Protobuf.Option>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Google.Protobuf.Option? {
        return try Google.Protobuf.Option.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Google.Protobuf.Option {
        return try Google.Protobuf.Option.Builder().mergeFrom(data: data, extensionRegistry:Google.Protobuf.TypeRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Option {
        return try Google.Protobuf.Option.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Google.Protobuf.Option {
        return try Google.Protobuf.Option.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Option {
        return try Google.Protobuf.Option.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Option {
        return try Google.Protobuf.Option.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Option {
        return try Google.Protobuf.Option.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "name": return self.name
        case "value": return self.value
        default: return nil
        }
    }
}
extension Google.Protobuf.Option.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Google.Protobuf.Option
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "name": return self.name
            case "value": return self.value
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "name":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.name = newSubscriptValue
            case "value":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.`Any` else {
                    return
                }
                self.value = newSubscriptValue
            default: return
            }
        }
    }
}

// @@protoc_insertion_point(global_scope)
