RagFile.fromJson constructor
RagFile.fromJson(
- Object? j
Implementation
factory RagFile.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return RagFile(
gcsSource: switch (json['gcsSource']) {
null => null,
Object $1 => GcsSource.fromJson($1),
},
googleDriveSource: switch (json['googleDriveSource']) {
null => null,
Object $1 => GoogleDriveSource.fromJson($1),
},
directUploadSource: switch (json['directUploadSource']) {
null => null,
Object $1 => DirectUploadSource.fromJson($1),
},
slackSource: switch (json['slackSource']) {
null => null,
Object $1 => SlackSource.fromJson($1),
},
jiraSource: switch (json['jiraSource']) {
null => null,
Object $1 => JiraSource.fromJson($1),
},
sharePointSources: switch (json['sharePointSources']) {
null => null,
Object $1 => SharePointSources.fromJson($1),
},
name: switch (json['name']) {
null => '',
Object $1 => decodeString($1),
},
displayName: switch (json['displayName']) {
null => '',
Object $1 => decodeString($1),
},
description: switch (json['description']) {
null => '',
Object $1 => decodeString($1),
},
sizeBytes: switch (json['sizeBytes']) {
null => 0,
Object $1 => decodeInt64($1),
},
ragFileType: switch (json['ragFileType']) {
null => RagFile_RagFileType.$default,
Object $1 => RagFile_RagFileType.fromJson($1),
},
createTime: switch (json['createTime']) {
null => null,
Object $1 => protobuf.Timestamp.fromJson($1),
},
updateTime: switch (json['updateTime']) {
null => null,
Object $1 => protobuf.Timestamp.fromJson($1),
},
fileStatus: switch (json['fileStatus']) {
null => null,
Object $1 => FileStatus.fromJson($1),
},
userMetadata: switch (json['userMetadata']) {
null => '',
Object $1 => decodeString($1),
},
);
}