DownloadQuery constructor

DownloadQuery({
  1. List<String>? query,
  2. String? startedBefore,
  3. String? startedAfter,
  4. String? endedBefore,
  5. String? endedAfter,
  6. double? totalBytesGreater,
  7. double? totalBytesLess,
  8. String? filenameRegex,
  9. String? urlRegex,
  10. String? finalUrlRegex,
  11. int? limit,
  12. List<String>? orderBy,
  13. int? id,
  14. String? url,
  15. String? finalUrl,
  16. String? filename,
  17. DangerType? danger,
  18. String? mime,
  19. String? startTime,
  20. String? endTime,
  21. State? state,
  22. bool? paused,
  23. InterruptReason? error,
  24. double? bytesReceived,
  25. double? totalBytes,
  26. double? fileSize,
  27. bool? exists,
})

Implementation

DownloadQuery({
  /// This array of search terms limits results to [DownloadItem] whose
  /// `filename` or `url` or `finalUrl`
  /// contain all of the search terms that do not begin with a dash '-' and
  /// none of the search terms that do begin with a dash.
  List<String>? query,

  /// Limits results to [DownloadItem] that
  /// started before the given ms since the epoch.
  String? startedBefore,

  /// Limits results to [DownloadItem] that
  /// started after the given ms since the epoch.
  String? startedAfter,

  /// Limits results to [DownloadItem] that ended before the given ms since
  /// the
  /// epoch.
  String? endedBefore,

  /// Limits results to [DownloadItem] that ended after the given ms since the
  /// epoch.
  String? endedAfter,

  /// Limits results to [DownloadItem] whose
  /// `totalBytes` is greater than the given integer.
  double? totalBytesGreater,

  /// Limits results to [DownloadItem] whose
  /// `totalBytes` is less than the given integer.
  double? totalBytesLess,

  /// Limits results to [DownloadItem] whose
  /// `filename` matches the given regular expression.
  String? filenameRegex,

  /// Limits results to [DownloadItem] whose
  /// `url` matches the given regular expression.
  String? urlRegex,

  /// Limits results to [DownloadItem] whose
  /// `finalUrl` matches the given regular expression.
  String? finalUrlRegex,

  /// The maximum number of matching [DownloadItem] returned. Defaults to
  /// 1000. Set to 0 in order to return all matching [DownloadItem]. See
  /// [search] for how to page through results.
  int? limit,

  /// Set elements of this array to [DownloadItem] properties in order to
  /// sort search results. For example, setting
  /// `orderBy=['startTime']` sorts the [DownloadItem] by their
  /// start time in ascending order. To specify descending order, prefix with
  /// a
  /// hyphen: '-startTime'.
  List<String>? orderBy,

  /// The `id` of the [DownloadItem] to query.
  int? id,

  /// The absolute URL that this download initiated from, before any
  /// redirects.
  String? url,

  /// The absolute URL that this download is being made from, after all
  /// redirects.
  String? finalUrl,

  /// Absolute local path.
  String? filename,

  /// Indication of whether this download is thought to be safe or known to be
  /// suspicious.
  DangerType? danger,

  /// The file's MIME type.
  String? mime,

  /// The time when the download began in ISO 8601 format.
  String? startTime,

  /// The time when the download ended in ISO 8601 format.
  String? endTime,

  /// Indicates whether the download is progressing, interrupted, or complete.
  State? state,

  /// True if the download has stopped reading data from the host, but kept
  /// the
  /// connection open.
  bool? paused,

  /// Why a download was interrupted.
  InterruptReason? error,

  /// Number of bytes received so far from the host, without considering file
  /// compression.
  double? bytesReceived,

  /// Number of bytes in the whole file, without considering file compression,
  /// or -1 if unknown.
  double? totalBytes,

  /// Number of bytes in the whole file post-decompression, or -1 if unknown.
  double? fileSize,

  /// Whether the downloaded file exists;
  bool? exists,
}) : _wrapped = $js.DownloadQuery(
        query: query?.toJSArray((e) => e),
        startedBefore: startedBefore,
        startedAfter: startedAfter,
        endedBefore: endedBefore,
        endedAfter: endedAfter,
        totalBytesGreater: totalBytesGreater,
        totalBytesLess: totalBytesLess,
        filenameRegex: filenameRegex,
        urlRegex: urlRegex,
        finalUrlRegex: finalUrlRegex,
        limit: limit,
        orderBy: orderBy?.toJSArray((e) => e),
        id: id,
        url: url,
        finalUrl: finalUrl,
        filename: filename,
        danger: danger?.toJS,
        mime: mime,
        startTime: startTime,
        endTime: endTime,
        state: state?.toJS,
        paused: paused,
        error: error?.toJS,
        bytesReceived: bytesReceived,
        totalBytes: totalBytes,
        fileSize: fileSize,
        exists: exists,
      );