BidiGenerateContentServerMessage.fromJson constructor
BidiGenerateContentServerMessage.fromJson(
- Map<String, dynamic> json
)
Implementation
factory BidiGenerateContentServerMessage.fromJson(Map<String, dynamic> json) {
return BidiGenerateContentServerMessage(
setupComplete: decode(
json['setupComplete'],
BidiGenerateContentSetupComplete.fromJson,
),
serverContent: decode(
json['serverContent'],
BidiGenerateContentServerContent.fromJson,
),
toolCall: decode(json['toolCall'], BidiGenerateContentToolCall.fromJson),
toolCallCancellation: decode(
json['toolCallCancellation'],
BidiGenerateContentToolCallCancellation.fromJson,
),
goAway: decode(json['goAway'], GoAway.fromJson),
sessionResumptionUpdate: decode(
json['sessionResumptionUpdate'],
SessionResumptionUpdate.fromJson,
),
usageMetadata: decode(json['usageMetadata'], UsageMetadata.fromJson),
);
}