#if swift(>=4.0)
@objcMembers public class TrustDefenderMetaHeader: ElectrodeObject, Bridgeable {

    private static let tag = String(describing: type(of: self))

    public let appId: String?
    public let appInstallDate: String?
    public let locationEnabled: Bool?
    public let longitude: String?
    public let latitude: String?
    public let deviceId: String?
    public let tmxSessionId: String?

    public init(appId: String?, appInstallDate: String?, locationEnabled: Bool?, longitude: String?, latitude: String?, deviceId: String?, tmxSessionId: String?) {
        self.appId = appId
        self.appInstallDate = appInstallDate
        self.locationEnabled = locationEnabled
        self.longitude = longitude
        self.latitude = latitude
        self.deviceId = deviceId
        self.tmxSessionId = tmxSessionId
        super.init()
    }

    public override init() {
        self.appId = nil
        self.appInstallDate = nil
        self.locationEnabled = nil
        self.longitude = nil
        self.latitude = nil
        self.deviceId = nil
        self.tmxSessionId = nil
        super.init()
    }

    required public init(dictionary:[AnyHashable:Any]) {



        if let appId = dictionary["appId"] as? String {
            self.appId = appId
        } else {
            self.appId = nil
        }
        

        if let appInstallDate = dictionary["appInstallDate"] as? String {
            self.appInstallDate = appInstallDate
        } else {
            self.appInstallDate = nil
        }
        

        if let locationEnabled = dictionary["locationEnabled"] as? Bool {
            self.locationEnabled = locationEnabled
        } else {
            self.locationEnabled = nil
        }
        

        if let longitude = dictionary["longitude"] as? String {
            self.longitude = longitude
        } else {
            self.longitude = nil
        }
        

        if let latitude = dictionary["latitude"] as? String {
            self.latitude = latitude
        } else {
            self.latitude = nil
        }
        

        if let deviceId = dictionary["deviceId"] as? String {
            self.deviceId = deviceId
        } else {
            self.deviceId = nil
        }
        

        if let tmxSessionId = dictionary["tmxSessionId"] as? String {
            self.tmxSessionId = tmxSessionId
        } else {
            self.tmxSessionId = nil
        }
        
        super.init(dictionary: dictionary)
    }

    public func toDictionary() -> NSDictionary {

         var dict = [:] as [AnyHashable : Any]

         
        if let nonNullAppId = self.appId {
                dict["appId"] = nonNullAppId
        }
        if let nonNullAppInstallDate = self.appInstallDate {
                dict["appInstallDate"] = nonNullAppInstallDate
        }
        if let nonNullLocationEnabled = self.locationEnabled {
                dict["locationEnabled"] = nonNullLocationEnabled
        }
        if let nonNullLongitude = self.longitude {
                dict["longitude"] = nonNullLongitude
        }
        if let nonNullLatitude = self.latitude {
                dict["latitude"] = nonNullLatitude
        }
        if let nonNullDeviceId = self.deviceId {
                dict["deviceId"] = nonNullDeviceId
        }
        if let nonNullTmxSessionId = self.tmxSessionId {
                dict["tmxSessionId"] = nonNullTmxSessionId
        }
        return dict as NSDictionary
    }
}
#else

public class TrustDefenderMetaHeader: ElectrodeObject, Bridgeable {

    private static let tag = String(describing: type(of: self))

    public let appId: String?
    public let appInstallDate: String?
    public let locationEnabled: Bool?
    public let longitude: String?
    public let latitude: String?
    public let deviceId: String?
    public let tmxSessionId: String?

    public init(appId: String?, appInstallDate: String?, locationEnabled: Bool?, longitude: String?, latitude: String?, deviceId: String?, tmxSessionId: String?) {
        self.appId = appId
        self.appInstallDate = appInstallDate
        self.locationEnabled = locationEnabled
        self.longitude = longitude
        self.latitude = latitude
        self.deviceId = deviceId
        self.tmxSessionId = tmxSessionId
        super.init()
    }

    public override init() {
        self.appId = nil
        self.appInstallDate = nil
        self.locationEnabled = nil
        self.longitude = nil
        self.latitude = nil
        self.deviceId = nil
        self.tmxSessionId = nil
        super.init()
    }

    required public init(dictionary:[AnyHashable:Any]) {



        if let appId = dictionary["appId"] as? String {
            self.appId = appId
        } else {
            self.appId = nil
        }
        

        if let appInstallDate = dictionary["appInstallDate"] as? String {
            self.appInstallDate = appInstallDate
        } else {
            self.appInstallDate = nil
        }
        

        if let locationEnabled = dictionary["locationEnabled"] as? Bool {
            self.locationEnabled = locationEnabled
        } else {
            self.locationEnabled = nil
        }
        

        if let longitude = dictionary["longitude"] as? String {
            self.longitude = longitude
        } else {
            self.longitude = nil
        }
        

        if let latitude = dictionary["latitude"] as? String {
            self.latitude = latitude
        } else {
            self.latitude = nil
        }
        

        if let deviceId = dictionary["deviceId"] as? String {
            self.deviceId = deviceId
        } else {
            self.deviceId = nil
        }
        

        if let tmxSessionId = dictionary["tmxSessionId"] as? String {
            self.tmxSessionId = tmxSessionId
        } else {
            self.tmxSessionId = nil
        }
        
        super.init(dictionary: dictionary)
    }

    public func toDictionary() -> NSDictionary {

         var dict = [:] as [AnyHashable : Any]

         
        if let nonNullAppId = self.appId {
                dict["appId"] = nonNullAppId
        }
        if let nonNullAppInstallDate = self.appInstallDate {
                dict["appInstallDate"] = nonNullAppInstallDate
        }
        if let nonNullLocationEnabled = self.locationEnabled {
                dict["locationEnabled"] = nonNullLocationEnabled
        }
        if let nonNullLongitude = self.longitude {
                dict["longitude"] = nonNullLongitude
        }
        if let nonNullLatitude = self.latitude {
                dict["latitude"] = nonNullLatitude
        }
        if let nonNullDeviceId = self.deviceId {
                dict["deviceId"] = nonNullDeviceId
        }
        if let nonNullTmxSessionId = self.tmxSessionId {
                dict["tmxSessionId"] = nonNullTmxSessionId
        }
        return dict as NSDictionary
    }
}
#endif
