toJson method

  1. @override
Object toJson()
override

Implementation

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