/* Options: Date: 2026-09-21 23:27:02 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.dev.dynamics.trendsic.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: AttachmentVersionRestoreRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; class Attachment implements IConvertible { String? AttachmentId; String? TableName; String? FieldName; int? RecordId; String? AttachmentName; String? MimeType; Uint8List? AttachmentData = []; double? FileSizeInKB; DateTime? CreatedDate; String? CreatedBy; bool? NeedsOCR; DateTime? OCRDate; bool? IsSecurities; String? AWSKey; String? PresignedUrl; Attachment({this.AttachmentId,this.TableName,this.FieldName,this.RecordId,this.AttachmentName,this.MimeType,this.AttachmentData,this.FileSizeInKB,this.CreatedDate,this.CreatedBy,this.NeedsOCR,this.OCRDate,this.IsSecurities,this.AWSKey,this.PresignedUrl}); Attachment.fromJson(Map json) { fromMap(json); } fromMap(Map json) { AttachmentId = json['AttachmentId']; TableName = json['TableName']; FieldName = json['FieldName']; RecordId = json['RecordId']; AttachmentName = json['AttachmentName']; MimeType = json['MimeType']; AttachmentData = JsonConverters.fromJson(json['AttachmentData'],'Uint8List',context!); FileSizeInKB = JsonConverters.toDouble(json['FileSizeInKB']); CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!); CreatedBy = json['CreatedBy']; NeedsOCR = json['NeedsOCR']; OCRDate = JsonConverters.fromJson(json['OCRDate'],'DateTime',context!); IsSecurities = json['IsSecurities']; AWSKey = json['AWSKey']; PresignedUrl = json['PresignedUrl']; return this; } Map toJson() => { 'AttachmentId': AttachmentId, 'TableName': TableName, 'FieldName': FieldName, 'RecordId': RecordId, 'AttachmentName': AttachmentName, 'MimeType': MimeType, 'AttachmentData': JsonConverters.toJson(AttachmentData,'Uint8List',context!), 'FileSizeInKB': FileSizeInKB, 'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!), 'CreatedBy': CreatedBy, 'NeedsOCR': NeedsOCR, 'OCRDate': JsonConverters.toJson(OCRDate,'DateTime',context!), 'IsSecurities': IsSecurities, 'AWSKey': AWSKey, 'PresignedUrl': PresignedUrl }; getTypeName() => "Attachment"; TypeContext? context = _ctx; } class AttachmentVersion implements IConvertible { int? AttachmentVersionId; String? AttachmentId; int? VersionNo; String? AttachmentName; String? MimeType; double? FileSizeInKB; String? AWSKey; String? RevisionLabel; String? Notes; int? RestoredFromVersionNo; String? UploadedBy; DateTime? UploadedAt; bool? IsCurrent; String? DownloadUrl; AttachmentVersion({this.AttachmentVersionId,this.AttachmentId,this.VersionNo,this.AttachmentName,this.MimeType,this.FileSizeInKB,this.AWSKey,this.RevisionLabel,this.Notes,this.RestoredFromVersionNo,this.UploadedBy,this.UploadedAt,this.IsCurrent,this.DownloadUrl}); AttachmentVersion.fromJson(Map json) { fromMap(json); } fromMap(Map json) { AttachmentVersionId = json['AttachmentVersionId']; AttachmentId = json['AttachmentId']; VersionNo = json['VersionNo']; AttachmentName = json['AttachmentName']; MimeType = json['MimeType']; FileSizeInKB = JsonConverters.toDouble(json['FileSizeInKB']); AWSKey = json['AWSKey']; RevisionLabel = json['RevisionLabel']; Notes = json['Notes']; RestoredFromVersionNo = json['RestoredFromVersionNo']; UploadedBy = json['UploadedBy']; UploadedAt = JsonConverters.fromJson(json['UploadedAt'],'DateTime',context!); IsCurrent = json['IsCurrent']; DownloadUrl = json['DownloadUrl']; return this; } Map toJson() => { 'AttachmentVersionId': AttachmentVersionId, 'AttachmentId': AttachmentId, 'VersionNo': VersionNo, 'AttachmentName': AttachmentName, 'MimeType': MimeType, 'FileSizeInKB': FileSizeInKB, 'AWSKey': AWSKey, 'RevisionLabel': RevisionLabel, 'Notes': Notes, 'RestoredFromVersionNo': RestoredFromVersionNo, 'UploadedBy': UploadedBy, 'UploadedAt': JsonConverters.toJson(UploadedAt,'DateTime',context!), 'IsCurrent': IsCurrent, 'DownloadUrl': DownloadUrl }; getTypeName() => "AttachmentVersion"; TypeContext? context = _ctx; } class AttachmentVersionResponse implements IConvertible { ResponseStatus? ResponseStatus; String? AttachmentId; List? Versions = []; int? CurrentVersionNo; Attachment? Head; AttachmentVersionResponse({this.ResponseStatus,this.AttachmentId,this.Versions,this.CurrentVersionNo,this.Head}); AttachmentVersionResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); AttachmentId = json['AttachmentId']; Versions = JsonConverters.fromJson(json['Versions'],'List',context!); CurrentVersionNo = json['CurrentVersionNo']; Head = JsonConverters.fromJson(json['Head'],'Attachment',context!); return this; } Map toJson() => { 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!), 'AttachmentId': AttachmentId, 'Versions': JsonConverters.toJson(Versions,'List',context!), 'CurrentVersionNo': CurrentVersionNo, 'Head': JsonConverters.toJson(Head,'Attachment',context!) }; getTypeName() => "AttachmentVersionResponse"; TypeContext? context = _ctx; } // @Route("/v1/AttachmentVersion/{AttachmentId}/{VersionNo}/restore", "POST,OPTIONS") class AttachmentVersionRestoreRequest implements IReturn, IConvertible, IPost { String? AttachmentId; int? VersionNo; String? Notes; AttachmentVersionRestoreRequest({this.AttachmentId,this.VersionNo,this.Notes}); AttachmentVersionRestoreRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { AttachmentId = json['AttachmentId']; VersionNo = json['VersionNo']; Notes = json['Notes']; return this; } Map toJson() => { 'AttachmentId': AttachmentId, 'VersionNo': VersionNo, 'Notes': Notes }; createResponse() => AttachmentVersionResponse(); getResponseTypeName() => "AttachmentVersionResponse"; getTypeName() => "AttachmentVersionRestoreRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: { 'Attachment': TypeInfo(TypeOf.Class, create:() => Attachment()), 'Uint8List': TypeInfo(TypeOf.Class, create:() => Uint8List(0)), 'AttachmentVersion': TypeInfo(TypeOf.Class, create:() => AttachmentVersion()), 'AttachmentVersionResponse': TypeInfo(TypeOf.Class, create:() => AttachmentVersionResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'AttachmentVersionRestoreRequest': TypeInfo(TypeOf.Class, create:() => AttachmentVersionRestoreRequest()), });