BidiGenerateContentClientContent.fromJson constructor
BidiGenerateContentClientContent.fromJson(
- Object? j
Implementation
factory BidiGenerateContentClientContent.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return BidiGenerateContentClientContent(
turns: switch (json['turns']) {
null => [],
List<Object?> $1 => [for (final i in $1) Content.fromJson(i)],
_ => throw const FormatException('"turns" is not a list'),
},
turnComplete: switch (json['turnComplete']) {
null => false,
Object $1 => decodeBool($1),
},
);
}