aws_s3_transfer/model/_download_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Input for downloading a single S3 object.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct DownloadInput {
7 /// <p>The bucket name containing the object.</p>
8 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
9 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
10 /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
11 /// <p>Object Lambda access points are not supported by directory buckets.</p>
12 /// </note>
13 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
14 pub bucket: ::std::option::Option<::std::string::String>,
15 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
16 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
17 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
18 pub if_match: ::std::option::Option<::std::string::String>,
19 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
20 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
21 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
22 pub if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
23 /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
24 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
25 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
26 pub if_none_match: ::std::option::Option<::std::string::String>,
27 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
28 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
29 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
30 pub if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
31 /// <p>Key of the object to get.</p>
32 pub key: ::std::option::Option<::std::string::String>,
33 /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
34 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
35 /// </note>
36 pub range: ::std::option::Option<::std::string::String>,
37 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
38 pub response_cache_control: ::std::option::Option<::std::string::String>,
39 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
40 pub response_content_disposition: ::std::option::Option<::std::string::String>,
41 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
42 pub response_content_encoding: ::std::option::Option<::std::string::String>,
43 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
44 pub response_content_language: ::std::option::Option<::std::string::String>,
45 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
46 pub response_content_type: ::std::option::Option<::std::string::String>,
47 /// <p>Sets the <code>Expires</code> header of the response.</p>
48 pub response_expires: ::std::option::Option<::aws_smithy_types::DateTime>,
49 /// <p>Version ID used to reference a specific version of the object.</p>
50 /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
51 /// <ul>
52 /// <li>
53 /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
54 /// <li>
55 /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
56 /// <li>
57 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code> to the <code>versionId</code> query parameter in the request.</p></li>
58 /// </ul>
59 /// </note>
60 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
61 pub version_id: ::std::option::Option<::std::string::String>,
62 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
63 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
64 /// <ul>
65 /// <li>
66 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
67 /// <li>
68 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
69 /// <li>
70 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
71 /// </ul>
72 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
73 /// <p>This functionality is not supported for directory buckets.</p>
74 /// </note>
75 pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
76 /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
77 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
78 /// <ul>
79 /// <li>
80 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
81 /// <li>
82 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
83 /// <li>
84 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
85 /// </ul>
86 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
87 /// <p>This functionality is not supported for directory buckets.</p>
88 /// </note>
89 pub sse_customer_key: ::std::option::Option<::std::string::String>,
90 /// <p>Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
91 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
92 /// <ul>
93 /// <li>
94 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
95 /// <li>
96 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
97 /// <li>
98 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
99 /// </ul>
100 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
101 /// <p>This functionality is not supported for directory buckets.</p>
102 /// </note>
103 pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
104 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
105 /// <p>This functionality is not supported for directory buckets.</p>
106 /// </note>
107 pub request_payer: ::std::option::Option<crate::model::RequestPayer>,
108 /// <p>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 <code>403 Forbidden</code> (access denied).</p>
109 pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
110 /// <p>To retrieve the checksum, this mode must be enabled.</p>
111 pub checksum_mode: ::std::option::Option<crate::model::ChecksumMode>,
112 /// How far this download may prefetch ahead of the consumer. `None` uses the client default from [`Config`](crate::config::Config); `Some` overrides it for this request.
113 #[cfg(not(s3_tm_out_of_tree))]
114 pub read_ahead: ::std::option::Option<crate::config::ReadAhead>,
115 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
116 /// Caller-selected part downloads are not supported. Transfer discovery manages request part numbers.
117 pub(crate) part_number: ::std::option::Option<i32>,
118}
119impl DownloadInput {
120 /// <p>The bucket name containing the object.</p>
121 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
122 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
123 /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
124 /// <p>Object Lambda access points are not supported by directory buckets.</p>
125 /// </note>
126 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
127 pub fn bucket(&self) -> ::std::option::Option<&str> {
128 self.bucket.as_deref()
129 }
130 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
131 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
132 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
133 pub fn if_match(&self) -> ::std::option::Option<&str> {
134 self.if_match.as_deref()
135 }
136 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
137 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
138 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
139 pub fn if_modified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
140 self.if_modified_since.as_ref()
141 }
142 /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
143 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
144 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
145 pub fn if_none_match(&self) -> ::std::option::Option<&str> {
146 self.if_none_match.as_deref()
147 }
148 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
149 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
150 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
151 pub fn if_unmodified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
152 self.if_unmodified_since.as_ref()
153 }
154 /// <p>Key of the object to get.</p>
155 pub fn key(&self) -> ::std::option::Option<&str> {
156 self.key.as_deref()
157 }
158 /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
159 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
160 /// </note>
161 pub fn range(&self) -> ::std::option::Option<&str> {
162 self.range.as_deref()
163 }
164 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
165 pub fn response_cache_control(&self) -> ::std::option::Option<&str> {
166 self.response_cache_control.as_deref()
167 }
168 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
169 pub fn response_content_disposition(&self) -> ::std::option::Option<&str> {
170 self.response_content_disposition.as_deref()
171 }
172 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
173 pub fn response_content_encoding(&self) -> ::std::option::Option<&str> {
174 self.response_content_encoding.as_deref()
175 }
176 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
177 pub fn response_content_language(&self) -> ::std::option::Option<&str> {
178 self.response_content_language.as_deref()
179 }
180 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
181 pub fn response_content_type(&self) -> ::std::option::Option<&str> {
182 self.response_content_type.as_deref()
183 }
184 /// <p>Sets the <code>Expires</code> header of the response.</p>
185 pub fn response_expires(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
186 self.response_expires.as_ref()
187 }
188 /// <p>Version ID used to reference a specific version of the object.</p>
189 /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
190 /// <ul>
191 /// <li>
192 /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
193 /// <li>
194 /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
195 /// <li>
196 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code> to the <code>versionId</code> query parameter in the request.</p></li>
197 /// </ul>
198 /// </note>
199 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
200 pub fn version_id(&self) -> ::std::option::Option<&str> {
201 self.version_id.as_deref()
202 }
203 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
204 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
205 /// <ul>
206 /// <li>
207 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
208 /// <li>
209 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
210 /// <li>
211 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
212 /// </ul>
213 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
214 /// <p>This functionality is not supported for directory buckets.</p>
215 /// </note>
216 pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
217 self.sse_customer_algorithm.as_deref()
218 }
219 /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
220 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
221 /// <ul>
222 /// <li>
223 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
224 /// <li>
225 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
226 /// <li>
227 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
228 /// </ul>
229 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
230 /// <p>This functionality is not supported for directory buckets.</p>
231 /// </note>
232 pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
233 self.sse_customer_key.as_deref()
234 }
235 /// <p>Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
236 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
237 /// <ul>
238 /// <li>
239 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
240 /// <li>
241 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
242 /// <li>
243 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
244 /// </ul>
245 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
246 /// <p>This functionality is not supported for directory buckets.</p>
247 /// </note>
248 pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
249 self.sse_customer_key_md5.as_deref()
250 }
251 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
252 /// <p>This functionality is not supported for directory buckets.</p>
253 /// </note>
254 pub fn request_payer(&self) -> ::std::option::Option<&crate::model::RequestPayer> {
255 self.request_payer.as_ref()
256 }
257 /// <p>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 <code>403 Forbidden</code> (access denied).</p>
258 pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
259 self.expected_bucket_owner.as_deref()
260 }
261 /// <p>To retrieve the checksum, this mode must be enabled.</p>
262 pub fn checksum_mode(&self) -> ::std::option::Option<&crate::model::ChecksumMode> {
263 self.checksum_mode.as_ref()
264 }
265}
266impl ::std::fmt::Debug for DownloadInput {
267 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
268 let mut formatter = f.debug_struct("DownloadInput");
269 formatter.field("bucket", &self.bucket);
270 formatter.field("if_match", &self.if_match);
271 formatter.field("if_modified_since", &self.if_modified_since);
272 formatter.field("if_none_match", &self.if_none_match);
273 formatter.field("if_unmodified_since", &self.if_unmodified_since);
274 formatter.field("key", &self.key);
275 formatter.field("range", &self.range);
276 formatter.field("response_cache_control", &self.response_cache_control);
277 formatter.field(
278 "response_content_disposition",
279 &self.response_content_disposition,
280 );
281 formatter.field("response_content_encoding", &self.response_content_encoding);
282 formatter.field("response_content_language", &self.response_content_language);
283 formatter.field("response_content_type", &self.response_content_type);
284 formatter.field("response_expires", &self.response_expires);
285 formatter.field("version_id", &self.version_id);
286 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
287 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
288 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
289 formatter.field("request_payer", &self.request_payer);
290 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
291 formatter.field("checksum_mode", &self.checksum_mode);
292 #[cfg(not(s3_tm_out_of_tree))]
293 formatter.field("read_ahead", &self.read_ahead);
294 formatter.field("part_number", &self.part_number);
295 formatter.finish()
296 }
297}
298impl crate::model::DownloadInput {
299 /// How far this download may prefetch ahead of the consumer. `None` uses the client default from [`Config`](crate::config::Config); `Some` overrides it for this request.
300 #[cfg(not(s3_tm_out_of_tree))]
301 pub fn read_ahead(&self) -> ::std::option::Option<&crate::config::ReadAhead> {
302 self.read_ahead.as_ref()
303 }
304 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
305 /// Caller-selected part downloads are not supported. Transfer discovery manages request part numbers.
306 #[allow(dead_code)]
307 pub(crate) fn part_number(&self) -> ::std::option::Option<i32> {
308 self.part_number
309 }
310}
311impl ::std::convert::From<crate::model::DownloadInput>
312 for crate::model::builders::DownloadInputBuilder
313{
314 fn from(value: crate::model::DownloadInput) -> Self {
315 Self {
316 bucket: value.bucket,
317 if_match: value.if_match,
318 if_modified_since: value.if_modified_since,
319 if_none_match: value.if_none_match,
320 if_unmodified_since: value.if_unmodified_since,
321 key: value.key,
322 range: value.range,
323 response_cache_control: value.response_cache_control,
324 response_content_disposition: value.response_content_disposition,
325 response_content_encoding: value.response_content_encoding,
326 response_content_language: value.response_content_language,
327 response_content_type: value.response_content_type,
328 response_expires: value.response_expires,
329 version_id: value.version_id,
330 sse_customer_algorithm: value.sse_customer_algorithm,
331 sse_customer_key: value.sse_customer_key,
332 sse_customer_key_md5: value.sse_customer_key_md5,
333 request_payer: value.request_payer,
334 expected_bucket_owner: value.expected_bucket_owner,
335 checksum_mode: value.checksum_mode,
336 #[cfg(not(s3_tm_out_of_tree))]
337 read_ahead: value.read_ahead,
338 part_number: value.part_number,
339 }
340 }
341}
342impl DownloadInput {
343 /// Creates a new builder-style object to manufacture [`DownloadInput`](crate::model::DownloadInput).
344 pub fn builder() -> crate::model::builders::DownloadInputBuilder {
345 crate::model::builders::DownloadInputBuilder::default()
346 }
347}
348
349/// A builder for [`DownloadInput`](crate::model::DownloadInput).
350#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
351#[non_exhaustive]
352pub struct DownloadInputBuilder {
353 pub(crate) bucket: ::std::option::Option<::std::string::String>,
354 pub(crate) if_match: ::std::option::Option<::std::string::String>,
355 pub(crate) if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
356 pub(crate) if_none_match: ::std::option::Option<::std::string::String>,
357 pub(crate) if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
358 pub(crate) key: ::std::option::Option<::std::string::String>,
359 pub(crate) range: ::std::option::Option<::std::string::String>,
360 pub(crate) response_cache_control: ::std::option::Option<::std::string::String>,
361 pub(crate) response_content_disposition: ::std::option::Option<::std::string::String>,
362 pub(crate) response_content_encoding: ::std::option::Option<::std::string::String>,
363 pub(crate) response_content_language: ::std::option::Option<::std::string::String>,
364 pub(crate) response_content_type: ::std::option::Option<::std::string::String>,
365 pub(crate) response_expires: ::std::option::Option<::aws_smithy_types::DateTime>,
366 pub(crate) version_id: ::std::option::Option<::std::string::String>,
367 pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
368 pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
369 pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
370 pub(crate) request_payer: ::std::option::Option<crate::model::RequestPayer>,
371 pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
372 pub(crate) checksum_mode: ::std::option::Option<crate::model::ChecksumMode>,
373 #[cfg(not(s3_tm_out_of_tree))]
374 pub(crate) read_ahead: ::std::option::Option<crate::config::ReadAhead>,
375 pub(crate) part_number: ::std::option::Option<i32>,
376}
377impl DownloadInputBuilder {
378 /// <p>The bucket name containing the object.</p>
379 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
380 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
381 /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
382 /// <p>Object Lambda access points are not supported by directory buckets.</p>
383 /// </note>
384 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
385 /// This field is required.
386 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
387 self.bucket = ::std::option::Option::Some(input.into());
388 self
389 }
390 /// <p>The bucket name containing the object.</p>
391 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
392 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
393 /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
394 /// <p>Object Lambda access points are not supported by directory buckets.</p>
395 /// </note>
396 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
397 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
398 self.bucket = input;
399 self
400 }
401 /// <p>The bucket name containing the object.</p>
402 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
403 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
404 /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
405 /// <p>Object Lambda access points are not supported by directory buckets.</p>
406 /// </note>
407 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
408 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
409 &self.bucket
410 }
411 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
412 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
413 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
414 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
415 self.if_match = ::std::option::Option::Some(input.into());
416 self
417 }
418 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
419 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
420 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
421 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
422 self.if_match = input;
423 self
424 }
425 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
426 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
427 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
428 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
429 &self.if_match
430 }
431 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
432 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
433 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
434 pub fn if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
435 self.if_modified_since = ::std::option::Option::Some(input);
436 self
437 }
438 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
439 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
440 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
441 pub fn set_if_modified_since(
442 mut self,
443 input: ::std::option::Option<::aws_smithy_types::DateTime>,
444 ) -> Self {
445 self.if_modified_since = input;
446 self
447 }
448 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
449 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
450 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
451 pub fn get_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
452 &self.if_modified_since
453 }
454 /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
455 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
456 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
457 pub fn if_none_match(
458 mut self,
459 input: impl ::std::convert::Into<::std::string::String>,
460 ) -> Self {
461 self.if_none_match = ::std::option::Option::Some(input.into());
462 self
463 }
464 /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
465 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
466 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
467 pub fn set_if_none_match(
468 mut self,
469 input: ::std::option::Option<::std::string::String>,
470 ) -> Self {
471 self.if_none_match = input;
472 self
473 }
474 /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
475 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
476 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
477 pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
478 &self.if_none_match
479 }
480 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
481 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
482 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
483 pub fn if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
484 self.if_unmodified_since = ::std::option::Option::Some(input);
485 self
486 }
487 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
488 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
489 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
490 pub fn set_if_unmodified_since(
491 mut self,
492 input: ::std::option::Option<::aws_smithy_types::DateTime>,
493 ) -> Self {
494 self.if_unmodified_since = input;
495 self
496 }
497 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
498 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
499 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
500 pub fn get_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
501 &self.if_unmodified_since
502 }
503 /// <p>Key of the object to get.</p>
504 /// This field is required.
505 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
506 self.key = ::std::option::Option::Some(input.into());
507 self
508 }
509 /// <p>Key of the object to get.</p>
510 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
511 self.key = input;
512 self
513 }
514 /// <p>Key of the object to get.</p>
515 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
516 &self.key
517 }
518 /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
519 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
520 /// </note>
521 pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
522 self.range = ::std::option::Option::Some(input.into());
523 self
524 }
525 /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
526 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
527 /// </note>
528 pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
529 self.range = input;
530 self
531 }
532 /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
533 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
534 /// </note>
535 pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
536 &self.range
537 }
538 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
539 pub fn response_cache_control(
540 mut self,
541 input: impl ::std::convert::Into<::std::string::String>,
542 ) -> Self {
543 self.response_cache_control = ::std::option::Option::Some(input.into());
544 self
545 }
546 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
547 pub fn set_response_cache_control(
548 mut self,
549 input: ::std::option::Option<::std::string::String>,
550 ) -> Self {
551 self.response_cache_control = input;
552 self
553 }
554 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
555 pub fn get_response_cache_control(&self) -> &::std::option::Option<::std::string::String> {
556 &self.response_cache_control
557 }
558 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
559 pub fn response_content_disposition(
560 mut self,
561 input: impl ::std::convert::Into<::std::string::String>,
562 ) -> Self {
563 self.response_content_disposition = ::std::option::Option::Some(input.into());
564 self
565 }
566 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
567 pub fn set_response_content_disposition(
568 mut self,
569 input: ::std::option::Option<::std::string::String>,
570 ) -> Self {
571 self.response_content_disposition = input;
572 self
573 }
574 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
575 pub fn get_response_content_disposition(
576 &self,
577 ) -> &::std::option::Option<::std::string::String> {
578 &self.response_content_disposition
579 }
580 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
581 pub fn response_content_encoding(
582 mut self,
583 input: impl ::std::convert::Into<::std::string::String>,
584 ) -> Self {
585 self.response_content_encoding = ::std::option::Option::Some(input.into());
586 self
587 }
588 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
589 pub fn set_response_content_encoding(
590 mut self,
591 input: ::std::option::Option<::std::string::String>,
592 ) -> Self {
593 self.response_content_encoding = input;
594 self
595 }
596 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
597 pub fn get_response_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
598 &self.response_content_encoding
599 }
600 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
601 pub fn response_content_language(
602 mut self,
603 input: impl ::std::convert::Into<::std::string::String>,
604 ) -> Self {
605 self.response_content_language = ::std::option::Option::Some(input.into());
606 self
607 }
608 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
609 pub fn set_response_content_language(
610 mut self,
611 input: ::std::option::Option<::std::string::String>,
612 ) -> Self {
613 self.response_content_language = input;
614 self
615 }
616 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
617 pub fn get_response_content_language(&self) -> &::std::option::Option<::std::string::String> {
618 &self.response_content_language
619 }
620 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
621 pub fn response_content_type(
622 mut self,
623 input: impl ::std::convert::Into<::std::string::String>,
624 ) -> Self {
625 self.response_content_type = ::std::option::Option::Some(input.into());
626 self
627 }
628 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
629 pub fn set_response_content_type(
630 mut self,
631 input: ::std::option::Option<::std::string::String>,
632 ) -> Self {
633 self.response_content_type = input;
634 self
635 }
636 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
637 pub fn get_response_content_type(&self) -> &::std::option::Option<::std::string::String> {
638 &self.response_content_type
639 }
640 /// <p>Sets the <code>Expires</code> header of the response.</p>
641 pub fn response_expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
642 self.response_expires = ::std::option::Option::Some(input);
643 self
644 }
645 /// <p>Sets the <code>Expires</code> header of the response.</p>
646 pub fn set_response_expires(
647 mut self,
648 input: ::std::option::Option<::aws_smithy_types::DateTime>,
649 ) -> Self {
650 self.response_expires = input;
651 self
652 }
653 /// <p>Sets the <code>Expires</code> header of the response.</p>
654 pub fn get_response_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
655 &self.response_expires
656 }
657 /// <p>Version ID used to reference a specific version of the object.</p>
658 /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
659 /// <ul>
660 /// <li>
661 /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
662 /// <li>
663 /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
664 /// <li>
665 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code> to the <code>versionId</code> query parameter in the request.</p></li>
666 /// </ul>
667 /// </note>
668 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
669 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
670 self.version_id = ::std::option::Option::Some(input.into());
671 self
672 }
673 /// <p>Version ID used to reference a specific version of the object.</p>
674 /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
675 /// <ul>
676 /// <li>
677 /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
678 /// <li>
679 /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
680 /// <li>
681 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code> to the <code>versionId</code> query parameter in the request.</p></li>
682 /// </ul>
683 /// </note>
684 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
685 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
686 self.version_id = input;
687 self
688 }
689 /// <p>Version ID used to reference a specific version of the object.</p>
690 /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
691 /// <ul>
692 /// <li>
693 /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
694 /// <li>
695 /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
696 /// <li>
697 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code> to the <code>versionId</code> query parameter in the request.</p></li>
698 /// </ul>
699 /// </note>
700 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
701 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
702 &self.version_id
703 }
704 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
705 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
706 /// <ul>
707 /// <li>
708 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
709 /// <li>
710 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
711 /// <li>
712 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
713 /// </ul>
714 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
715 /// <p>This functionality is not supported for directory buckets.</p>
716 /// </note>
717 pub fn sse_customer_algorithm(
718 mut self,
719 input: impl ::std::convert::Into<::std::string::String>,
720 ) -> Self {
721 self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
722 self
723 }
724 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
725 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
726 /// <ul>
727 /// <li>
728 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
729 /// <li>
730 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
731 /// <li>
732 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
733 /// </ul>
734 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
735 /// <p>This functionality is not supported for directory buckets.</p>
736 /// </note>
737 pub fn set_sse_customer_algorithm(
738 mut self,
739 input: ::std::option::Option<::std::string::String>,
740 ) -> Self {
741 self.sse_customer_algorithm = input;
742 self
743 }
744 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
745 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
746 /// <ul>
747 /// <li>
748 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
749 /// <li>
750 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
751 /// <li>
752 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
753 /// </ul>
754 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
755 /// <p>This functionality is not supported for directory buckets.</p>
756 /// </note>
757 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
758 &self.sse_customer_algorithm
759 }
760 /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
761 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
762 /// <ul>
763 /// <li>
764 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
765 /// <li>
766 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
767 /// <li>
768 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
769 /// </ul>
770 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
771 /// <p>This functionality is not supported for directory buckets.</p>
772 /// </note>
773 pub fn sse_customer_key(
774 mut self,
775 input: impl ::std::convert::Into<::std::string::String>,
776 ) -> Self {
777 self.sse_customer_key = ::std::option::Option::Some(input.into());
778 self
779 }
780 /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
781 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
782 /// <ul>
783 /// <li>
784 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
785 /// <li>
786 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
787 /// <li>
788 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
789 /// </ul>
790 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
791 /// <p>This functionality is not supported for directory buckets.</p>
792 /// </note>
793 pub fn set_sse_customer_key(
794 mut self,
795 input: ::std::option::Option<::std::string::String>,
796 ) -> Self {
797 self.sse_customer_key = input;
798 self
799 }
800 /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
801 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
802 /// <ul>
803 /// <li>
804 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
805 /// <li>
806 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
807 /// <li>
808 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
809 /// </ul>
810 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
811 /// <p>This functionality is not supported for directory buckets.</p>
812 /// </note>
813 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
814 &self.sse_customer_key
815 }
816 /// <p>Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
817 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
818 /// <ul>
819 /// <li>
820 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
821 /// <li>
822 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
823 /// <li>
824 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
825 /// </ul>
826 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
827 /// <p>This functionality is not supported for directory buckets.</p>
828 /// </note>
829 pub fn sse_customer_key_md5(
830 mut self,
831 input: impl ::std::convert::Into<::std::string::String>,
832 ) -> Self {
833 self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
834 self
835 }
836 /// <p>Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
837 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
838 /// <ul>
839 /// <li>
840 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
841 /// <li>
842 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
843 /// <li>
844 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
845 /// </ul>
846 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
847 /// <p>This functionality is not supported for directory buckets.</p>
848 /// </note>
849 pub fn set_sse_customer_key_md5(
850 mut self,
851 input: ::std::option::Option<::std::string::String>,
852 ) -> Self {
853 self.sse_customer_key_md5 = input;
854 self
855 }
856 /// <p>Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p>
857 /// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:</p>
858 /// <ul>
859 /// <li>
860 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
861 /// <li>
862 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
863 /// <li>
864 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
865 /// </ul>
866 /// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
867 /// <p>This functionality is not supported for directory buckets.</p>
868 /// </note>
869 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
870 &self.sse_customer_key_md5
871 }
872 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
873 /// <p>This functionality is not supported for directory buckets.</p>
874 /// </note>
875 pub fn request_payer(mut self, input: crate::model::RequestPayer) -> Self {
876 self.request_payer = ::std::option::Option::Some(input);
877 self
878 }
879 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
880 /// <p>This functionality is not supported for directory buckets.</p>
881 /// </note>
882 pub fn set_request_payer(
883 mut self,
884 input: ::std::option::Option<crate::model::RequestPayer>,
885 ) -> Self {
886 self.request_payer = input;
887 self
888 }
889 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
890 /// <p>This functionality is not supported for directory buckets.</p>
891 /// </note>
892 pub fn get_request_payer(&self) -> &::std::option::Option<crate::model::RequestPayer> {
893 &self.request_payer
894 }
895 /// <p>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 <code>403 Forbidden</code> (access denied).</p>
896 pub fn expected_bucket_owner(
897 mut self,
898 input: impl ::std::convert::Into<::std::string::String>,
899 ) -> Self {
900 self.expected_bucket_owner = ::std::option::Option::Some(input.into());
901 self
902 }
903 /// <p>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 <code>403 Forbidden</code> (access denied).</p>
904 pub fn set_expected_bucket_owner(
905 mut self,
906 input: ::std::option::Option<::std::string::String>,
907 ) -> Self {
908 self.expected_bucket_owner = input;
909 self
910 }
911 /// <p>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 <code>403 Forbidden</code> (access denied).</p>
912 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
913 &self.expected_bucket_owner
914 }
915 /// <p>To retrieve the checksum, this mode must be enabled.</p>
916 pub fn checksum_mode(mut self, input: crate::model::ChecksumMode) -> Self {
917 self.checksum_mode = ::std::option::Option::Some(input);
918 self
919 }
920 /// <p>To retrieve the checksum, this mode must be enabled.</p>
921 pub fn set_checksum_mode(
922 mut self,
923 input: ::std::option::Option<crate::model::ChecksumMode>,
924 ) -> Self {
925 self.checksum_mode = input;
926 self
927 }
928 /// <p>To retrieve the checksum, this mode must be enabled.</p>
929 pub fn get_checksum_mode(&self) -> &::std::option::Option<crate::model::ChecksumMode> {
930 &self.checksum_mode
931 }
932 /// How far this download may prefetch ahead of the consumer. `None` uses the client default from [`Config`](crate::config::Config); `Some` overrides it for this request.
933 #[cfg(not(s3_tm_out_of_tree))]
934 pub fn read_ahead(mut self, input: crate::config::ReadAhead) -> Self {
935 self.read_ahead = ::std::option::Option::Some(input);
936 self
937 }
938 /// How far this download may prefetch ahead of the consumer. `None` uses the client default from [`Config`](crate::config::Config); `Some` overrides it for this request.
939 #[cfg(not(s3_tm_out_of_tree))]
940 pub fn set_read_ahead(
941 mut self,
942 input: ::std::option::Option<crate::config::ReadAhead>,
943 ) -> Self {
944 self.read_ahead = input;
945 self
946 }
947 /// How far this download may prefetch ahead of the consumer. `None` uses the client default from [`Config`](crate::config::Config); `Some` overrides it for this request.
948 #[cfg(not(s3_tm_out_of_tree))]
949 pub fn get_read_ahead(&self) -> &::std::option::Option<crate::config::ReadAhead> {
950 &self.read_ahead
951 }
952 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
953 /// Caller-selected part downloads are not supported. Transfer discovery manages request part numbers.
954 #[allow(dead_code)]
955 pub(crate) fn part_number(mut self, input: i32) -> Self {
956 self.part_number = ::std::option::Option::Some(input);
957 self
958 }
959 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
960 /// Caller-selected part downloads are not supported. Transfer discovery manages request part numbers.
961 #[allow(dead_code)]
962 pub(crate) fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
963 self.part_number = input;
964 self
965 }
966 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
967 /// Caller-selected part downloads are not supported. Transfer discovery manages request part numbers.
968 #[allow(dead_code)]
969 pub(crate) fn get_part_number(&self) -> &::std::option::Option<i32> {
970 &self.part_number
971 }
972 /// Consumes the builder and constructs a [`DownloadInput`](crate::model::DownloadInput).
973 fn build_unchecked(
974 self,
975 ) -> ::std::result::Result<
976 crate::model::DownloadInput,
977 ::aws_smithy_types::error::operation::BuildError,
978 > {
979 ::std::result::Result::Ok(crate::model::DownloadInput {
980 bucket: self.bucket,
981 if_match: self.if_match,
982 if_modified_since: self.if_modified_since,
983 if_none_match: self.if_none_match,
984 if_unmodified_since: self.if_unmodified_since,
985 key: self.key,
986 range: self.range,
987 response_cache_control: self.response_cache_control,
988 response_content_disposition: self.response_content_disposition,
989 response_content_encoding: self.response_content_encoding,
990 response_content_language: self.response_content_language,
991 response_content_type: self.response_content_type,
992 response_expires: self.response_expires,
993 version_id: self.version_id,
994 sse_customer_algorithm: self.sse_customer_algorithm,
995 sse_customer_key: self.sse_customer_key,
996 sse_customer_key_md5: self.sse_customer_key_md5,
997 request_payer: self.request_payer,
998 expected_bucket_owner: self.expected_bucket_owner,
999 checksum_mode: self.checksum_mode,
1000 #[cfg(not(s3_tm_out_of_tree))]
1001 read_ahead: self.read_ahead,
1002 part_number: self.part_number,
1003 })
1004 }
1005}
1006impl ::std::fmt::Debug for DownloadInputBuilder {
1007 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1008 let mut formatter = f.debug_struct("DownloadInputBuilder");
1009 formatter.field("bucket", &self.bucket);
1010 formatter.field("if_match", &self.if_match);
1011 formatter.field("if_modified_since", &self.if_modified_since);
1012 formatter.field("if_none_match", &self.if_none_match);
1013 formatter.field("if_unmodified_since", &self.if_unmodified_since);
1014 formatter.field("key", &self.key);
1015 formatter.field("range", &self.range);
1016 formatter.field("response_cache_control", &self.response_cache_control);
1017 formatter.field(
1018 "response_content_disposition",
1019 &self.response_content_disposition,
1020 );
1021 formatter.field("response_content_encoding", &self.response_content_encoding);
1022 formatter.field("response_content_language", &self.response_content_language);
1023 formatter.field("response_content_type", &self.response_content_type);
1024 formatter.field("response_expires", &self.response_expires);
1025 formatter.field("version_id", &self.version_id);
1026 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
1027 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
1028 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
1029 formatter.field("request_payer", &self.request_payer);
1030 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
1031 formatter.field("checksum_mode", &self.checksum_mode);
1032 #[cfg(not(s3_tm_out_of_tree))]
1033 formatter.field("read_ahead", &self.read_ahead);
1034 formatter.field("part_number", &self.part_number);
1035 formatter.finish()
1036 }
1037}
1038
1039// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
1040impl DownloadInputBuilder {
1041 /// Consumes the builder, validating required fields.
1042 pub fn build(
1043 self,
1044 ) -> ::std::result::Result<
1045 crate::model::DownloadInput,
1046 ::aws_smithy_types::error::operation::BuildError,
1047 > {
1048 if self.bucket.is_none() {
1049 return Err(
1050 ::aws_smithy_types::error::operation::BuildError::missing_field(
1051 "bucket",
1052 "A required field was not set",
1053 ),
1054 );
1055 }
1056 if self.key.is_none() {
1057 return Err(
1058 ::aws_smithy_types::error::operation::BuildError::missing_field(
1059 "key",
1060 "A required field was not set",
1061 ),
1062 );
1063 }
1064 self.build_unchecked()
1065 }
1066}