Skip to content

Conversation

GarrettBeatty
Copy link
Contributor

@GarrettBeatty GarrettBeatty commented Aug 28, 2025

Description

TransferDownloadDirectoryRequest currently has fields which are already located in BaseDownloadRequest. This change makes TransferDownloadDirectoryRequest extend BaseDownloadRequest so that we dont have to duplicate fields.

In the next PR, we will be adding more common fields to BaseDownloadRequest (in order to comply with having all of the required s3 fields in our high level Transfer Utility Request). To make it easier to review I am separating the changes into multiple PRs (this PR and future PRs)

Motivation and Context

DOTNET-8277

Testing

dry run - 52990dbb-1153-40cc-aad0-04c8b6c39b70 pass

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@GarrettBeatty GarrettBeatty requested a review from Copilot August 29, 2025 01:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the TransferUtilityDownloadDirectoryRequest class to inherit from BaseDownloadRequest, eliminating code duplication by removing redundant fields that already exist in the base class.

  • Converts TransferUtilityDownloadDirectoryRequest from a standalone class to inherit from BaseDownloadRequest
  • Removes duplicate field definitions for properties like BucketName, ModifiedSinceDate, UnmodifiedSinceDate, and server-side encryption settings
  • Maintains existing functionality while leveraging inheritance for common download request properties

@GarrettBeatty GarrettBeatty marked this pull request as ready for review August 29, 2025 18:14
/// The <c>UnmodifiedSinceDate</c> property.
/// </value>
public DateTime UnmodifiedSinceDate
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check that the behavior isn't different? In the BaseDownloadRequest I see
https://github.com/aws/aws-sdk-net/blob/main/sdk/src/Services/S3/Custom/Transfer/BaseDownloadRequest.cs#L145-L152

there is some extra logic. Same goes for ModifiedSinceDate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch ill have to double check this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants