Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions generator/.DevConfigs/d31339e8-845c-4988-8657-8840683fe4b2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"services": [
{
"serviceName": "S3",
"type": "patch",
"changeLogMessages": [
"Update TransferDownloadDirectoryRequest to extend BaseDownloadRequest."
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,47 +36,13 @@ namespace Amazon.S3.Transfer
/// <summary>
/// Request object for downloading a directory with the TransferUtility.
/// </summary>
public class TransferUtilityDownloadDirectoryRequest
public class TransferUtilityDownloadDirectoryRequest : BaseDownloadRequest
{
private string bucketName;
private string s3Directory;
private string localDirectory;
private bool downloadFilesConcurrently = false;
private DateTime? modifiedSinceDate;
private DateTime? unmodifiedSinceDate;
private bool disableSlashCorrection = false;

private ServerSideEncryptionCustomerMethod serverSideCustomerEncryption;
private string serverSideEncryptionCustomerProvidedKey;
private string serverSideEncryptionCustomerProvidedKeyMD5;

private RequestPayer requestPayer;

/// <summary>
/// Gets or sets the name of the bucket.
/// </summary>
/// <value>
/// The name of the bucket.
/// </value>
public string BucketName
{
get { return this.bucketName; }
set { this.bucketName = value; }
}

/// <summary>
/// Gets whether or not the bucket name is set.
/// </summary>
/// <returns>
/// A value of <c>true</c> if the bucket name is set.
/// Otherwise, returns <c>false</c>.
/// </returns>
internal bool IsSetBucketName()
{
return !System.String.IsNullOrEmpty(this.bucketName);
}


/// <summary>
/// Gets or sets the local directory where objects from Amazon S3 will be downloaded.
/// If the directory doesn't exist, it will be created.
Expand Down Expand Up @@ -132,51 +98,6 @@ internal bool IsSetS3Directory()
return !System.String.IsNullOrEmpty(this.s3Directory);
}

/// <summary>
/// Gets or sets the <c>ModifiedSinceDate</c> property.
/// Only objects that have been modified since this date will be
/// downloaded.
/// </summary>
/// <value>
/// The <c>ModifiedSinceDate</c> property.
/// </value>
public DateTime ModifiedSinceDate
{
get { return this.modifiedSinceDate.GetValueOrDefault(); }
set { this.modifiedSinceDate = value; }
}

/// <summary>
/// Checks if ModifiedSinceDate property is set.
/// </summary>
/// <returns>A value of <c>true</c> if ModifiedSinceDate property is set.
/// Otherwise, returns <c>false</c>.</returns>
internal bool IsSetModifiedSinceDate()
{
return modifiedSinceDate.HasValue;
}

/// <summary>
/// Gets or sets the <c>UnmodifiedSinceDate</c> property.
/// Only objects that have not been modified since this date will be downloaded.
/// </summary>
/// <value>
/// 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

get { return this.unmodifiedSinceDate.GetValueOrDefault(); }
set { this.unmodifiedSinceDate = value; }
}

/// <summary>
/// Checks if UnmodifiedSinceDate property is set.
/// </summary>
/// <returns>true if UnmodifiedSinceDate property is set.</returns>
internal bool IsSetUnmodifiedSinceDate()
{
return unmodifiedSinceDate.HasValue;
}

/// <summary>
/// Gets or sets the DownloadFilesConcurrently property.
Expand Down Expand Up @@ -205,56 +126,6 @@ public bool DisableSlashCorrection
set { this.disableSlashCorrection = value; }
}

/// <summary>
/// The Server-side encryption algorithm to be used with the customer provided key.
/// </summary>
public ServerSideEncryptionCustomerMethod ServerSideEncryptionCustomerMethod
{
get { return this.serverSideCustomerEncryption; }
set { this.serverSideCustomerEncryption = value; }
}

/// <summary>
/// The base64-encoded encryption key for Amazon S3 to use to decrypt the object
/// <para>
/// Using the encryption key you provide as part of your request Amazon S3 manages both the encryption, as it writes
/// to disks, and decryption, when you access your objects. Therefore, you don't need to maintain any data encryption code. The only
/// thing you do is manage the encryption keys you provide.
/// </para>
/// <para>
/// When you retrieve an object, you must provide the same encryption key as part of your request. Amazon S3 first verifies
/// the encryption key you provided matches, and then decrypts the object before returning the object data to you.
/// </para>
/// <para>
/// Important: Amazon S3 does not store the encryption key you provide.
/// </para>
/// </summary>
[AWSProperty(Sensitive = true)]
public string ServerSideEncryptionCustomerProvidedKey
{
get { return this.serverSideEncryptionCustomerProvidedKey; }
set { this.serverSideEncryptionCustomerProvidedKey = value; }
}

/// <summary>
/// The MD5 of the customer encryption key specified in the ServerSideEncryptionCustomerProvidedKey property. The MD5 is
/// base 64 encoded. This field is optional, the SDK will calculate the MD5 if this is not set.
/// </summary>
public string ServerSideEncryptionCustomerProvidedKeyMD5
{
get { return this.serverSideEncryptionCustomerProvidedKeyMD5; }
set { this.serverSideEncryptionCustomerProvidedKeyMD5 = value; }
}

/// <summary>
/// Confirms that the requester knows that they will be charged for the request.
/// Bucket owners need not specify this parameter in their requests.
/// </summary>
public RequestPayer RequestPayer
{
get { return this.requestPayer; }
set { this.requestPayer = value; }
}

/// <summary>
/// The event for DownloadedDirectoryProgressEvent notifications. All
Expand Down