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