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/9d07dc1e-d82d-4f94-8700-c7b57f87205d.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"services": [
{
"serviceName": "S3",
"type": "patch",
"changeLogMessages": [
"Add missing fields to Transfer Utility request objects"
]
}
]
}
14 changes: 14 additions & 0 deletions sdk/src/Services/S3/Custom/Model/HeadersCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,20 @@ internal bool IsSetContentType()
return !string.IsNullOrEmpty(this.ContentType);
}

/// <summary>
/// The language that the content is in.
/// </summary>
public string ContentLanguage
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: add a link to the rfc similar to the other ones

{
get { return this["Content-Language"]; }
set { this["Content-Language"] = value; }
}

internal bool IsSetContentLanguage()
{
return !string.IsNullOrEmpty(this.ContentLanguage);
}

/// <summary>
/// <para>
/// The date and time at which the object is no longer cacheable. For more information,
Expand Down
116 changes: 113 additions & 3 deletions sdk/src/Services/S3/Custom/Transfer/BaseDownloadRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using System.Text;

using Amazon.Runtime.Internal;
using Amazon.S3.Model;

namespace Amazon.S3.Transfer
{
Expand All @@ -45,6 +46,11 @@ public abstract class BaseDownloadRequest

private RequestPayer requestPayer;

private string expectedBucketOwner;
private string ifMatch;
private string ifNoneMatch;
private ResponseHeaderOverrides responseHeaders;

/// <summary>
/// Gets or sets the name of the bucket.
/// </summary>
Expand All @@ -66,7 +72,7 @@ public string BucketName
/// </returns>
internal bool IsSetBucketName()
{
return !System.String.IsNullOrEmpty(this.bucketName);
return !String.IsNullOrEmpty(this.bucketName);
}


Expand All @@ -91,7 +97,7 @@ public string Key
/// </returns>
internal bool IsSetKey()
{
return !System.String.IsNullOrEmpty(this.key);
return !String.IsNullOrEmpty(this.key);
}

/// <summary>
Expand All @@ -112,7 +118,7 @@ public string VersionId
/// <returns>true if VersionId property is set.</returns>
internal bool IsSetVersionId()
{
return !System.String.IsNullOrEmpty(this.versionId);
return !String.IsNullOrEmpty(this.versionId);
}

/// <summary>
Expand Down Expand Up @@ -220,5 +226,109 @@ public RequestPayer RequestPayer
get { return this.requestPayer; }
set { this.requestPayer = value; }
}

/// <summary>
/// Gets and sets the property ExpectedBucketOwner.
/// <para>
/// The account ID of the expected bucket owner. If the account ID that you provide does
/// not match the actual owner of the bucket, the request fails with the HTTP status code
/// <c>403 Forbidden</c> (access denied).
/// </para>
/// </summary>
public string ExpectedBucketOwner
{
get { return this.expectedBucketOwner; }
set { this.expectedBucketOwner = value; }
}

/// <summary>
/// Checks to see if ExpectedBucketOwner is set.
/// </summary>
/// <returns>true, if ExpectedBucketOwner property is set.</returns>
internal bool IsSetExpectedBucketOwner()
{
return !String.IsNullOrEmpty(this.expectedBucketOwner);
}

/// <summary>
/// Gets and sets the property IfMatch.
/// <para>
/// Return the object only if its entity tag (ETag) is the same as the one specified in this header;
/// otherwise, return a <c>412 Precondition Failed</c> error.
/// </para>
/// <para>
/// If both of the <c>If-Match</c> and <c>If-Unmodified-Since</c> headers are present in the request as follows:
/// <c>If-Match</c> condition evaluates to <c>true</c>, and; <c>If-Unmodified-Since</c> condition evaluates to <c>false</c>;
/// then, S3 returns <c>200 OK</c> and the data requested.
/// </para>
/// <para>
/// For more information about conditional requests, see <see href="https://tools.ietf.org/html/rfc7232">RFC 7232</see>.
/// </para>
/// The <see cref="IfMatch"/> property is equivalent to the <see cref="GetObjectRequest.EtagToMatch"/>.
/// </summary>
public string IfMatch
{
get { return this.ifMatch; }
set { this.ifMatch = value; }
}

/// <summary>
/// Checks to see if IfMatch is set.
/// </summary>
/// <returns>true, if IfMatch property is set.</returns>
internal bool IsSetIfMatch()
{
return !String.IsNullOrEmpty(this.ifMatch);
}

/// <summary>
/// Gets and sets the property IfNoneMatch.
/// <para>
/// Return the object only if its entity tag (ETag) is different from the one specified in this header;
/// otherwise, return a <c>304 Not Modified</c> error.
/// </para>
/// <para>
/// If both of the <c>If-None-Match</c> and <c>If-Modified-Since</c> headers are present in the request as follows:
/// <c> If-None-Match</c> condition evaluates to <c>false</c>, and; <c>If-Modified-Since</c> condition evaluates to <c>true</c>;
/// then, S3 returns <c>304 Not Modified</c> HTTP status code.
/// </para>
/// <para>
/// For more information about conditional requests, see <see href="https://tools.ietf.org/html/rfc7232">RFC 7232</see>.
/// </para>
/// The <see cref="IfNoneMatch"/> property is equivalent to the <see cref="GetObjectRequest.EtagToNotMatch"/>.
/// </summary>
public string IfNoneMatch
{
get { return this.ifNoneMatch; }
set { this.ifNoneMatch = value; }
}

/// <summary>
/// Checks to see if IfNoneMatch is set.
/// </summary>
/// <returns>true, if IfNoneMatch property is set.</returns>
internal bool IsSetIfNoneMatch()
{
return !String.IsNullOrEmpty(this.ifNoneMatch);
}

/// <summary>
/// A set of response headers that should be returned with the object.
/// </summary>
public ResponseHeaderOverrides ResponseHeaderOverrides
{
get
{
if (this.responseHeaders == null)
{
this.responseHeaders = new ResponseHeaderOverrides();
}
return this.responseHeaders;
}
set
{
this.responseHeaders = value;
}
}
}
}
Loading