Skip to content

Commit 7187dca

Browse files
committed
Add missing fields to Transfer Utility request objects
1 parent 92952d4 commit 7187dca

17 files changed

+1548
-697
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"services": [
3+
{
4+
"serviceName": "S3",
5+
"type": "patch",
6+
"changeLogMessages": [
7+
"Add missing fields to Transfer Utility request objects"
8+
]
9+
}
10+
]
11+
}

sdk/src/Services/S3/Custom/Model/HeadersCollection.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,21 @@ internal bool IsSetContentType()
152152
return !string.IsNullOrEmpty(this.ContentType);
153153
}
154154

155+
/// <summary>
156+
/// The language that the content is in. For more information,
157+
/// see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-language">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-language</a>.
158+
/// </summary>
159+
public string ContentLanguage
160+
{
161+
get { return this["Content-Language"]; }
162+
set { this["Content-Language"] = value; }
163+
}
164+
165+
internal bool IsSetContentLanguage()
166+
{
167+
return !string.IsNullOrEmpty(this.ContentLanguage);
168+
}
169+
155170
/// <summary>
156171
/// <para>
157172
/// The date and time at which the object is no longer cacheable. For more information,

sdk/src/Services/S3/Custom/Transfer/BaseDownloadRequest.cs

Lines changed: 113 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
using System.Text;
2525

2626
using Amazon.Runtime.Internal;
27+
using Amazon.S3.Model;
2728

2829
namespace Amazon.S3.Transfer
2930
{
@@ -45,6 +46,11 @@ public abstract class BaseDownloadRequest
4546

4647
private RequestPayer requestPayer;
4748

49+
private string expectedBucketOwner;
50+
private string ifMatch;
51+
private string ifNoneMatch;
52+
private ResponseHeaderOverrides responseHeaders;
53+
4854
/// <summary>
4955
/// Gets or sets the name of the bucket.
5056
/// </summary>
@@ -66,7 +72,7 @@ public string BucketName
6672
/// </returns>
6773
internal bool IsSetBucketName()
6874
{
69-
return !System.String.IsNullOrEmpty(this.bucketName);
75+
return !String.IsNullOrEmpty(this.bucketName);
7076
}
7177

7278

@@ -91,7 +97,7 @@ public string Key
9197
/// </returns>
9298
internal bool IsSetKey()
9399
{
94-
return !System.String.IsNullOrEmpty(this.key);
100+
return !String.IsNullOrEmpty(this.key);
95101
}
96102

97103
/// <summary>
@@ -112,7 +118,7 @@ public string VersionId
112118
/// <returns>true if VersionId property is set.</returns>
113119
internal bool IsSetVersionId()
114120
{
115-
return !System.String.IsNullOrEmpty(this.versionId);
121+
return !String.IsNullOrEmpty(this.versionId);
116122
}
117123

118124
/// <summary>
@@ -220,5 +226,109 @@ public RequestPayer RequestPayer
220226
get { return this.requestPayer; }
221227
set { this.requestPayer = value; }
222228
}
229+
230+
/// <summary>
231+
/// Gets and sets the property ExpectedBucketOwner.
232+
/// <para>
233+
/// The account ID of the expected bucket owner. If the account ID that you provide does
234+
/// not match the actual owner of the bucket, the request fails with the HTTP status code
235+
/// <c>403 Forbidden</c> (access denied).
236+
/// </para>
237+
/// </summary>
238+
public string ExpectedBucketOwner
239+
{
240+
get { return this.expectedBucketOwner; }
241+
set { this.expectedBucketOwner = value; }
242+
}
243+
244+
/// <summary>
245+
/// Checks to see if ExpectedBucketOwner is set.
246+
/// </summary>
247+
/// <returns>true, if ExpectedBucketOwner property is set.</returns>
248+
internal bool IsSetExpectedBucketOwner()
249+
{
250+
return !String.IsNullOrEmpty(this.expectedBucketOwner);
251+
}
252+
253+
/// <summary>
254+
/// Gets and sets the property IfMatch.
255+
/// <para>
256+
/// Return the object only if its entity tag (ETag) is the same as the one specified in this header;
257+
/// otherwise, return a <c>412 Precondition Failed</c> error.
258+
/// </para>
259+
/// <para>
260+
/// If both of the <c>If-Match</c> and <c>If-Unmodified-Since</c> headers are present in the request as follows:
261+
/// <c>If-Match</c> condition evaluates to <c>true</c>, and; <c>If-Unmodified-Since</c> condition evaluates to <c>false</c>;
262+
/// then, S3 returns <c>200 OK</c> and the data requested.
263+
/// </para>
264+
/// <para>
265+
/// For more information about conditional requests, see <see href="https://tools.ietf.org/html/rfc7232">RFC 7232</see>.
266+
/// </para>
267+
/// The <see cref="IfMatch"/> property is equivalent to the <see cref="GetObjectRequest.EtagToMatch"/>.
268+
/// </summary>
269+
public string IfMatch
270+
{
271+
get { return this.ifMatch; }
272+
set { this.ifMatch = value; }
273+
}
274+
275+
/// <summary>
276+
/// Checks to see if IfMatch is set.
277+
/// </summary>
278+
/// <returns>true, if IfMatch property is set.</returns>
279+
internal bool IsSetIfMatch()
280+
{
281+
return !String.IsNullOrEmpty(this.ifMatch);
282+
}
283+
284+
/// <summary>
285+
/// Gets and sets the property IfNoneMatch.
286+
/// <para>
287+
/// Return the object only if its entity tag (ETag) is different from the one specified in this header;
288+
/// otherwise, return a <c>304 Not Modified</c> error.
289+
/// </para>
290+
/// <para>
291+
/// If both of the <c>If-None-Match</c> and <c>If-Modified-Since</c> headers are present in the request as follows:
292+
/// <c> If-None-Match</c> condition evaluates to <c>false</c>, and; <c>If-Modified-Since</c> condition evaluates to <c>true</c>;
293+
/// then, S3 returns <c>304 Not Modified</c> HTTP status code.
294+
/// </para>
295+
/// <para>
296+
/// For more information about conditional requests, see <see href="https://tools.ietf.org/html/rfc7232">RFC 7232</see>.
297+
/// </para>
298+
/// The <see cref="IfNoneMatch"/> property is equivalent to the <see cref="GetObjectRequest.EtagToNotMatch"/>.
299+
/// </summary>
300+
public string IfNoneMatch
301+
{
302+
get { return this.ifNoneMatch; }
303+
set { this.ifNoneMatch = value; }
304+
}
305+
306+
/// <summary>
307+
/// Checks to see if IfNoneMatch is set.
308+
/// </summary>
309+
/// <returns>true, if IfNoneMatch property is set.</returns>
310+
internal bool IsSetIfNoneMatch()
311+
{
312+
return !String.IsNullOrEmpty(this.ifNoneMatch);
313+
}
314+
315+
/// <summary>
316+
/// A set of response headers that should be returned with the object.
317+
/// </summary>
318+
public ResponseHeaderOverrides ResponseHeaderOverrides
319+
{
320+
get
321+
{
322+
if (this.responseHeaders == null)
323+
{
324+
this.responseHeaders = new ResponseHeaderOverrides();
325+
}
326+
return this.responseHeaders;
327+
}
328+
set
329+
{
330+
this.responseHeaders = value;
331+
}
332+
}
223333
}
224334
}

0 commit comments

Comments
 (0)