|
@@ -0,0 +1,284 @@
|
|
|
+class FileTransferRecorderDetailDTO {
|
|
|
+ int partNumber;
|
|
|
+ String? partFileName;
|
|
|
+ int partFileSize;
|
|
|
+ bool isUploadComplete;
|
|
|
+
|
|
|
+ FileTransferRecorderDetailDTO({
|
|
|
+ this.partNumber = 0,
|
|
|
+ this.partFileName,
|
|
|
+ this.partFileSize = 0,
|
|
|
+ this.isUploadComplete = false,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory FileTransferRecorderDetailDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return FileTransferRecorderDetailDTO(
|
|
|
+ partNumber: map['PartNumber'],
|
|
|
+ partFileName: map['PartFileName'],
|
|
|
+ partFileSize: map['PartFileSize'],
|
|
|
+ isUploadComplete: map['IsUploadComplete'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ map['PartNumber'] = partNumber;
|
|
|
+ if(partFileName != null)
|
|
|
+ map['PartFileName'] = partFileName;
|
|
|
+ map['PartFileSize'] = partFileSize;
|
|
|
+ map['IsUploadComplete'] = isUploadComplete;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class FileTransferRecorderDTO {
|
|
|
+ String? filePath;
|
|
|
+ String? fileName;
|
|
|
+ String? host;
|
|
|
+ int fileSize;
|
|
|
+ bool isUploadComplete;
|
|
|
+ String? objectName;
|
|
|
+ bool isCopy;
|
|
|
+ List<FileTransferRecorderDetailDTO >? partList;
|
|
|
+
|
|
|
+ FileTransferRecorderDTO({
|
|
|
+ this.filePath,
|
|
|
+ this.fileName,
|
|
|
+ this.host,
|
|
|
+ this.fileSize = 0,
|
|
|
+ this.isUploadComplete = false,
|
|
|
+ this.objectName,
|
|
|
+ this.isCopy = false,
|
|
|
+ this.partList,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory FileTransferRecorderDTO.fromJson(Map<String, dynamic> map) {
|
|
|
+ return FileTransferRecorderDTO(
|
|
|
+ filePath: map['FilePath'],
|
|
|
+ fileName: map['FileName'],
|
|
|
+ host: map['Host'],
|
|
|
+ fileSize: map['FileSize'],
|
|
|
+ isUploadComplete: map['IsUploadComplete'],
|
|
|
+ objectName: map['ObjectName'],
|
|
|
+ isCopy: map['IsCopy'],
|
|
|
+ partList: map['PartList'] != null ? (map['PartList'] as List).map((e)=>FileTransferRecorderDetailDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(filePath != null)
|
|
|
+ map['FilePath'] = filePath;
|
|
|
+ if(fileName != null)
|
|
|
+ map['FileName'] = fileName;
|
|
|
+ if(host != null)
|
|
|
+ map['Host'] = host;
|
|
|
+ map['FileSize'] = fileSize;
|
|
|
+ map['IsUploadComplete'] = isUploadComplete;
|
|
|
+ if(objectName != null)
|
|
|
+ map['ObjectName'] = objectName;
|
|
|
+ map['IsCopy'] = isCopy;
|
|
|
+ if(partList != null)
|
|
|
+ map['PartList'] = partList;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class FileTransferRequest {
|
|
|
+ String? filePath;
|
|
|
+ String? fileName;
|
|
|
+ int divisionForUpload;
|
|
|
+ int sliceSizeForUpload;
|
|
|
+ bool isRechristen;
|
|
|
+ bool isCopy;
|
|
|
+
|
|
|
+ FileTransferRequest({
|
|
|
+ this.filePath,
|
|
|
+ this.fileName,
|
|
|
+ this.divisionForUpload = 0,
|
|
|
+ this.sliceSizeForUpload = 0,
|
|
|
+ this.isRechristen = false,
|
|
|
+ this.isCopy = false,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory FileTransferRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return FileTransferRequest(
|
|
|
+ filePath: map['FilePath'],
|
|
|
+ fileName: map['FileName'],
|
|
|
+ divisionForUpload: map['DivisionForUpload'],
|
|
|
+ sliceSizeForUpload: map['SliceSizeForUpload'],
|
|
|
+ isRechristen: map['IsRechristen'],
|
|
|
+ isCopy: map['IsCopy'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(filePath != null)
|
|
|
+ map['FilePath'] = filePath;
|
|
|
+ if(fileName != null)
|
|
|
+ map['FileName'] = fileName;
|
|
|
+ map['DivisionForUpload'] = divisionForUpload;
|
|
|
+ map['SliceSizeForUpload'] = sliceSizeForUpload;
|
|
|
+ map['IsRechristen'] = isRechristen;
|
|
|
+ map['IsCopy'] = isCopy;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class FileTransferAgainRequest {
|
|
|
+ String? filePath;
|
|
|
+ String? host;
|
|
|
+ bool isCopy;
|
|
|
+ List<FileTransferRecorderDetailDTO >? partList;
|
|
|
+
|
|
|
+ FileTransferAgainRequest({
|
|
|
+ this.filePath,
|
|
|
+ this.host,
|
|
|
+ this.isCopy = false,
|
|
|
+ this.partList,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory FileTransferAgainRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return FileTransferAgainRequest(
|
|
|
+ filePath: map['FilePath'],
|
|
|
+ host: map['Host'],
|
|
|
+ isCopy: map['IsCopy'],
|
|
|
+ partList: map['PartList'] != null ? (map['PartList'] as List).map((e)=>FileTransferRecorderDetailDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(filePath != null)
|
|
|
+ map['FilePath'] = filePath;
|
|
|
+ if(host != null)
|
|
|
+ map['Host'] = host;
|
|
|
+ map['IsCopy'] = isCopy;
|
|
|
+ if(partList != null)
|
|
|
+ map['PartList'] = partList;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class MarshalByRefObject {
|
|
|
+
|
|
|
+ MarshalByRefObject();
|
|
|
+
|
|
|
+ factory MarshalByRefObject.fromJson(Map<String, dynamic> map) {
|
|
|
+ return MarshalByRefObject(
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class Stream extends MarshalByRefObject{
|
|
|
+ bool canRead;
|
|
|
+ bool canWrite;
|
|
|
+ bool canSeek;
|
|
|
+ bool canTimeout;
|
|
|
+ int length;
|
|
|
+ int position;
|
|
|
+ int readTimeout;
|
|
|
+ int writeTimeout;
|
|
|
+
|
|
|
+ Stream({
|
|
|
+ this.canRead = false,
|
|
|
+ this.canWrite = false,
|
|
|
+ this.canSeek = false,
|
|
|
+ this.canTimeout = false,
|
|
|
+ this.length = 0,
|
|
|
+ this.position = 0,
|
|
|
+ this.readTimeout = 0,
|
|
|
+ this.writeTimeout = 0,
|
|
|
+ }) : super(
|
|
|
+ );
|
|
|
+
|
|
|
+ factory Stream.fromJson(Map<String, dynamic> map) {
|
|
|
+ return Stream(
|
|
|
+ canRead: map['CanRead'],
|
|
|
+ canWrite: map['CanWrite'],
|
|
|
+ canSeek: map['CanSeek'],
|
|
|
+ canTimeout: map['CanTimeout'],
|
|
|
+ length: map['Length'],
|
|
|
+ position: map['Position'],
|
|
|
+ readTimeout: map['ReadTimeout'],
|
|
|
+ writeTimeout: map['WriteTimeout'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ map['CanRead'] = canRead;
|
|
|
+ map['CanWrite'] = canWrite;
|
|
|
+ map['CanSeek'] = canSeek;
|
|
|
+ map['CanTimeout'] = canTimeout;
|
|
|
+ map['Length'] = length;
|
|
|
+ map['Position'] = position;
|
|
|
+ map['ReadTimeout'] = readTimeout;
|
|
|
+ map['WriteTimeout'] = writeTimeout;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class DownloadFileResult {
|
|
|
+ Stream? merageFileStream;
|
|
|
+ int fileSize;
|
|
|
+
|
|
|
+ DownloadFileResult({
|
|
|
+ this.merageFileStream,
|
|
|
+ this.fileSize = 0,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory DownloadFileResult.fromJson(Map<String, dynamic> map) {
|
|
|
+ return DownloadFileResult(
|
|
|
+ merageFileStream: map['MerageFileStream'] != null ? Stream.fromJson(map['MerageFileStream']) : null,
|
|
|
+ fileSize: map['FileSize'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(merageFileStream != null)
|
|
|
+ map['MerageFileStream'] = merageFileStream;
|
|
|
+ map['FileSize'] = fileSize;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class DownloadFileRequest {
|
|
|
+ String? fileName;
|
|
|
+ String? host;
|
|
|
+ List<FileTransferRecorderDetailDTO >? downloadFileList;
|
|
|
+
|
|
|
+ DownloadFileRequest({
|
|
|
+ this.fileName,
|
|
|
+ this.host,
|
|
|
+ this.downloadFileList,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory DownloadFileRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return DownloadFileRequest(
|
|
|
+ fileName: map['FileName'],
|
|
|
+ host: map['Host'],
|
|
|
+ downloadFileList: map['DownloadFileList'] != null ? (map['DownloadFileList'] as List).map((e)=>FileTransferRecorderDetailDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(fileName != null)
|
|
|
+ map['FileName'] = fileName;
|
|
|
+ if(host != null)
|
|
|
+ map['Host'] = host;
|
|
|
+ if(downloadFileList != null)
|
|
|
+ map['DownloadFileList'] = downloadFileList;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|