toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      "id": encodeValue(id),
      "purpose": encodeValue(purpose),
      "status": encodeValue(status),
      "scan_status": encodeValue(scanStatus),
      if (name != null) "name": encodeValue(name),
      if (filename != null) "filename": encodeValue(filename),
      "content_type": encodeValue(contentType),
      "size": encodeValue(size),
      "checksum_sha256": encodeValue(checksumSha256),
      "created_by": encodeValue(createdBy),
      "source": encodeValue(source),
      if (media != null) "media": encodeValue(media),
      "storage": encodeValue(storage),
      if (delivery != null) "delivery": encodeValue(delivery),
      if (latestError != null) "latest_error": encodeValue(latestError),
      if (customData != null) "custom_data": encodeValue(customData),
      if (metadata != null) "metadata": encodeValue(metadata),
      "created_at": encodeValue(createdAt),
      "updated_at": encodeValue(updatedAt),
      if (availableAt != null) "available_at": encodeValue(availableAt),
      if (expiresAt != null) "expires_at": encodeValue(expiresAt),
    };