// // StringModel.swift // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport import Foundation class StringModel : NSObject, NSCoding{ var cameraButtonText : String! var cameraText : String! var cameraText1 : String! var completeButtonText : String! var completeText : String! var completeText2 : String! var homeButtonText : String! var homeText1 : String! var homeText2 : String! var homeText3 : String! var homeTitle : String! var lactationModeText : String! var lyingGesture : StringLyingGesture! var lyingGestureIntroduce : StringLyingGestureIntroduce! var sittingGesture : StringLyingGesture! var sittingGestureIntroduce : StringSittingGestureIntroduce! /** * Instantiate the instance using the passed dictionary values to set the properties values */ init(fromDictionary dictionary: [String:Any]){ cameraButtonText = dictionary["cameraButtonText"] as? String cameraText = dictionary["cameraText"] as? String cameraText1 = dictionary["cameraText1"] as? String completeButtonText = dictionary["completeButtonText"] as? String completeText = dictionary["completeText"] as? String completeText2 = dictionary["completeText2"] as? String homeButtonText = dictionary["homeButtonText"] as? String homeText1 = dictionary["homeText1"] as? String homeText2 = dictionary["homeText2"] as? String homeText3 = dictionary["homeText3"] as? String homeTitle = dictionary["homeTitle"] as? String lactationModeText = dictionary["lactationModeText"] as? String if let lyingGestureData = dictionary["lyingGesture"] as? [String:Any]{ lyingGesture = StringLyingGesture(fromDictionary: lyingGestureData) } if let lyingGestureIntroduceData = dictionary["lyingGestureIntroduce"] as? [String:Any]{ lyingGestureIntroduce = StringLyingGestureIntroduce(fromDictionary: lyingGestureIntroduceData) } if let sittingGestureData = dictionary["sittingGesture"] as? [String:Any]{ sittingGesture = StringLyingGesture(fromDictionary: sittingGestureData) } if let sittingGestureIntroduceData = dictionary["sittingGestureIntroduce"] as? [String:Any]{ sittingGestureIntroduce = StringSittingGestureIntroduce(fromDictionary: sittingGestureIntroduceData) } } /** * Returns all the available property values in the form of [String:Any] object where the key is the approperiate json key and the value is the value of the corresponding property */ func toDictionary() -> [String:Any] { var dictionary = [String:Any]() if cameraButtonText != nil{ dictionary["cameraButtonText"] = cameraButtonText } if cameraText != nil{ dictionary["cameraText"] = cameraText } if cameraText1 != nil{ dictionary["cameraText1"] = cameraText1 } if completeButtonText != nil{ dictionary["completeButtonText"] = completeButtonText } if completeText != nil{ dictionary["completeText"] = completeText } if completeText2 != nil{ dictionary["completeText2"] = completeText2 } if homeButtonText != nil{ dictionary["homeButtonText"] = homeButtonText } if homeText1 != nil{ dictionary["homeText1"] = homeText1 } if homeText2 != nil{ dictionary["homeText2"] = homeText2 } if homeText3 != nil{ dictionary["homeText3"] = homeText3 } if homeTitle != nil{ dictionary["homeTitle"] = homeTitle } if lactationModeText != nil{ dictionary["lactationModeText"] = lactationModeText } if lyingGesture != nil{ dictionary["lyingGesture"] = lyingGesture.toDictionary() } if lyingGestureIntroduce != nil{ dictionary["lyingGestureIntroduce"] = lyingGestureIntroduce.toDictionary() } if sittingGesture != nil{ dictionary["sittingGesture"] = sittingGesture.toDictionary() } if sittingGestureIntroduce != nil{ dictionary["sittingGestureIntroduce"] = sittingGestureIntroduce.toDictionary() } return dictionary } /** * NSCoding required initializer. * Fills the data from the passed decoder */ @objc required init(coder aDecoder: NSCoder) { cameraButtonText = aDecoder.decodeObject(forKey: "cameraButtonText") as? String cameraText = aDecoder.decodeObject(forKey: "cameraText") as? String cameraText1 = aDecoder.decodeObject(forKey: "cameraText1") as? String completeButtonText = aDecoder.decodeObject(forKey: "completeButtonText") as? String completeText = aDecoder.decodeObject(forKey: "completeText") as? String completeText2 = aDecoder.decodeObject(forKey: "completeText2") as? String homeButtonText = aDecoder.decodeObject(forKey: "homeButtonText") as? String homeText1 = aDecoder.decodeObject(forKey: "homeText1") as? String homeText2 = aDecoder.decodeObject(forKey: "homeText2") as? String homeText3 = aDecoder.decodeObject(forKey: "homeText3") as? String homeTitle = aDecoder.decodeObject(forKey: "homeTitle") as? String lactationModeText = aDecoder.decodeObject(forKey: "lactationModeText") as? String lyingGesture = aDecoder.decodeObject(forKey: "lyingGesture") as? StringLyingGesture lyingGestureIntroduce = aDecoder.decodeObject(forKey: "lyingGestureIntroduce") as? StringLyingGestureIntroduce sittingGesture = aDecoder.decodeObject(forKey: "sittingGesture") as? StringLyingGesture sittingGestureIntroduce = aDecoder.decodeObject(forKey: "sittingGestureIntroduce") as? StringSittingGestureIntroduce } /** * NSCoding required method. * Encodes mode properties into the decoder */ @objc func encode(with aCoder: NSCoder) { if cameraButtonText != nil{ aCoder.encode(cameraButtonText, forKey: "cameraButtonText") } if cameraText != nil{ aCoder.encode(cameraText, forKey: "cameraText") } if cameraText1 != nil{ aCoder.encode(cameraText1, forKey: "cameraText1") } if completeButtonText != nil{ aCoder.encode(completeButtonText, forKey: "completeButtonText") } if completeText != nil{ aCoder.encode(completeText, forKey: "completeText") } if completeText2 != nil{ aCoder.encode(completeText2, forKey: "completeText2") } if homeButtonText != nil{ aCoder.encode(homeButtonText, forKey: "homeButtonText") } if homeText1 != nil{ aCoder.encode(homeText1, forKey: "homeText1") } if homeText2 != nil{ aCoder.encode(homeText2, forKey: "homeText2") } if homeText3 != nil{ aCoder.encode(homeText3, forKey: "homeText3") } if homeTitle != nil{ aCoder.encode(homeTitle, forKey: "homeTitle") } if lactationModeText != nil{ aCoder.encode(lactationModeText, forKey: "lactationModeText") } if lyingGesture != nil{ aCoder.encode(lyingGesture, forKey: "lyingGesture") } if lyingGestureIntroduce != nil{ aCoder.encode(lyingGestureIntroduce, forKey: "lyingGestureIntroduce") } if sittingGesture != nil{ aCoder.encode(sittingGesture, forKey: "sittingGesture") } if sittingGestureIntroduce != nil{ aCoder.encode(sittingGestureIntroduce, forKey: "sittingGestureIntroduce") } } }