Skip to content

Conversation

philasmar
Copy link
Contributor

Description

Motivation and Context

Testing

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

@philasmar philasmar marked this pull request as draft October 17, 2025 17:06
Copy link
Contributor

@GarrettBeatty GarrettBeatty left a 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. 1 PR for the Download Changes
  2. 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;
Copy link
Contributor

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

Copy link
Contributor

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,
Copy link
Contributor

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;
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor

@GarrettBeatty GarrettBeatty Oct 17, 2025

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 ?

Copy link
Contributor Author

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.

Copy link
Contributor

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 ?

Copy link
Contributor

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

Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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);
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be DateTime?

Copy link
Contributor

@peterrsongg peterrsongg left a 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

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.

3 participants