diff --git a/MVMCore/MVMCore/Models/ActionType/ActionBackModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionBackModel.swift index a858f6c..7c903ff 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionBackModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionBackModel.swift @@ -15,26 +15,4 @@ import Foundation public var analyticsData: JSONValueDictionary? // Temporary fix till server changes public var title: String? - - public enum CodingKeys: String, CodingKey { - case actionType - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionCallModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionCallModel.swift index b00c486..a579e63 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionCallModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionCallModel.swift @@ -20,29 +20,4 @@ import Foundation public init(callNumber: String) { self.callNumber = callNumber } - - public enum CodingKeys: String, CodingKey { - case actionType - case callNumber - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - callNumber = try typeContainer.decode(String.self, forKey: .callNumber) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encode(callNumber, forKey: .callNumber) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionCancelModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionCancelModel.swift index 7d82385..189dcb1 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionCancelModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionCancelModel.swift @@ -18,26 +18,4 @@ import UIKit public var analyticsData: JSONValueDictionary? public var title: String? - - public enum CodingKeys: String, CodingKey { - case actionType - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionOpenAppModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionOpenAppModel.swift index a6b9724..cd774fa 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionOpenAppModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionOpenAppModel.swift @@ -20,29 +20,4 @@ import Foundation public init(appURL: String) { self.appURL = appURL } - - public enum CodingKeys: String, CodingKey { - case actionType - case appURL - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - appURL = try typeContainer.decode(String.self, forKey: .appURL) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encode(appURL, forKey: .appURL) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionOpenPageModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionOpenPageModel.swift index 862cc2c..0675684 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionOpenPageModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionOpenPageModel.swift @@ -22,32 +22,4 @@ import Foundation public init(pageType: String) { self.pageType = pageType } - - public enum CodingKeys: String, CodingKey { - case actionType - case pageType - case title - case extraParameters - case analyticsData - case presentationStyle - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - pageType = try typeContainer.decode(String.self, forKey: .pageType) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - presentationStyle = try typeContainer.decodeIfPresent(String.self, forKey: .presentationStyle) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encode(pageType, forKey: .pageType) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - try encoderContainer.encodeIfPresent(presentationStyle, forKey: .presentationStyle) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionOpenPanelModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionOpenPanelModel.swift index 765ddbe..bd55540 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionOpenPanelModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionOpenPanelModel.swift @@ -16,33 +16,4 @@ import Foundation public var analyticsData: JSONValueDictionary? // Temporary fix till server changes public var title: String? - - public init(panel: String) { - self.panel = panel - } - - public enum CodingKeys: String, CodingKey { - case actionType - case panel - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - panel = try typeContainer.decode(String.self, forKey: .panel) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encode(panel, forKey: .panel) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionOpenUrlModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionOpenUrlModel.swift index 20a2e73..bf4ca8f 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionOpenUrlModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionOpenUrlModel.swift @@ -31,54 +31,4 @@ import Foundation public init(browserUrl: String) { self.browserUrl = browserUrl } - - public enum CodingKeys: String, CodingKey { - case actionType - case browserUrl - case title - case extraParameters - case analyticsData - - case openOauthWebView - case showNativeNavigation - case openInWebview - case customUserAgent - case postRequest - case dontShowProgress - case headerParameters - - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - browserUrl = try typeContainer.decode(String.self, forKey: .browserUrl) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - - openOauthWebView = try typeContainer.decodeIfPresent(Bool.self, forKey: .openOauthWebView) - showNativeNavigation = try typeContainer.decodeIfPresent(Bool.self, forKey: .showNativeNavigation) - openInWebview = try typeContainer.decodeIfPresent(Bool.self, forKey: .openInWebview) - customUserAgent = try typeContainer.decodeIfPresent(String.self, forKey: .customUserAgent) - postRequest = try typeContainer.decodeIfPresent(Bool.self, forKey: .postRequest) - dontShowProgress = try typeContainer.decodeIfPresent(Bool.self, forKey: .dontShowProgress) - headerParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .headerParameters) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encode(browserUrl, forKey: .browserUrl) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - - try encoderContainer.encodeIfPresent(openOauthWebView, forKey: .openOauthWebView) - try encoderContainer.encodeIfPresent(showNativeNavigation, forKey: .showNativeNavigation) - try encoderContainer.encodeIfPresent(openInWebview, forKey: .openInWebview) - try encoderContainer.encodeIfPresent(customUserAgent, forKey: .customUserAgent) - try encoderContainer.encodeIfPresent(postRequest, forKey: .postRequest) - try encoderContainer.encodeIfPresent(dontShowProgress, forKey: .dontShowProgress) - try encoderContainer.encodeIfPresent(headerParameters, forKey: .headerParameters) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionPopupModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionPopupModel.swift index 861dcde..68366fe 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionPopupModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionPopupModel.swift @@ -19,29 +19,4 @@ import Foundation public init(pageType: String) { self.pageType = pageType } - - public enum CodingKeys: String, CodingKey { - case actionType - case pageType - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - pageType = try typeContainer.decode(String.self, forKey: .pageType) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encode(pageType, forKey: .pageType) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionPreviousSubmitModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionPreviousSubmitModel.swift index 9f61beb..54e423d 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionPreviousSubmitModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionPreviousSubmitModel.swift @@ -18,26 +18,4 @@ import UIKit public var analyticsData: JSONValueDictionary? public var title: String? - - public enum CodingKeys: String, CodingKey { - case actionType - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionRestartModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionRestartModel.swift index 429e4af..bba379f 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionRestartModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionRestartModel.swift @@ -21,29 +21,4 @@ import UIKit ///Optional pageType, if pageType is nil, will start with pageType launchApp public var pageType: String? - - public enum CodingKeys: String, CodingKey { - case actionType - case pageType - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - pageType = try typeContainer.decodeIfPresent(String.self, forKey: .pageType) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encodeIfPresent(pageType, forKey: .pageType) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionSettingModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionSettingModel.swift index e5e8a43..9adb382 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionSettingModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionSettingModel.swift @@ -21,29 +21,4 @@ import UIKit ///String type for pageType, currently only support "location" and "push" public var pageType: String - - public enum CodingKeys: String, CodingKey { - case actionType - case pageType - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - pageType = try typeContainer.decode(String.self, forKey: .pageType) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encode(pageType, forKey: .pageType) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } } diff --git a/MVMCore/MVMCore/Models/ActionType/ActionShareModel.swift b/MVMCore/MVMCore/Models/ActionType/ActionShareModel.swift index c81b7e1..c40fbcd 100644 --- a/MVMCore/MVMCore/Models/ActionType/ActionShareModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/ActionShareModel.swift @@ -30,32 +30,4 @@ import UIKit self.sharedType = sharedType self.sharedText = sharedText } - - public enum CodingKeys: String, CodingKey { - case actionType - case sharedType - case sharedText - case title - case extraParameters - case analyticsData - } - - public required init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - sharedType = try typeContainer.decode(String.self, forKey: .sharedType) - sharedText = try typeContainer.decode(String.self, forKey: .sharedText) - title = try typeContainer.decodeIfPresent(String.self, forKey: .title) - extraParameters = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - analyticsData = try typeContainer.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - } - - public func encode(to encoder: Encoder) throws { - var encoderContainer = encoder.container(keyedBy: CodingKeys.self) - try encoderContainer.encodeIfPresent(actionType, forKey: .actionType) - try encoderContainer.encode(sharedType, forKey: .sharedType) - try encoderContainer.encode(sharedText, forKey: .sharedText) - try encoderContainer.encodeIfPresent(title, forKey: .title) - try encoderContainer.encodeIfPresent(extraParameters, forKey: .extraParameters) - try encoderContainer.encodeIfPresent(analyticsData, forKey: .analyticsData) - } }