-
Notifications
You must be signed in to change notification settings - Fork 868
Add missing fields to Transfer Utility request objects #4056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/transfermanager
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didnt look too closely at the individual fields and compare them to the mapping.json file but this seems to be on the correct path.
Also i think once youre ready to publish the final PR, if its possible to easily do
- 1 PR for the Download Changes
- 1 PR for the Upload Changes
downloadRequest.ServerSideEncryptionCustomerProvidedKey = this._request.ServerSideEncryptionCustomerProvidedKey; | ||
downloadRequest.ServerSideEncryptionCustomerProvidedKeyMD5 = this._request.ServerSideEncryptionCustomerProvidedKeyMD5; | ||
downloadRequest.RequestPayer = this._request.RequestPayer; | ||
downloadRequest.ExpectedBucketOwner = this._request.ExpectedBucketOwner; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont know if it matters here or now. but in the basecommand one i see we check isSetExpectedBucketOwner
and similar before setting these values. wondering if it makes a difference or not. just something to think about, i dont know off the top of my head
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't think it matters because even if ExpectedBucketOwner
is null or not set, it will check later down the line in the marshaller
ExpectedBucketOwner = this._fileTransporterRequest.ExpectedBucketOwner, | ||
Grants = this._fileTransporterRequest.Grants, | ||
Metadata = this._fileTransporterRequest.Metadata, | ||
ServerSideEncryptionKeyManagementServiceEncryptionContext = this._fileTransporterRequest.SSEKMSEncryptionContext, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: move this to where the other encryption stuff is up above
private string sseKMSEncryptionContext; | ||
private string websiteRedirectLocation; | ||
private HeadersCollection headersCollection = new HeadersCollection(); | ||
private List<S3Grant> _grants = AWSConfigs.InitializeCollections ? new List<S3Grant>() : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess for Grants the easiest way is this way instead of the separate fields is that right?
/// For more information about conditional requests, see <see href="https://tools.ietf.org/html/rfc7232">RFC 7232</see>. | ||
/// </para> | ||
/// </summary> | ||
public string IfMatch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that you are just following the model here... but in GetObjectRequest
we call this property ETagToMatch. When GetObjectRequest
is generated, we will have to keep the property name the same (for backwards compatibility reasons). So I'm wondering, should we name this property the same and call it ETagToMatch
?Same goes for IfNoneMatch
=> ETagNotToMatch
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens when we start generating the model for grants
@peterrsongg ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking since the Transfer Utility won't be generated, id rather we use the correct name instead of using what the SDK is using and having to maintain that for backwards compatibility. we are a layer on top of the SDK, so if the correct name is IfMatch
, then i'd rather use that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@philasmar okay, since this is a new property i think that's okay, but can you add in the documentation for this property that it is the same as ETagToMatch
and ETagNotToMatch
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GarrettBeatty InitiateMultipartUploadRequest
has already been generated, and is an example of a place where we use grants
. I kept the behavior the same and this class inherits from PutWithACLRequest
where grants
lives
InitiateMultipartUploadRequest
PutWithAclRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically, I will keep the behavior the same for PutObject
it will use HeaderACLRequestMarshaller
to marshall the grants
#region BucketName | ||
|
||
/// <summary> | ||
/// Gets or sets the name of the bucket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spacing
/// Gets or sets the name of the bucket. | ||
/// </summary> | ||
/// <value> | ||
/// The name of the bucket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spacing
|
||
#region ContentType | ||
/// <summary> | ||
/// Gets or sets the content type of the uploaded Amazon S3 object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing again
/// <value> | ||
/// The name of the bucket. | ||
/// </value> | ||
public string BucketName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Requred(true)]
?
/// <returns>true if ContentType property is set.</returns> | ||
internal bool IsSetContentType() | ||
{ | ||
return !System.String.IsNullOrEmpty(this.contentType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we remove System
?
/// The date and time when you want this object's Object Lock to expire. | ||
/// </para> | ||
/// </summary> | ||
public DateTime ObjectLockRetainUntilDate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be DateTime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have some minor comments
Description
Motivation and Context
Testing
Screenshots (if appropriate)
Types of changes
Checklist
License