toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (gcsSource case final gcsSource?) 'gcsSource': gcsSource.toJson(),
  if (googleDriveSource case final googleDriveSource?)
    'googleDriveSource': googleDriveSource.toJson(),
  if (directUploadSource case final directUploadSource?)
    'directUploadSource': directUploadSource.toJson(),
  if (slackSource case final slackSource?)
    'slackSource': slackSource.toJson(),
  if (jiraSource case final jiraSource?) 'jiraSource': jiraSource.toJson(),
  if (sharePointSources case final sharePointSources?)
    'sharePointSources': sharePointSources.toJson(),
  if (name.isNotDefault) 'name': name,
  'displayName': displayName,
  if (description.isNotDefault) 'description': description,
  if (sizeBytes.isNotDefault) 'sizeBytes': sizeBytes.toString(),
  if (ragFileType.isNotDefault) 'ragFileType': ragFileType.toJson(),
  if (createTime case final createTime?) 'createTime': createTime.toJson(),
  if (updateTime case final updateTime?) 'updateTime': updateTime.toJson(),
  if (fileStatus case final fileStatus?) 'fileStatus': fileStatus.toJson(),
  if (userMetadata.isNotDefault) 'userMetadata': userMetadata,
};