     
     public func encode(to encoder: Encoder) throws {
         throw SoraError.invalidSignalingMessage
+    }
+    
+}
+
+private var eventTypeTable: PairTable<String, SignalingNotificationEventType> =
+    PairTable(name: "SignalingNotificationEventType",
+              pairs: [("connection.created", .connectionCreated),
+                      ("connection.updated", .connectionUpdated),
+                      ("connection.destroyed", .connectionDestroyed),
+                      ("spotlight.changed", .spotlightChanged),
+                      ("network.status", .networkStatus)])
+
+/// :nodoc:
+extension SignalingNotificationEventType: Codable {
+    
+    public init(from decoder: Decoder) throws {
+        self = try eventTypeTable.decode(from: decoder)
+    }
+    
+    public func encode(to encoder: Encoder) throws {
+        try eventTypeTable.encode(self, to: encoder)
     }
     
 }

    
    public init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        eventType = SignalingNotificationEventType(rawValue:
            try container.decode(String.self, forKey: .eventType))!
        
        if let raw = try container.decodeIfPresent(String.self, forKey: .role) {
            role = SignalingRole(rawValue: raw)
        } else {
            role = nil
        }
        
        connectionTime = try container.decodeIfPresent(Int.self, forKey: .connectionTime)
        connectionCount = try container.decodeIfPresent(Int.self, forKey: .connectionCount)
        publisherCount = try container.decodeIfPresent(Int.self, forKey: .publisherCount)

public enum SignalingNotificationEventType: String {
    
    /// "connection.created"
    case connectionCreated
    
    /// "connection.updated"
    case connectionUpdated
    
    /// "connection.destroyed"
    case connectionDestroyed
    
    /// "spotlight.changed"
    case spotlightChanged
    
    /// "network.status"
    case networkStatus
    
}

