diff --git a/generator/.DevConfigs/c49077d9-90b3-437f-b316-6d8d8833ae73.json b/generator/.DevConfigs/c49077d9-90b3-437f-b316-6d8d8833ae73.json new file mode 100644 index 000000000000..3a1b9218e539 --- /dev/null +++ b/generator/.DevConfigs/c49077d9-90b3-437f-b316-6d8d8833ae73.json @@ -0,0 +1,11 @@ +{ + "services": [ + { + "serviceName": "S3", + "type": "patch", + "changeLogMessages": [ + "Populate TransferUtilityDownloadDirectoryResponse with total objects downloaded" + ] + } + ] +} diff --git a/sdk/src/Services/S3/Custom/Transfer/Internal/_bcl+netstandard/DownloadDirectoryCommand.cs b/sdk/src/Services/S3/Custom/Transfer/Internal/_bcl+netstandard/DownloadDirectoryCommand.cs index be3fb4f0ae33..9382ab33b757 100644 --- a/sdk/src/Services/S3/Custom/Transfer/Internal/_bcl+netstandard/DownloadDirectoryCommand.cs +++ b/sdk/src/Services/S3/Custom/Transfer/Internal/_bcl+netstandard/DownloadDirectoryCommand.cs @@ -108,12 +108,16 @@ await asyncThrottler.WaitAsync(cancellationToken) var command = new DownloadCommand(this._s3Client, downloadRequest); var task = ExecuteCommandAsync(command, internalCts, asyncThrottler); + pendingTasks.Add(task); } await WhenAllOrFirstExceptionAsync(pendingTasks, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); - return new TransferUtilityDownloadDirectoryResponse(); + return new TransferUtilityDownloadDirectoryResponse + { + ObjectsDownloaded = _numberOfFilesDownloaded + }; } finally { diff --git a/sdk/src/Services/S3/Custom/Transfer/TransferUtilityDownloadDirectoryResponse.cs b/sdk/src/Services/S3/Custom/Transfer/TransferUtilityDownloadDirectoryResponse.cs index 6df0c1c5a619..098087e26143 100644 --- a/sdk/src/Services/S3/Custom/Transfer/TransferUtilityDownloadDirectoryResponse.cs +++ b/sdk/src/Services/S3/Custom/Transfer/TransferUtilityDownloadDirectoryResponse.cs @@ -22,5 +22,9 @@ namespace Amazon.S3.Transfer /// public class TransferUtilityDownloadDirectoryResponse { + /// + /// The number of objects that have been downloaded + /// + public long ObjectsDownloaded { get; set; } } }