Map<String, Object?> toJson() { final nextBatch = this.nextBatch; return { if (nextBatch != null) 'next_batch': nextBatch, 'rooms': rooms.map((v) => v.toJson()).toList(), }; }