/// <summary>
        ///     Downloads the content from Amazon S3 and writes it to the specified file.
        ///     If the key is not specified in the request parameter,
        ///     the file name will used as the key name.
        /// </summary>
        /// <param name="request">
        ///     Contains all the parameters required to download an Amazon S3 object.
        /// </param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task DownloadAsync(TransferUtilityDownloadRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            CheckForBlockedArn(request.BucketName, "Download");
            var command = new DownloadCommand(this._s3Client, request);

            return(command.ExecuteAsync(cancellationToken));
        }
        /// <summary>
        ///     Downloads the content from Amazon S3 and writes it to the specified file.
        ///     If the key is not specified in the request parameter,
        ///     the file name will used as the key name.
        /// </summary>
        /// <param name="request">
        ///     Contains all the parameters required to download an Amazon S3 object.
        /// </param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task DownloadAsync(TransferUtilityDownloadRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var command = new DownloadCommand(this._s3Client, request);

            return(command.ExecuteAsync(cancellationToken));
        }