toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final allowedRoomIds = this.allowedRoomIds;
  final encryption = this.encryption;
  final roomType = this.roomType;
  final roomVersion = this.roomVersion;
  return {
    if (allowedRoomIds != null)
      'allowed_room_ids': allowedRoomIds.map((v) => v).toList(),
    'children_state': childrenState.map((v) => v.toJson()).toList(),
    if (encryption != null) 'encryption': encryption,
    if (roomType != null) 'room_type': roomType,
    if (roomVersion != null) 'room_version': roomVersion,
  };
}