jsonMap method
Implementation
@override
Map<String, Object> jsonMap({int serializeParentRecursionDepth: 0}) {
Map<String, Object> map = new Map<String, Object>()
..['channelId'] = channelId;
if (parent != null) {
map['parent'] = ((serializeParentRecursionDepth != 0)
? parent!.jsonMap(
serializeParentRecursionDepth: serializeParentRecursionDepth - 1)
: parent!.channelId);
}
if (links.isNotEmpty) {
map['links'] = links.map((Channel channel) => channel.channelId).toList();
}
if (name != null) {
map['name'] = name!;
}
if (description != null) {
map['description'] = description!;
}
if (temporary != null) {
map['temporary'] = temporary!;
}
if (position != null) {
map['position'] = position!;
}
if (descriptionHash != null) {
map['descriptionHash'] = descriptionHash!;
}
if (maxUsers != null) {
map['maxUsers'] = maxUsers!;
}
return map;
}