toDecryptedDocumentDto method

DecryptedDocumentDto toDecryptedDocumentDto()

Implementation

DecryptedDocumentDto toDecryptedDocumentDto() => DecryptedDocumentDto(
  id: this.id?.also((it) {
        if (!Uuid.isValidUUID(fromString: it)) {
          throw FormatException("Invalid id, id must be a valid UUID");
        }
      }) ??
      uuid.v4(options: {'rng': UuidUtil.cryptoRNG}),
  otherUtis: this.otherUtis,
  rev: this.rev,
  created: this.created,
  modified: this.modified,
  author: this.author,
  responsible: this.responsible,
  medicalLocationId: this.medicalLocationId,
  deletionDate: this.deletionDate,
  objectStoreReference: this.objectStoreReference,
  mainUti: this.mainUti,
  name: this.name,
  version: this.version,
  externalUuid: this.externalUuid,
  size: this.size,
  hash: this.hash,
  attachmentId: this.attachmentId,
);