// // Device.swift // Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport import Foundation struct LoginRetDevice{ var allowPush : Int! var id : String! var loginName : String! var serverID : String! var timestamp : Int! var token : String! var type : Int! var unreadCount : Int! var user : Int! /** * Instantiate the instance using the passed dictionary values to set the properties values */ init(fromDictionary dictionary: NSDictionary){ allowPush = dictionary["allowPush"] as? Int id = dictionary["id"] as? String loginName = dictionary["loginName"] as? String serverID = dictionary["serverID"] as? String timestamp = dictionary["timestamp"] as? Int token = dictionary["token"] as? String type = dictionary["type"] as? Int unreadCount = dictionary["unreadCount"] as? Int user = dictionary["user"] as? Int } /** * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property */ func toDictionary() -> NSDictionary { var dictionary = NSMutableDictionary() if allowPush != nil{ dictionary["allowPush"] = allowPush } if id != nil{ dictionary["id"] = id } if loginName != nil{ dictionary["loginName"] = loginName } if serverID != nil{ dictionary["serverID"] = serverID } if timestamp != nil{ dictionary["timestamp"] = timestamp } if token != nil{ dictionary["token"] = token } if type != nil{ dictionary["type"] = type } if unreadCount != nil{ dictionary["unreadCount"] = unreadCount } if user != nil{ dictionary["user"] = user } return dictionary } }