From a4bf4faa0d4b6dac5a9633dac08952fba3617265 Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Thu, 6 Nov 2025 16:34:19 -0500 Subject: [PATCH] Populate TransferUtilityDownloadDirectoryResponse with total objects downloaded stack-info: PR: https://github.com/aws/aws-sdk-net/pull/4109, branch: GarrettBeatty/stacked/14 --- .../c49077d9-90b3-437f-b316-6d8d8833ae73.json | 11 +++++++++++ .../_bcl+netstandard/DownloadDirectoryCommand.cs | 6 +++++- .../TransferUtilityDownloadDirectoryResponse.cs | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 generator/.DevConfigs/c49077d9-90b3-437f-b316-6d8d8833ae73.json 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; } } }