CMSData.swift 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. //
  2. // CMSData.swift
  3. // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
  4. import Foundation
  5. import ObjectMapper
  6. class CMSData : NSObject, NSCoding, Mappable{
  7. var appAlias : String?
  8. var appIcon : String?
  9. var appInfoSeq : String?
  10. var appName : String?
  11. var categoryList : [AnyObject]?
  12. var createTime : String?
  13. var creatorCompany : String?
  14. var creatorDepartment : String?
  15. var creatorIdentity : String?
  16. var creatorPerson : String?
  17. var descriptionField : String?
  18. var distributeFactor : Int?
  19. var id : String?
  20. var sequence : String?
  21. var updateTime : String?
  22. var wrapOutCategoryList : [CMSWrapOutCategoryList]?
  23. class func newInstance(map: Map) -> Mappable?{
  24. return CMSData()
  25. }
  26. required init?(map: Map){}
  27. private override init(){}
  28. func mapping(map: Map)
  29. {
  30. appAlias <- map["appAlias"]
  31. appIcon <- map["appIcon"]
  32. appInfoSeq <- map["appInfoSeq"]
  33. appName <- map["appName"]
  34. categoryList <- map["categoryList"]
  35. createTime <- map["createTime"]
  36. creatorCompany <- map["creatorCompany"]
  37. creatorDepartment <- map["creatorDepartment"]
  38. creatorIdentity <- map["creatorIdentity"]
  39. creatorPerson <- map["creatorPerson"]
  40. descriptionField <- map["description"]
  41. distributeFactor <- map["distributeFactor"]
  42. id <- map["id"]
  43. sequence <- map["sequence"]
  44. updateTime <- map["updateTime"]
  45. wrapOutCategoryList <- map["wrapOutCategoryList"]
  46. }
  47. /**
  48. * NSCoding required initializer.
  49. * Fills the data from the passed decoder
  50. */
  51. @objc required init(coder aDecoder: NSCoder)
  52. {
  53. appAlias = aDecoder.decodeObject(forKey: "appAlias") as? String
  54. appIcon = aDecoder.decodeObject(forKey: "appIcon") as? String
  55. appInfoSeq = aDecoder.decodeObject(forKey: "appInfoSeq") as? String
  56. appName = aDecoder.decodeObject(forKey: "appName") as? String
  57. categoryList = aDecoder.decodeObject(forKey: "categoryList") as? [AnyObject]
  58. createTime = aDecoder.decodeObject(forKey: "createTime") as? String
  59. creatorCompany = aDecoder.decodeObject(forKey: "creatorCompany") as? String
  60. creatorDepartment = aDecoder.decodeObject(forKey: "creatorDepartment") as? String
  61. creatorIdentity = aDecoder.decodeObject(forKey: "creatorIdentity") as? String
  62. creatorPerson = aDecoder.decodeObject(forKey: "creatorPerson") as? String
  63. descriptionField = aDecoder.decodeObject(forKey: "description") as? String
  64. distributeFactor = aDecoder.decodeObject(forKey: "distributeFactor") as? Int
  65. id = aDecoder.decodeObject(forKey: "id") as? String
  66. sequence = aDecoder.decodeObject(forKey: "sequence") as? String
  67. updateTime = aDecoder.decodeObject(forKey: "updateTime") as? String
  68. wrapOutCategoryList = aDecoder.decodeObject(forKey: "wrapOutCategoryList") as? [CMSWrapOutCategoryList]
  69. }
  70. /**
  71. * NSCoding required method.
  72. * Encodes mode properties into the decoder
  73. */
  74. @objc func encode(with aCoder: NSCoder)
  75. {
  76. if appAlias != nil{
  77. aCoder.encode(appAlias, forKey: "appAlias")
  78. }
  79. if appIcon != nil{
  80. aCoder.encode(appIcon, forKey: "appIcon")
  81. }
  82. if appInfoSeq != nil{
  83. aCoder.encode(appInfoSeq, forKey: "appInfoSeq")
  84. }
  85. if appName != nil{
  86. aCoder.encode(appName, forKey: "appName")
  87. }
  88. if categoryList != nil{
  89. aCoder.encode(categoryList, forKey: "categoryList")
  90. }
  91. if createTime != nil{
  92. aCoder.encode(createTime, forKey: "createTime")
  93. }
  94. if creatorCompany != nil{
  95. aCoder.encode(creatorCompany, forKey: "creatorCompany")
  96. }
  97. if creatorDepartment != nil{
  98. aCoder.encode(creatorDepartment, forKey: "creatorDepartment")
  99. }
  100. if creatorIdentity != nil{
  101. aCoder.encode(creatorIdentity, forKey: "creatorIdentity")
  102. }
  103. if creatorPerson != nil{
  104. aCoder.encode(creatorPerson, forKey: "creatorPerson")
  105. }
  106. if descriptionField != nil{
  107. aCoder.encode(descriptionField, forKey: "description")
  108. }
  109. if distributeFactor != nil{
  110. aCoder.encode(distributeFactor, forKey: "distributeFactor")
  111. }
  112. if id != nil{
  113. aCoder.encode(id, forKey: "id")
  114. }
  115. if sequence != nil{
  116. aCoder.encode(sequence, forKey: "sequence")
  117. }
  118. if updateTime != nil{
  119. aCoder.encode(updateTime, forKey: "updateTime")
  120. }
  121. if wrapOutCategoryList != nil{
  122. aCoder.encode(wrapOutCategoryList, forKey: "wrapOutCategoryList")
  123. }
  124. }
  125. }