O2Application.swift 4.4 KB

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