@override Object toJson() { return { 'channels': encodeList(channels), if (apiKeyConfig != null) 'apiKeyConfig': apiKeyConfig!.toJson(), }; }