mirror of
https://github.com/home-assistant/iOS.git
synced 2026-02-05 06:35:37 -06:00
- Updates several dependencies - Removes Lokalise -- if we can't do it on Catalyst, it doesn't feel worth it to do it elsewhere - Migrates the NotificationTestCases from a Podspec that keeps having issues to a fastlane script which copies in the latest ones
30 lines
841 B
Swift
30 lines
841 B
Swift
import Foundation
|
|
|
|
class SubscribeEvents: WebSocketMessage {
|
|
public var EventType: String = ""
|
|
|
|
private enum CodingKeys: String, CodingKey {
|
|
case EventType = "event_type"
|
|
}
|
|
|
|
init(eventType: String) {
|
|
super.init("subscribe_events")
|
|
self.EventType = eventType
|
|
}
|
|
|
|
required init(from decoder: Decoder) throws {
|
|
let values = try decoder.container(keyedBy: CodingKeys.self)
|
|
let superdecoder = try values.superDecoder()
|
|
try super.init(from: superdecoder)
|
|
|
|
self.EventType = try values.decode(String.self, forKey: .EventType)
|
|
}
|
|
|
|
override public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encode(EventType, forKey: .EventType)
|
|
|
|
try super.encode(to: encoder)
|
|
}
|
|
}
|