CachedContent_UsageMetadata.fromJson constructor
CachedContent_UsageMetadata.fromJson(
- Object? j
Implementation
factory CachedContent_UsageMetadata.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return CachedContent_UsageMetadata(
totalTokenCount: switch (json['totalTokenCount']) {
null => 0,
Object $1 => decodeInt($1),
},
textCount: switch (json['textCount']) {
null => 0,
Object $1 => decodeInt($1),
},
imageCount: switch (json['imageCount']) {
null => 0,
Object $1 => decodeInt($1),
},
videoDurationSeconds: switch (json['videoDurationSeconds']) {
null => 0,
Object $1 => decodeInt($1),
},
audioDurationSeconds: switch (json['audioDurationSeconds']) {
null => 0,
Object $1 => decodeInt($1),
},
);
}