toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (setupComplete case final setupComplete?)
    'setupComplete': setupComplete.toJson(),
  if (serverContent case final serverContent?)
    'serverContent': serverContent.toJson(),
  if (toolCall case final toolCall?) 'toolCall': toolCall.toJson(),
  if (toolCallCancellation case final toolCallCancellation?)
    'toolCallCancellation': toolCallCancellation.toJson(),
  if (goAway case final goAway?) 'goAway': goAway.toJson(),
  if (sessionResumptionUpdate case final sessionResumptionUpdate?)
    'sessionResumptionUpdate': sessionResumptionUpdate.toJson(),
  if (usageMetadata case final usageMetadata?)
    'usageMetadata': usageMetadata.toJson(),
};