O2TaskAttachmentInfo.swift 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //
  2. // O2TaskAttachmentInfo.swift
  3. // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
  4. import Foundation
  5. import ObjectMapper
  6. class O2TaskAttachmentInfo : NSObject, NSCoding, Mappable{
  7. var count : Int?
  8. var data : O2TaskAttachmentInfoData?
  9. var date : String?
  10. var message : String?
  11. var position : Int?
  12. var size : Int?
  13. var spent : Int?
  14. var type : String?
  15. class func newInstance(map: Map) -> Mappable?{
  16. return O2TaskAttachmentInfo()
  17. }
  18. required init?(map: Map){}
  19. private override init(){}
  20. func mapping(map: Map)
  21. {
  22. count <- map["count"]
  23. data <- map["data"]
  24. date <- map["date"]
  25. message <- map["message"]
  26. position <- map["position"]
  27. size <- map["size"]
  28. spent <- map["spent"]
  29. type <- map["type"]
  30. }
  31. /**
  32. * NSCoding required initializer.
  33. * Fills the data from the passed decoder
  34. */
  35. @objc required init(coder aDecoder: NSCoder)
  36. {
  37. count = aDecoder.decodeObject(forKey: "count") as? Int
  38. data = aDecoder.decodeObject(forKey: "data") as? O2TaskAttachmentInfoData
  39. date = aDecoder.decodeObject(forKey: "date") as? String
  40. message = aDecoder.decodeObject(forKey: "message") as? String
  41. position = aDecoder.decodeObject(forKey: "position") as? Int
  42. size = aDecoder.decodeObject(forKey: "size") as? Int
  43. spent = aDecoder.decodeObject(forKey: "spent") as? Int
  44. type = aDecoder.decodeObject(forKey: "type") as? String
  45. }
  46. /**
  47. * NSCoding required method.
  48. * Encodes mode properties into the decoder
  49. */
  50. @objc func encode(with aCoder: NSCoder)
  51. {
  52. if count != nil{
  53. aCoder.encode(count, forKey: "count")
  54. }
  55. if data != nil{
  56. aCoder.encode(data, forKey: "data")
  57. }
  58. if date != nil{
  59. aCoder.encode(date, forKey: "date")
  60. }
  61. if message != nil{
  62. aCoder.encode(message, forKey: "message")
  63. }
  64. if position != nil{
  65. aCoder.encode(position, forKey: "position")
  66. }
  67. if size != nil{
  68. aCoder.encode(size, forKey: "size")
  69. }
  70. if spent != nil{
  71. aCoder.encode(spent, forKey: "spent")
  72. }
  73. if type != nil{
  74. aCoder.encode(type, forKey: "type")
  75. }
  76. }
  77. }