  */
 
 
+import Foundation
+
+
 public struct Notification {
     
     public let message: Message

                var json = [:] as [String: AnyObject]
                
                json["collapseKey"] = collapseKey as? AnyObject
                if let delay = delayWhileIdle {
                    json["delayWhileIdle"] = delay ? ("true" as! AnyObject) : ("false" as! AnyObject)
                }
                json["payload"] = payload as? AnyObject
                json["priority"] = priority?.rawValue as? AnyObject
                json["sound"] = sound as? AnyObject

            
            var json = [:] as [String: AnyObject]
            
            json["deviceIds"] = deviceIds as? AnyObject
            
            #if os(OSX)
                if let platformsAsStrings = platforms?.map({ $0.rawValue }) {
                    json["platforms"] = !platformsAsStrings.isEmpty ? platformsAsStrings : nil
                }
            #elseif os(Linux)
                let platformsAsStrings = NSMutableArray()
                if let platforms = platforms{
                    for platform in platforms {
                        platformsAsStrings.addObject(NSString(string: platform.rawValue))
                    }
                }
                json["platforms"] = platformsAsStrings.count == 0 ? platformsAsStrings : nil
            #endif
            
            json["tagNames"] = tagNames as? AnyObject
            json["userIds"] = userIds as? AnyObject
            
