toMap method

  1. @override
Map<String, Object?> toMap()
override

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'type': type,
    'toolUseId': toolUseId,
    'content': content.map((e) => e.toMap()).toList(),
    if (structuredContent != null) 'structuredContent': structuredContent,
    if (isError != null) 'isError': isError,
    if (annotations != null) 'annotations': annotations!.toMap(),
    if ($meta != null) '_meta': $meta!.toMap(),
  };
}