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

import Foundation

public extension Google.Protobuf{}

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

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



    //Enum type declaration start 

    /// `NullValue` is a singleton enumeration to represent the null
    /// value for the `Value` type union.
    public enum NullValue:Int32, GeneratedEnum {
        /// Null value.
        case `NullValue` = 0
        public func toString() -> String {
            switch self {
            case .`NullValue`: return "NULL_VALUE"
            }
        }
        public static func fromString(_ str:String) throws -> Google.Protobuf.NullValue {
            switch str {
            case "NULL_VALUE":    return .`NullValue`
            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 .`NullValue`: return ".`NullValue`"
            }
        }
        public var hashValue:Int {
            return self.rawValue.hashValue
        }
        public static func ==(lhs:NullValue, rhs:NullValue) -> Bool {
            return lhs.hashValue == rhs.hashValue
        }
    }

    //Enum type declaration end 

    /// `Struct` represents a structured data value, consisting of fields
    /// which map to dynamically typed values. In some languages, `Struct`
    /// might be supported by a native representation. For example, in
    /// scripting languages like JS a struct is represented as an
    /// object. The details of that representation are described together
    /// with the proto support for the language.
    final public class Struct : GeneratedMessage {
        public typealias BuilderType = Google.Protobuf.Struct.Builder

        public static func == (lhs: Google.Protobuf.Struct, rhs: Google.Protobuf.Struct) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasFields == rhs.hasFields) && (!lhs.hasFields || lhs.fields == rhs.fields)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //Nested type declaration start

        final public class FieldsEntry : GeneratedMessage {
            public typealias BuilderType = Google.Protobuf.Struct.FieldsEntry.Builder

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

            public fileprivate(set) var key:String! = nil
            public fileprivate(set) var hasKey:Bool = false

            public fileprivate(set) var value:Google.Protobuf.Value!
            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 hasKey {
                    try codedOutputStream.writeString(fieldNumber: 1, value:key)
                }
                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 hasKey {
                    serialize_size += key.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.Struct.FieldsEntry.Builder {
                return Google.Protobuf.Struct.FieldsEntry.classBuilder() as! Google.Protobuf.Struct.FieldsEntry.Builder
            }
            public func getBuilder() -> Google.Protobuf.Struct.FieldsEntry.Builder {
                return classBuilder() as! Google.Protobuf.Struct.FieldsEntry.Builder
            }
            override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
                return Google.Protobuf.Struct.FieldsEntry.Builder()
            }
            override public func classBuilder() -> ProtocolBuffersMessageBuilder {
                return Google.Protobuf.Struct.FieldsEntry.Builder()
            }
            public func toBuilder() throws -> Google.Protobuf.Struct.FieldsEntry.Builder {
                return try Google.Protobuf.Struct.FieldsEntry.builderWithPrototype(prototype:self)
            }
            public class func builderWithPrototype(prototype:Google.Protobuf.Struct.FieldsEntry) throws -> Google.Protobuf.Struct.FieldsEntry.Builder {
                return try Google.Protobuf.Struct.FieldsEntry.Builder().mergeFrom(other:prototype)
            }
            override public func encode() throws -> Dictionary<String,Any> {
                try isInitialized()
                var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
                if hasKey {
                    jsonMap["key"] = key
                }
                if hasValue {
                    jsonMap["value"] = try value.encode()
                }
                return jsonMap
            }
            override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Google.Protobuf.Struct.FieldsEntry {
                return try Google.Protobuf.Struct.FieldsEntry.Builder.decodeToBuilder(jsonMap:jsonMap).build()
            }
            override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Google.Protobuf.Struct.FieldsEntry {
                return try Google.Protobuf.Struct.FieldsEntry.Builder.fromJSONToBuilder(data:data, options:options).build()
            }
            override public func getDescription(indent:String) throws -> String {
                var output = ""
                if hasKey {
                    output += "\(indent) key: \(String(describing: key)) \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 hasKey {
                        hashCode = (hashCode &* 31) &+ key.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.Struct.FieldsEntry"
            }
            override public func className() -> String {
                return "Google.Protobuf.Struct.FieldsEntry"
            }
            //Meta information declaration end

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

                required override public init () {
                    super.init()
                }
                public var key:String {
                    get {
                        return builderResult.key
                    }
                    set (value) {
                        builderResult.hasKey = true
                        builderResult.key = value
                    }
                }
                public var hasKey:Bool {
                    get {
                        return builderResult.hasKey
                    }
                }
                @discardableResult
                public func setKey(_ value:String) -> Google.Protobuf.Struct.FieldsEntry.Builder {
                    self.key = value
                    return self
                }
                @discardableResult
                public func clearKey() -> Google.Protobuf.Struct.FieldsEntry.Builder{
                    builderResult.hasKey = false
                    builderResult.key = nil
                    return self
                }
                public var value:Google.Protobuf.Value! {
                    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.Value.Builder! {
                    didSet {
                        builderResult.hasValue = true
                    }
                }
                public func getValueBuilder() -> Google.Protobuf.Value.Builder {
                    if valueBuilder_ == nil {
                        valueBuilder_ = Google.Protobuf.Value.Builder()
                        builderResult.value = valueBuilder_.getMessage()
                        if value != nil {
                            try! valueBuilder_.mergeFrom(other: value)
                        }
                    }
                    return valueBuilder_
                }
                @discardableResult
                public func setValue(_ value:Google.Protobuf.Value!) -> Google.Protobuf.Struct.FieldsEntry.Builder {
                    self.value = value
                    return self
                }
                @discardableResult
                public func mergeValue(value:Google.Protobuf.Value) throws -> Google.Protobuf.Struct.FieldsEntry.Builder {
                    if builderResult.hasValue {
                        builderResult.value = try Google.Protobuf.Value.builderWithPrototype(prototype:builderResult.value).mergeFrom(other: value).buildPartial()
                    } else {
                        builderResult.value = value
                    }
                    builderResult.hasValue = true
                    return self
                }
                @discardableResult
                public func clearValue() -> Google.Protobuf.Struct.FieldsEntry.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.Struct.FieldsEntry.Builder {
                    builderResult = Google.Protobuf.Struct.FieldsEntry()
                    return self
                }
                override public func clone() throws -> Google.Protobuf.Struct.FieldsEntry.Builder {
                    return try Google.Protobuf.Struct.FieldsEntry.builderWithPrototype(prototype:builderResult)
                }
                override public func build() throws -> Google.Protobuf.Struct.FieldsEntry {
                    try checkInitialized()
                    return buildPartial()
                }
                public func buildPartial() -> Google.Protobuf.Struct.FieldsEntry {
                    let returnMe:Google.Protobuf.Struct.FieldsEntry = builderResult
                    return returnMe
                }
                @discardableResult
                public func mergeFrom(other:Google.Protobuf.Struct.FieldsEntry) throws -> Google.Protobuf.Struct.FieldsEntry.Builder {
                    if other == Google.Protobuf.Struct.FieldsEntry() {
                        return self
                    }
                    if other.hasKey {
                        key = other.key
                    }
                    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.Struct.FieldsEntry.Builder {
                    return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
                }
                @discardableResult
                override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Struct.FieldsEntry.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:
                            key = try codedInputStream.readString()

                        case 18:
                            let subBuilder:Google.Protobuf.Value.Builder = Google.Protobuf.Value.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.Struct.FieldsEntry.Builder {
                    let resultDecodedBuilder = Google.Protobuf.Struct.FieldsEntry.Builder()
                    if let jsonValueKey = jsonMap["key"] as? String {
                        resultDecodedBuilder.key = jsonValueKey
                    }
                    if let jsonValueValue = jsonMap["value"] as? Dictionary<String,Any> {
                        resultDecodedBuilder.value = try Google.Protobuf.Value.Builder.decodeToBuilder(jsonMap:jsonValueValue).build()

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

        }

        //Nested type declaration end

        /// Map of dynamically typed values.
        public fileprivate(set) var fields:Dictionary<String,Google.Protobuf.Value> = Dictionary<String,Google.Protobuf.Value>()

        public fileprivate(set) var hasFields:Bool = false
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasFields {
                for (keyFields, valueFields) in fields {
                    let valueOfFields = try! Google.Protobuf.Struct.FieldsEntry.Builder().setKey(keyFields).setValue(valueFields).build()
                      try codedOutputStream.writeMessage(fieldNumber: 1, value:valueOfFields)
                  }
            }
            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 hasFields {
                  for (keyFields, valueFields) in fields {
                      let valueOfFields = try! Google.Protobuf.Struct.FieldsEntry.Builder().setKey(keyFields).setValue(valueFields).build()
                serialize_size += valueOfFields.computeMessageSize(fieldNumber: 1)
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Google.Protobuf.Struct.Builder {
            return Google.Protobuf.Struct.classBuilder() as! Google.Protobuf.Struct.Builder
        }
        public func getBuilder() -> Google.Protobuf.Struct.Builder {
            return classBuilder() as! Google.Protobuf.Struct.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.Struct.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.Struct.Builder()
        }
        public func toBuilder() throws -> Google.Protobuf.Struct.Builder {
            return try Google.Protobuf.Struct.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Google.Protobuf.Struct) throws -> Google.Protobuf.Struct.Builder {
            return try Google.Protobuf.Struct.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasFields {
                var mapFields = Dictionary<String, Dictionary<String,Any>>()
                for (keyFields, valueFields) in fields {
                    mapFields["\(keyFields)"] = try valueFields.encode()
                }
                jsonMap["fields"] = mapFields
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Google.Protobuf.Struct {
            return try Google.Protobuf.Struct.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Google.Protobuf.Struct {
            return try Google.Protobuf.Struct.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if hasFields {
                output += "\(indent) fields: \(fields) \n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasFields {
                    for (keyFields, valueFields) in fields {
                        hashCode = (hashCode &* 31) &+ keyFields.hashValue
                        hashCode = (hashCode &* 31) &+ valueFields.hashValue
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// Map of dynamically typed values.
            public var hasFields:Bool {
                get {
                    return builderResult.hasFields
                }
            }
            public var fields:Dictionary<String,Google.Protobuf.Value> {
                get {
                    return builderResult.fields
                }
                set (value) {
                    builderResult.hasFields = true
                    builderResult.fields = value
                }
            }
            @discardableResult
            public func setFields(_ value:Dictionary<String,Google.Protobuf.Value>) -> Google.Protobuf.Struct.Builder {
                self.fields = value
                return self
            }
            @discardableResult
            public func clearFields() -> Google.Protobuf.Struct.Builder{
                builderResult.hasFields = false
                builderResult.fields = Dictionary<String,Google.Protobuf.Value>()
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Google.Protobuf.Struct.Builder {
                builderResult = Google.Protobuf.Struct()
                return self
            }
            override public func clone() throws -> Google.Protobuf.Struct.Builder {
                return try Google.Protobuf.Struct.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Google.Protobuf.Struct {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Google.Protobuf.Struct {
                let returnMe:Google.Protobuf.Struct = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Google.Protobuf.Struct) throws -> Google.Protobuf.Struct.Builder {
                if other == Google.Protobuf.Struct() {
                    return self
                }
                if other.hasFields {
                    fields = other.fields
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Struct.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Struct.Builder {
                let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                while (true) {
                    let protobufTag = try codedInputStream.readTag()
                    switch protobufTag {
                    case 0: 
                        self.unknownFields = try unknownFieldsBuilder.build()
                        return self

                    case 10:
                        let subBuilder = Google.Protobuf.Struct.FieldsEntry.Builder()
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        let buildOfFields = subBuilder.buildPartial()
                        fields[buildOfFields.key] = buildOfFields.value

                    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.Struct.Builder {
                let resultDecodedBuilder = Google.Protobuf.Struct.Builder()
                if let jsonValueFields = jsonMap["fields"] as? Dictionary<String, Dictionary<String,Any>> {
                    var mapFields = Dictionary<String, Google.Protobuf.Value>()
                    for (keyFields, valueFields) in jsonValueFields {
                        mapFields[keyFields] = try Google.Protobuf.Value.Builder.decodeToBuilder(jsonMap:valueFields).build()

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

    }

    /// `Value` represents a dynamically typed value which can be either
    /// null, a number, a string, a boolean, a recursive struct value, or a
    /// list of values. A producer of value is expected to set one of that
    /// variants, absence of any variant indicates an error.
    final public class Value : GeneratedMessage {
        public typealias BuilderType = Google.Protobuf.Value.Builder

        public static func == (lhs: Google.Protobuf.Value, rhs: Google.Protobuf.Value) -> Bool {
            if lhs === rhs {
                return true
            }
            var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
            fieldCheck = fieldCheck && (lhs.hasNullValue == rhs.hasNullValue) && (!lhs.hasNullValue || lhs.nullValue == rhs.nullValue)
            fieldCheck = fieldCheck && (lhs.hasNumberValue == rhs.hasNumberValue) && (!lhs.hasNumberValue || lhs.numberValue == rhs.numberValue)
            fieldCheck = fieldCheck && (lhs.hasStringValue == rhs.hasStringValue) && (!lhs.hasStringValue || lhs.stringValue == rhs.stringValue)
            fieldCheck = fieldCheck && (lhs.hasBoolValue == rhs.hasBoolValue) && (!lhs.hasBoolValue || lhs.boolValue == rhs.boolValue)
            fieldCheck = fieldCheck && (lhs.hasStructValue == rhs.hasStructValue) && (!lhs.hasStructValue || lhs.structValue == rhs.structValue)
            fieldCheck = fieldCheck && (lhs.hasListValue == rhs.hasListValue) && (!lhs.hasListValue || lhs.listValue == rhs.listValue)
            fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
            return fieldCheck
        }



        //OneOf declaration start

        public enum Kind {
            case oneOfKindNotSet

            public func checkOneOfIsSet() -> Bool {
                switch self {
                case .oneOfKindNotSet: return false
                default: return true
                }
            }
            case nullValue(Google.Protobuf.NullValue)

            public static func getNullValue(_ value:Kind) -> Google.Protobuf.NullValue? {
                switch value {
                case .nullValue(let enumValue): return enumValue
                default: return nil
                }
            }
            public func getNullValue() -> Google.Protobuf.NullValue? {
                switch self {
                case .nullValue(let enumValue): return enumValue
                default: return nil
                }
            }
            case numberValue(Double)

            public static func getNumberValue(_ value:Kind) -> Double? {
                switch value {
                case .numberValue(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getNumberValue() -> Double? {
                switch self {
                case .numberValue(let otherValue): return otherValue
                default: return nil
                }
            }
            case stringValue(String)

            public static func getStringValue(_ value:Kind) -> String? {
                switch value {
                case .stringValue(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getStringValue() -> String? {
                switch self {
                case .stringValue(let otherValue): return otherValue
                default: return nil
                }
            }
            case boolValue(Bool)

            public static func getBoolValue(_ value:Kind) -> Bool? {
                switch value {
                case .boolValue(let otherValue): return otherValue
                default: return nil
                }
            }
            public func getBoolValue() -> Bool? {
                switch self {
                case .boolValue(let otherValue): return otherValue
                default: return nil
                }
            }
            case structValue(Google.Protobuf.Struct)

            public static func getStructValue(_ value:Kind) -> Google.Protobuf.Struct? {
                switch value {
                case .structValue(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getStructValue() -> Google.Protobuf.Struct? {
                switch self {
                case .structValue(let messageValue): return messageValue
                default: return nil
                }
            }
            case listValue(Google.Protobuf.ListValue)

            public static func getListValue(_ value:Kind) -> Google.Protobuf.ListValue? {
                switch value {
                case .listValue(let messageValue): return messageValue
                default: return nil
                }
            }
            public func getListValue() -> Google.Protobuf.ListValue? {
                switch self {
                case .listValue(let messageValue): return messageValue
                default: return nil
                }
            }
        }
        //OneOf declaration end

        fileprivate var storageKind:Value.Kind =  Value.Kind.oneOfKindNotSet
        public func getOneOfKind() ->  Value.Kind {
            let copyObjectKind = storageKind
            return copyObjectKind
        }
        public fileprivate(set) var nullValue:Google.Protobuf.NullValue!{
            get {
                return Value.Kind.getNullValue(storageKind)
            }
            set (newvalue) {
                storageKind = Value.Kind.nullValue(newvalue)
            }
        }
        public fileprivate(set) var hasNullValue:Bool {
            get {
                return Value.Kind.getNullValue(storageKind) != nil
            }
            set(newValue) {
            }
        }
        /// Represents a double value.
        public fileprivate(set) var numberValue:Double!{
            get {
                return Value.Kind.getNumberValue(storageKind)
            }
            set (newvalue) {
                storageKind = Value.Kind.numberValue(newvalue)
            }
        }
        public fileprivate(set) var hasNumberValue:Bool {
            get {
                return Value.Kind.getNumberValue(storageKind) != nil
            }
            set(newValue) {
            }
        }
        /// Represents a string value.
        public fileprivate(set) var stringValue:String!{
            get {
                return Value.Kind.getStringValue(storageKind)
            }
            set (newvalue) {
                storageKind = Value.Kind.stringValue(newvalue)
            }
        }
        public fileprivate(set) var hasStringValue:Bool {
            get {
                return Value.Kind.getStringValue(storageKind) != nil
            }
            set(newValue) {
            }
        }
        /// Represents a boolean value.
        public fileprivate(set) var boolValue:Bool!{
            get {
                return Value.Kind.getBoolValue(storageKind)
            }
            set (newvalue) {
                storageKind = Value.Kind.boolValue(newvalue)
            }
        }
        public fileprivate(set) var hasBoolValue:Bool {
            get {
                return Value.Kind.getBoolValue(storageKind) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var structValue:Google.Protobuf.Struct!{
            get {
                return Value.Kind.getStructValue(storageKind)
            }
            set (newvalue) {
                storageKind = Value.Kind.structValue(newvalue)
            }
        }
        public fileprivate(set) var hasStructValue:Bool {
            get {
                return Value.Kind.getStructValue(storageKind) != nil
            }
            set(newValue) {
            }
        }
        public fileprivate(set) var listValue:Google.Protobuf.ListValue!{
            get {
                return Value.Kind.getListValue(storageKind)
            }
            set (newvalue) {
                storageKind = Value.Kind.listValue(newvalue)
            }
        }
        public fileprivate(set) var hasListValue:Bool {
            get {
                return Value.Kind.getListValue(storageKind) != nil
            }
            set(newValue) {
            }
        }
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            if hasNullValue {
                try codedOutputStream.writeEnum(fieldNumber: 1, value:nullValue.rawValue)
            }
            if hasNumberValue {
                try codedOutputStream.writeDouble(fieldNumber: 2, value:numberValue)
            }
            if hasStringValue {
                try codedOutputStream.writeString(fieldNumber: 3, value:stringValue)
            }
            if hasBoolValue {
                try codedOutputStream.writeBool(fieldNumber: 4, value:boolValue)
            }
            if hasStructValue {
                try codedOutputStream.writeMessage(fieldNumber: 5, value:structValue)
            }
            if hasListValue {
                try codedOutputStream.writeMessage(fieldNumber: 6, value:listValue)
            }
            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 (hasNullValue) {
                serialize_size += nullValue.rawValue.computeEnumSize(fieldNumber: 1)
            }
            if hasNumberValue {
                serialize_size += numberValue.computeDoubleSize(fieldNumber: 2)
            }
            if hasStringValue {
                serialize_size += stringValue.computeStringSize(fieldNumber: 3)
            }
            if hasBoolValue {
                serialize_size += boolValue.computeBoolSize(fieldNumber: 4)
            }
            if hasStructValue {
                if let varSizestructValue = structValue?.computeMessageSize(fieldNumber: 5) {
                    serialize_size += varSizestructValue
                }
            }
            if hasListValue {
                if let varSizelistValue = listValue?.computeMessageSize(fieldNumber: 6) {
                    serialize_size += varSizelistValue
                }
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Google.Protobuf.Value.Builder {
            return Google.Protobuf.Value.classBuilder() as! Google.Protobuf.Value.Builder
        }
        public func getBuilder() -> Google.Protobuf.Value.Builder {
            return classBuilder() as! Google.Protobuf.Value.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.Value.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.Value.Builder()
        }
        public func toBuilder() throws -> Google.Protobuf.Value.Builder {
            return try Google.Protobuf.Value.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Google.Protobuf.Value) throws -> Google.Protobuf.Value.Builder {
            return try Google.Protobuf.Value.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if hasNullValue {
                jsonMap["nullValue"] = nullValue.toString()
            }
            if hasNumberValue {
                jsonMap["numberValue"] = Double(numberValue)
            }
            if hasStringValue {
                jsonMap["stringValue"] = stringValue
            }
            if hasBoolValue {
                jsonMap["boolValue"] = boolValue
            }
            if hasStructValue {
                jsonMap["structValue"] = try structValue.encode()
            }
            if hasListValue {
                jsonMap["listValue"] = try listValue.encode()
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Google.Protobuf.Value {
            return try Google.Protobuf.Value.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Google.Protobuf.Value {
            return try Google.Protobuf.Value.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            if (hasNullValue) {
                output += "\(indent) nullValue: \(nullValue.description)\n"
            }
            if hasNumberValue {
                output += "\(indent) numberValue: \(String(describing: numberValue)) \n"
            }
            if hasStringValue {
                output += "\(indent) stringValue: \(String(describing: stringValue)) \n"
            }
            if hasBoolValue {
                output += "\(indent) boolValue: \(String(describing: boolValue)) \n"
            }
            if hasStructValue {
                output += "\(indent) structValue {\n"
                if let outDescStructValue = structValue {
                    output += try outDescStructValue.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            if hasListValue {
                output += "\(indent) listValue {\n"
                if let outDescListValue = listValue {
                    output += try outDescListValue.getDescription(indent: "\(indent)  ")
                }
                output += "\(indent) }\n"
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                if hasNullValue {
                     hashCode = (hashCode &* 31) &+ nullValue.hashValue
                }
                if hasNumberValue {
                    hashCode = (hashCode &* 31) &+ numberValue.hashValue
                }
                if hasStringValue {
                    hashCode = (hashCode &* 31) &+ stringValue.hashValue
                }
                if hasBoolValue {
                    hashCode = (hashCode &* 31) &+ boolValue.hashValue
                }
                if hasStructValue {
                    if let hashValuestructValue = structValue?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuestructValue
                    }
                }
                if hasListValue {
                    if let hashValuelistValue = listValue?.hashValue {
                        hashCode = (hashCode &* 31) &+ hashValuelistValue
                    }
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            public func setKind(_ oneOf:Value.Kind) ->  Google.Protobuf.Value.Builder {
                builderResult.storageKind = oneOf
                return self
            }
            /// Represents a null value.
                public var nullValue:Google.Protobuf.NullValue {
                    get {
                        return builderResult.nullValue
                    }
                    set (value) {
                        builderResult.hasNullValue = true
                        builderResult.nullValue = value
                    }
                }
                public var hasNullValue:Bool{
                    get {
                        return builderResult.hasNullValue
                    }
                }
            @discardableResult
                public func setNullValue(_ value:Google.Protobuf.NullValue) -> Google.Protobuf.Value.Builder {
                  self.nullValue = value
                  return self
                }
            @discardableResult
                public func clearNullValue() -> Google.Protobuf.Value.Builder {
                   builderResult.hasNullValue = false
                   builderResult.nullValue = .`NullValue`
                   return self
                }
            /// Represents a double value.
            public var numberValue:Double {
                get {
                    return builderResult.numberValue
                }
                set (value) {
                    builderResult.hasNumberValue = true
                    builderResult.numberValue = value
                }
            }
            public var hasNumberValue:Bool {
                get {
                    return builderResult.hasNumberValue
                }
            }
            @discardableResult
            public func setNumberValue(_ value:Double) -> Google.Protobuf.Value.Builder {
                self.numberValue = value
                return self
            }
            @discardableResult
            public func clearNumberValue() -> Google.Protobuf.Value.Builder{
                builderResult.hasNumberValue = false
                builderResult.numberValue = nil
                return self
            }
            /// Represents a string value.
            public var stringValue:String {
                get {
                    return builderResult.stringValue
                }
                set (value) {
                    builderResult.hasStringValue = true
                    builderResult.stringValue = value
                }
            }
            public var hasStringValue:Bool {
                get {
                    return builderResult.hasStringValue
                }
            }
            @discardableResult
            public func setStringValue(_ value:String) -> Google.Protobuf.Value.Builder {
                self.stringValue = value
                return self
            }
            @discardableResult
            public func clearStringValue() -> Google.Protobuf.Value.Builder{
                builderResult.hasStringValue = false
                builderResult.stringValue = nil
                return self
            }
            /// Represents a boolean value.
            public var boolValue:Bool {
                get {
                    return builderResult.boolValue
                }
                set (value) {
                    builderResult.hasBoolValue = true
                    builderResult.boolValue = value
                }
            }
            public var hasBoolValue:Bool {
                get {
                    return builderResult.hasBoolValue
                }
            }
            @discardableResult
            public func setBoolValue(_ value:Bool) -> Google.Protobuf.Value.Builder {
                self.boolValue = value
                return self
            }
            @discardableResult
            public func clearBoolValue() -> Google.Protobuf.Value.Builder{
                builderResult.hasBoolValue = false
                builderResult.boolValue = nil
                return self
            }
            /// Represents a structured value.
            public var structValue:Google.Protobuf.Struct! {
                get {
                    if structValueBuilder_ != nil {
                        builderResult.structValue = structValueBuilder_.getMessage()
                    }
                    return builderResult.structValue
                }
                set (value) {
                    builderResult.hasStructValue = value != nil
                    builderResult.structValue = value
                }
            }
            public var hasStructValue:Bool {
                get {
                    return builderResult.hasStructValue
                }
            }
            fileprivate var structValueBuilder_:Google.Protobuf.Struct.Builder! {
                didSet {
                    builderResult.hasStructValue = true
                }
            }
            public func getStructValueBuilder() -> Google.Protobuf.Struct.Builder {
                if structValueBuilder_ == nil {
                    structValueBuilder_ = Google.Protobuf.Struct.Builder()
                    builderResult.structValue = structValueBuilder_.getMessage()
                    if structValue != nil {
                        try! structValueBuilder_.mergeFrom(other: structValue)
                    }
                }
                return structValueBuilder_
            }
            @discardableResult
            public func setStructValue(_ value:Google.Protobuf.Struct!) -> Google.Protobuf.Value.Builder {
                self.structValue = value
                return self
            }
            @discardableResult
            public func mergeStructValue(value:Google.Protobuf.Struct) throws -> Google.Protobuf.Value.Builder {
                if builderResult.hasStructValue {
                    builderResult.structValue = try Google.Protobuf.Struct.builderWithPrototype(prototype:builderResult.structValue).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.structValue = value
                }
                builderResult.hasStructValue = true
                return self
            }
            @discardableResult
            public func clearStructValue() -> Google.Protobuf.Value.Builder {
                structValueBuilder_ = nil
                builderResult.hasStructValue = false
                builderResult.structValue = nil
                return self
            }
            /// Represents a repeated `Value`.
            public var listValue:Google.Protobuf.ListValue! {
                get {
                    if listValueBuilder_ != nil {
                        builderResult.listValue = listValueBuilder_.getMessage()
                    }
                    return builderResult.listValue
                }
                set (value) {
                    builderResult.hasListValue = value != nil
                    builderResult.listValue = value
                }
            }
            public var hasListValue:Bool {
                get {
                    return builderResult.hasListValue
                }
            }
            fileprivate var listValueBuilder_:Google.Protobuf.ListValue.Builder! {
                didSet {
                    builderResult.hasListValue = true
                }
            }
            public func getListValueBuilder() -> Google.Protobuf.ListValue.Builder {
                if listValueBuilder_ == nil {
                    listValueBuilder_ = Google.Protobuf.ListValue.Builder()
                    builderResult.listValue = listValueBuilder_.getMessage()
                    if listValue != nil {
                        try! listValueBuilder_.mergeFrom(other: listValue)
                    }
                }
                return listValueBuilder_
            }
            @discardableResult
            public func setListValue(_ value:Google.Protobuf.ListValue!) -> Google.Protobuf.Value.Builder {
                self.listValue = value
                return self
            }
            @discardableResult
            public func mergeListValue(value:Google.Protobuf.ListValue) throws -> Google.Protobuf.Value.Builder {
                if builderResult.hasListValue {
                    builderResult.listValue = try Google.Protobuf.ListValue.builderWithPrototype(prototype:builderResult.listValue).mergeFrom(other: value).buildPartial()
                } else {
                    builderResult.listValue = value
                }
                builderResult.hasListValue = true
                return self
            }
            @discardableResult
            public func clearListValue() -> Google.Protobuf.Value.Builder {
                listValueBuilder_ = nil
                builderResult.hasListValue = false
                builderResult.listValue = nil
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Google.Protobuf.Value.Builder {
                builderResult = Google.Protobuf.Value()
                return self
            }
            override public func clone() throws -> Google.Protobuf.Value.Builder {
                return try Google.Protobuf.Value.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Google.Protobuf.Value {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Google.Protobuf.Value {
                let returnMe:Google.Protobuf.Value = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Google.Protobuf.Value) throws -> Google.Protobuf.Value.Builder {
                if other == Google.Protobuf.Value() {
                    return self
                }
                if other.hasNullValue {
                    nullValue = other.nullValue
                }
                if other.hasNumberValue {
                    numberValue = other.numberValue
                }
                if other.hasStringValue {
                    stringValue = other.stringValue
                }
                if other.hasBoolValue {
                    boolValue = other.boolValue
                }
                if (other.hasStructValue) {
                    try mergeStructValue(value: other.structValue)
                }
                if (other.hasListValue) {
                    try mergeListValue(value: other.listValue)
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Value.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Value.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 valueIntnullValue = try codedInputStream.readEnum()
                        if let enumsnullValue = Google.Protobuf.NullValue(rawValue:valueIntnullValue){
                            nullValue = enumsnullValue
                        } else {
                            try unknownFieldsBuilder.mergeVarintField(fieldNumber: 1, value:Int64(valueIntnullValue))
                        }

                    case 17:
                        numberValue = try codedInputStream.readDouble()

                    case 26:
                        stringValue = try codedInputStream.readString()

                    case 32:
                        boolValue = try codedInputStream.readBool()

                    case 42:
                        let subBuilder:Google.Protobuf.Struct.Builder = Google.Protobuf.Struct.Builder()
                        if hasStructValue {
                            try subBuilder.mergeFrom(other: structValue)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        structValue = subBuilder.buildPartial()

                    case 50:
                        let subBuilder:Google.Protobuf.ListValue.Builder = Google.Protobuf.ListValue.Builder()
                        if hasListValue {
                            try subBuilder.mergeFrom(other: listValue)
                        }
                        try codedInputStream.readMessage(builder: subBuilder, extensionRegistry:extensionRegistry)
                        listValue = 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.Value.Builder {
                let resultDecodedBuilder = Google.Protobuf.Value.Builder()
                if let jsonValueNullValue = jsonMap["nullValue"] as? String {
                    resultDecodedBuilder.nullValue = try Google.Protobuf.NullValue.fromString(jsonValueNullValue)
                }
                if let jsonValueNumberValue = jsonMap["numberValue"] as? Double {
                    resultDecodedBuilder.numberValue = Double(jsonValueNumberValue)
                } else if let jsonValueNumberValue = jsonMap["numberValue"] as? String {
                    resultDecodedBuilder.numberValue = Double(jsonValueNumberValue)!
                }
                if let jsonValueStringValue = jsonMap["stringValue"] as? String {
                    resultDecodedBuilder.stringValue = jsonValueStringValue
                }
                if let jsonValueBoolValue = jsonMap["boolValue"] as? Bool {
                    resultDecodedBuilder.boolValue = jsonValueBoolValue
                }
                if let jsonValueStructValue = jsonMap["structValue"] as? Dictionary<String,Any> {
                    resultDecodedBuilder.structValue = try Google.Protobuf.Struct.Builder.decodeToBuilder(jsonMap:jsonValueStructValue).build()

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

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

    }

    /// `ListValue` is a wrapper around a repeated field of values.
    final public class ListValue : GeneratedMessage {
        public typealias BuilderType = Google.Protobuf.ListValue.Builder

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

        public fileprivate(set) var values:Array<Google.Protobuf.Value>  = Array<Google.Protobuf.Value>()
        required public init() {
            super.init()
        }
        override public func isInitialized() throws {
        }
        override public func writeTo(codedOutputStream: CodedOutputStream) throws {
            for oneElementValues in values {
                  try codedOutputStream.writeMessage(fieldNumber: 1, value:oneElementValues)
            }
            try unknownFields.writeTo(codedOutputStream: codedOutputStream)
        }
        override public func serializedSize() -> Int32 {
            var serialize_size:Int32 = memoizedSerializedSize
            if serialize_size != -1 {
             return serialize_size
            }

            serialize_size = 0
            for oneElementValues in values {
                serialize_size += oneElementValues.computeMessageSize(fieldNumber: 1)
            }
            serialize_size += unknownFields.serializedSize()
            memoizedSerializedSize = serialize_size
            return serialize_size
        }
        public class func getBuilder() -> Google.Protobuf.ListValue.Builder {
            return Google.Protobuf.ListValue.classBuilder() as! Google.Protobuf.ListValue.Builder
        }
        public func getBuilder() -> Google.Protobuf.ListValue.Builder {
            return classBuilder() as! Google.Protobuf.ListValue.Builder
        }
        override public class func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.ListValue.Builder()
        }
        override public func classBuilder() -> ProtocolBuffersMessageBuilder {
            return Google.Protobuf.ListValue.Builder()
        }
        public func toBuilder() throws -> Google.Protobuf.ListValue.Builder {
            return try Google.Protobuf.ListValue.builderWithPrototype(prototype:self)
        }
        public class func builderWithPrototype(prototype:Google.Protobuf.ListValue) throws -> Google.Protobuf.ListValue.Builder {
            return try Google.Protobuf.ListValue.Builder().mergeFrom(other:prototype)
        }
        override public func encode() throws -> Dictionary<String,Any> {
            try isInitialized()
            var jsonMap:Dictionary<String,Any> = Dictionary<String,Any>()
            if !values.isEmpty {
                var jsonArrayValues:Array<Dictionary<String,Any>> = []
                for oneValueValues in values {
                    let ecodedMessageValues = try oneValueValues.encode()
                    jsonArrayValues.append(ecodedMessageValues)
                }
                jsonMap["values"] = jsonArrayValues
            }
            return jsonMap
        }
        override class public func decode(jsonMap:Dictionary<String,Any>) throws -> Google.Protobuf.ListValue {
            return try Google.Protobuf.ListValue.Builder.decodeToBuilder(jsonMap:jsonMap).build()
        }
        override class public func fromJSON(data:Data, options: JSONSerialization.ReadingOptions = []) throws -> Google.Protobuf.ListValue {
            return try Google.Protobuf.ListValue.Builder.fromJSONToBuilder(data:data, options:options).build()
        }
        override public func getDescription(indent:String) throws -> String {
            var output = ""
            var valuesElementIndex:Int = 0
            for oneElementValues in values {
                output += "\(indent) values[\(valuesElementIndex)] {\n"
                output += try oneElementValues.getDescription(indent: "\(indent)  ")
                output += "\(indent)}\n"
                valuesElementIndex += 1
            }
            output += unknownFields.getDescription(indent: indent)
            return output
        }
        override public var hashValue:Int {
            get {
                var hashCode:Int = 7
                for oneElementValues in values {
                    hashCode = (hashCode &* 31) &+ oneElementValues.hashValue
                }
                hashCode = (hashCode &* 31) &+  unknownFields.hashValue
                return hashCode
            }
        }


        //Meta information declaration start

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

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

            required override public init () {
                super.init()
            }
            /// Repeated field of dynamically typed values.
            public var values:Array<Google.Protobuf.Value> {
                get {
                    return builderResult.values
                }
                set (value) {
                    builderResult.values = value
                }
            }
            @discardableResult
            public func setValues(_ value:Array<Google.Protobuf.Value>) -> Google.Protobuf.ListValue.Builder {
                self.values = value
                return self
            }
            @discardableResult
            public func clearValues() -> Google.Protobuf.ListValue.Builder {
                builderResult.values.removeAll(keepingCapacity: false)
                return self
            }
            override public var internalGetResult:GeneratedMessage {
                get {
                    return builderResult
                }
            }
            @discardableResult
            override public func clear() -> Google.Protobuf.ListValue.Builder {
                builderResult = Google.Protobuf.ListValue()
                return self
            }
            override public func clone() throws -> Google.Protobuf.ListValue.Builder {
                return try Google.Protobuf.ListValue.builderWithPrototype(prototype:builderResult)
            }
            override public func build() throws -> Google.Protobuf.ListValue {
                try checkInitialized()
                return buildPartial()
            }
            public func buildPartial() -> Google.Protobuf.ListValue {
                let returnMe:Google.Protobuf.ListValue = builderResult
                return returnMe
            }
            @discardableResult
            public func mergeFrom(other:Google.Protobuf.ListValue) throws -> Google.Protobuf.ListValue.Builder {
                if other == Google.Protobuf.ListValue() {
                    return self
                }
                if !other.values.isEmpty  {
                     builderResult.values += other.values
                }
                try merge(unknownField: other.unknownFields)
                return self
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.ListValue.Builder {
                return try mergeFrom(codedInputStream: codedInputStream, extensionRegistry:ExtensionRegistry())
            }
            @discardableResult
            override public func mergeFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.ListValue.Builder {
                let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(copyFrom:self.unknownFields)
                while (true) {
                    let protobufTag = try codedInputStream.readTag()
                    switch protobufTag {
                    case 0: 
                        self.unknownFields = try unknownFieldsBuilder.build()
                        return self

                    case 10:
                        let subBuilder = Google.Protobuf.Value.Builder()
                        try codedInputStream.readMessage(builder: subBuilder,extensionRegistry:extensionRegistry)
                        values.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.ListValue.Builder {
                let resultDecodedBuilder = Google.Protobuf.ListValue.Builder()
                if let jsonValueValues = jsonMap["values"] as? Array<Dictionary<String,Any>> {
                    var jsonArrayValues:Array<Google.Protobuf.Value> = []
                    for oneValueValues in jsonValueValues {
                        let messageFromStringValues = try Google.Protobuf.Value.Builder.decodeToBuilder(jsonMap:oneValueValues).build()

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

    }

}
extension Google.Protobuf.Struct: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Google.Protobuf.Struct> {
        var mergedArray = Array<Google.Protobuf.Struct>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Google.Protobuf.Struct? {
        return try Google.Protobuf.Struct.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Google.Protobuf.Struct {
        return try Google.Protobuf.Struct.Builder().mergeFrom(data: data, extensionRegistry:Google.Protobuf.StructRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Struct {
        return try Google.Protobuf.Struct.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Google.Protobuf.Struct {
        return try Google.Protobuf.Struct.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Struct {
        return try Google.Protobuf.Struct.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Struct {
        return try Google.Protobuf.Struct.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Struct {
        return try Google.Protobuf.Struct.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "fields": return self.fields
        default: return nil
        }
    }
}
extension Google.Protobuf.Struct.FieldsEntry: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Google.Protobuf.Struct.FieldsEntry> {
        var mergedArray = Array<Google.Protobuf.Struct.FieldsEntry>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Google.Protobuf.Struct.FieldsEntry? {
        return try Google.Protobuf.Struct.FieldsEntry.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Google.Protobuf.Struct.FieldsEntry {
        return try Google.Protobuf.Struct.FieldsEntry.Builder().mergeFrom(data: data, extensionRegistry:Google.Protobuf.StructRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Struct.FieldsEntry {
        return try Google.Protobuf.Struct.FieldsEntry.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Google.Protobuf.Struct.FieldsEntry {
        return try Google.Protobuf.Struct.FieldsEntry.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Struct.FieldsEntry {
        return try Google.Protobuf.Struct.FieldsEntry.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Struct.FieldsEntry {
        return try Google.Protobuf.Struct.FieldsEntry.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Struct.FieldsEntry {
        return try Google.Protobuf.Struct.FieldsEntry.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "key": return self.key
        case "value": return self.value
        default: return nil
        }
    }
}
extension Google.Protobuf.Struct.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Google.Protobuf.Struct
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "fields": return self.fields
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "fields":
                guard let newSubscriptValue = newSubscriptValue as? Dictionary<String,Google.Protobuf.Value> else {
                    return
                }
                self.fields = newSubscriptValue
            default: return
            }
        }
    }
}
extension Google.Protobuf.Struct.FieldsEntry.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Google.Protobuf.Struct.FieldsEntry
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "key": return self.key
            case "value": return self.value
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "key":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.key = newSubscriptValue
            case "value":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.Value else {
                    return
                }
                self.value = newSubscriptValue
            default: return
            }
        }
    }
}
extension Google.Protobuf.Value: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Google.Protobuf.Value> {
        var mergedArray = Array<Google.Protobuf.Value>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Google.Protobuf.Value? {
        return try Google.Protobuf.Value.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Google.Protobuf.Value {
        return try Google.Protobuf.Value.Builder().mergeFrom(data: data, extensionRegistry:Google.Protobuf.StructRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Value {
        return try Google.Protobuf.Value.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Google.Protobuf.Value {
        return try Google.Protobuf.Value.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Value {
        return try Google.Protobuf.Value.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.Value {
        return try Google.Protobuf.Value.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.Value {
        return try Google.Protobuf.Value.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "nullValue": return self.nullValue
        case "numberValue": return self.numberValue
        case "stringValue": return self.stringValue
        case "boolValue": return self.boolValue
        case "structValue": return self.structValue
        case "listValue": return self.listValue
        default: return nil
        }
    }
}
extension Google.Protobuf.Value.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Google.Protobuf.Value
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "nullValue": return self.nullValue
            case "numberValue": return self.numberValue
            case "stringValue": return self.stringValue
            case "boolValue": return self.boolValue
            case "structValue": return self.structValue
            case "listValue": return self.listValue
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "nullValue":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.NullValue else {
                    return
                }
                self.nullValue = newSubscriptValue
            case "numberValue":
                guard let newSubscriptValue = newSubscriptValue as? Double else {
                    return
                }
                self.numberValue = newSubscriptValue
            case "stringValue":
                guard let newSubscriptValue = newSubscriptValue as? String else {
                    return
                }
                self.stringValue = newSubscriptValue
            case "boolValue":
                guard let newSubscriptValue = newSubscriptValue as? Bool else {
                    return
                }
                self.boolValue = newSubscriptValue
            case "structValue":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.Struct else {
                    return
                }
                self.structValue = newSubscriptValue
            case "listValue":
                guard let newSubscriptValue = newSubscriptValue as? Google.Protobuf.ListValue else {
                    return
                }
                self.listValue = newSubscriptValue
            default: return
            }
        }
    }
}
extension Google.Protobuf.ListValue: GeneratedMessageProtocol {
    public class func parseArrayDelimitedFrom(inputStream: InputStream) throws -> Array<Google.Protobuf.ListValue> {
        var mergedArray = Array<Google.Protobuf.ListValue>()
        while let value = try parseDelimitedFrom(inputStream: inputStream) {
          mergedArray.append(value)
        }
        return mergedArray
    }
    public class func parseDelimitedFrom(inputStream: InputStream) throws -> Google.Protobuf.ListValue? {
        return try Google.Protobuf.ListValue.Builder().mergeDelimitedFrom(inputStream: inputStream)?.build()
    }
    public class func parseFrom(data: Data) throws -> Google.Protobuf.ListValue {
        return try Google.Protobuf.ListValue.Builder().mergeFrom(data: data, extensionRegistry:Google.Protobuf.StructRoot.default.extensionRegistry).build()
    }
    public class func parseFrom(data: Data, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.ListValue {
        return try Google.Protobuf.ListValue.Builder().mergeFrom(data: data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(inputStream: InputStream) throws -> Google.Protobuf.ListValue {
        return try Google.Protobuf.ListValue.Builder().mergeFrom(inputStream: inputStream).build()
    }
    public class func parseFrom(inputStream: InputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.ListValue {
        return try Google.Protobuf.ListValue.Builder().mergeFrom(inputStream: inputStream, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream) throws -> Google.Protobuf.ListValue {
        return try Google.Protobuf.ListValue.Builder().mergeFrom(codedInputStream: codedInputStream).build()
    }
    public class func parseFrom(codedInputStream: CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.ListValue {
        return try Google.Protobuf.ListValue.Builder().mergeFrom(codedInputStream: codedInputStream, extensionRegistry:extensionRegistry).build()
    }
    public subscript(key: String) -> Any? {
        switch key {
        case "values": return self.values
        default: return nil
        }
    }
}
extension Google.Protobuf.ListValue.Builder: GeneratedMessageBuilderProtocol {
    public typealias GeneratedMessageType = Google.Protobuf.ListValue
    public subscript(key: String) -> Any? {
        get { 
            switch key {
            case "values": return self.values
            default: return nil
            }
        }
        set (newSubscriptValue) { 
            switch key {
            case "values":
                guard let newSubscriptValue = newSubscriptValue as? Array<Google.Protobuf.Value> else {
                    return
                }
                self.values = newSubscriptValue
            default: return
            }
        }
    }
}

// @@protoc_insertion_point(global_scope)
