Removing the codable method for the restart action type
This commit is contained in:
parent
85dcc57513
commit
217cceb84b
@ -32,35 +32,4 @@ public struct ActionRestartModel: ActionModelProtocol {
|
||||
self.extraParameters = extraParameters
|
||||
self.analyticsData = analyticsData
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Codable
|
||||
//--------------------------------------------------
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case actionType
|
||||
case requestURL
|
||||
case extraParameters
|
||||
case analyticsData
|
||||
case pageType
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.actionType = try container.decode(String.self, forKey: .actionType)
|
||||
self.requestURL = try container.decodeIfPresent(URL.self, forKey: .requestURL)
|
||||
self.extraParameters = try container.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters)
|
||||
self.analyticsData = try container.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData)
|
||||
self.pageType = try container.decodeIfPresent(String.self, forKey: .pageType)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(actionType, forKey: .actionType)
|
||||
try container.encodeIfPresent(requestURL, forKey: .requestURL)
|
||||
try container.encodeIfPresent(extraParameters, forKey: .extraParameters)
|
||||
try container.encodeIfPresent(analyticsData, forKey: .analyticsData)
|
||||
try container.encode(pageType, forKey: .pageType)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user