toWire method

Map<String, Object?> toWire()

Implementation

Map<String, Object?> toWire() {
  final map = <String, Object?>{};
  map['id'] = this.id;
  map['status'] = this.status.name;
  final _messages = this.messages;
  if (_messages != null) {
    map['messages'] = _messages.map((e) => e.toWire()).toList();
  }
  final _toolCalls = this.toolCalls;
  if (_toolCalls != null) {
    map['toolCalls'] = _toolCalls.map((e) => e.toWire()).toList();
  }
  final _activeTool = this.activeTool;
  if (_activeTool != null) {
    map['activeTool'] = _activeTool;
  }
  final _turns = this.turns;
  if (_turns != null) {
    map['turns'] = _turns;
  }
  return map;
}