 extension SignalingConnect: Encodable {
     
     enum CodingKeys: String, CodingKey {
-        case type
         case role
         case channel_id
         case metadata

extension SignalingCandidate: Encodable {
    
    enum CodingKeys: String, CodingKey {
        case type
        case candidate
    }
    
    public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)
        try container.encode(SignalingType.candidate.rawValue, forKey: .type)
        try container.encode(candidate, forKey: .candidate)
    }
    

}

/// :nodoc:
extension SignalingNotifyConnection: Decodable {
    
    enum CodingKeys: String, CodingKey {
        case role
        case client_id
        case connection_id
        case audio
        case video
        case metadata
        case metadata_list
        case minutes
        case channel_connections
        case channel_upstream_connections
        case channel_downstream_connections
    }
    
    public init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        role = try container.decode(Role.self, forKey: .role)
        clientId = try container.decodeIfPresent(String.self, forKey: .client_id)
        connectionId = try container.decodeIfPresent(String.self, forKey: .connection_id)
        audio = try container.decodeIfPresent(Bool.self, forKey: .connection_id)
        video = try container.decodeIfPresent(Bool.self, forKey: .video)
        metadata = try container.decodeIfPresent(Metadata.self, forKey: .metadata)
        metadataList =
            try container.decode([MetadataElement].self,
                                 forKey: .metadata_list)
        minutes = try container.decode(Int.self, forKey: .minutes)
        channelConnections =
            try container.decode(Int.self, forKey: .channel_connections)
        channelUpstreamConnections =
            try container.decode(Int.self, forKey: .channel_upstream_connections)
        channelDownstreamConnections =
            try container.decode(Int.self, forKey: .channel_downstream_connections)
    }
    
}

/// :nodoc:
extension SignalingNotifySpotlightChanged: Decodable {
    
    enum CodingKeys: String, CodingKey {
        case client_id
        case connection_id
        case spotlight_id
        case fixed
        case audio
        case video
    }
    
    public init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        clientId = try container.decode(String?.self, forKey: .client_id)
        connectionId = try container.decode(String?.self, forKey: .connection_id)
        spotlightId = try container.decode(String.self, forKey: .spotlight_id)
        fixed = try container.decodeIfPresent(Bool.self, forKey: .fixed)
        audio = try container.decodeIfPresent(Bool.self, forKey: .audio)
        video = try container.decodeIfPresent(Bool.self, forKey: .video)
    }
    
}

/// :nodoc:
extension SignalingNotifyNetworkStatus: Decodable {
    
    enum CodingKeys: String, CodingKey {
        case unstable_level
    }
    
    public init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        unstableLevel = try container.decode(Int.self, forKey: .unstable_level)
    }
    
}

/// :nodoc:
extension SignalingPong: Encodable {
    
    public func encode(to encoder: Encoder) throws {
        // エンコードするプロパティはない
    }
    
}
