Map<String, dynamic> toJson() => { 'queue': queue, if (threadId != null) 'thread_id': threadId, if (prompt.isNotEmpty) 'prompt': prompt.map((entry) => entry.toJson()).toList(), 'minutes': minutes, };