aws_sdk_s3/operation/get_object/_get_object_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetObjectInput {
6 /// <p>The bucket name containing the object.</p>
7 /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
8 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. 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>
9 /// <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>
10 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
11 /// </note>
12 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
13 pub bucket: ::std::option::Option<::std::string::String>,
14 /// <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>
15 /// <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>
16 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
17 pub if_match: ::std::option::Option<::std::string::String>,
18 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
19 /// <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>
20 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
21 pub if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
22 /// <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>
23 /// <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>
24 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
25 pub if_none_match: ::std::option::Option<::std::string::String>,
26 /// <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>
27 /// <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>
28 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
29 pub if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
30 /// <p>Key of the object to get.</p>
31 pub key: ::std::option::Option<::std::string::String>,
32 /// <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>
33 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
34 /// </note>
35 pub range: ::std::option::Option<::std::string::String>,
36 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
37 pub response_cache_control: ::std::option::Option<::std::string::String>,
38 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
39 pub response_content_disposition: ::std::option::Option<::std::string::String>,
40 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
41 pub response_content_encoding: ::std::option::Option<::std::string::String>,
42 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
43 pub response_content_language: ::std::option::Option<::std::string::String>,
44 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
45 pub response_content_type: ::std::option::Option<::std::string::String>,
46 /// <p>Sets the <code>Expires</code> header of the response.</p>
47 pub response_expires: ::std::option::Option<::aws_smithy_types::DateTime>,
48 /// <p>Version ID used to reference a specific version of the object.</p>
49 /// <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>
50 /// <ul>
51 /// <li>
52 /// <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>
53 /// <li>
54 /// <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>
55 /// <li>
56 /// <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>
57 /// </ul>
58 /// </note>
59 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
60 pub version_id: ::std::option::Option<::std::string::String>,
61 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
62 /// <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>
63 /// <ul>
64 /// <li>
65 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
66 /// <li>
67 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
68 /// <li>
69 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
70 /// </ul>
71 /// <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>
72 /// <p>This functionality is not supported for directory buckets.</p>
73 /// </note>
74 pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
75 /// <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>
76 /// <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>
77 /// <ul>
78 /// <li>
79 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
80 /// <li>
81 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
82 /// <li>
83 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
84 /// </ul>
85 /// <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>
86 /// <p>This functionality is not supported for directory buckets.</p>
87 /// </note>
88 pub sse_customer_key: ::std::option::Option<::std::string::String>,
89 /// <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>
90 /// <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>
91 /// <ul>
92 /// <li>
93 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
94 /// <li>
95 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
96 /// <li>
97 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
98 /// </ul>
99 /// <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>
100 /// <p>This functionality is not supported for directory buckets.</p>
101 /// </note>
102 pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
103 /// <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 corresponding charges to copy the object. 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>
104 /// <p>This functionality is not supported for directory buckets.</p>
105 /// </note>
106 pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
107 /// <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>
108 pub part_number: ::std::option::Option<i32>,
109 /// <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>
110 pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
111 /// <p>To retrieve the checksum, this mode must be enabled.</p>
112 /// <p>In addition, if you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
113 pub checksum_mode: ::std::option::Option<crate::types::ChecksumMode>,
114}
115impl GetObjectInput {
116 /// <p>The bucket name containing the object.</p>
117 /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
118 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. 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>
119 /// <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>
120 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
121 /// </note>
122 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
123 pub fn bucket(&self) -> ::std::option::Option<&str> {
124 self.bucket.as_deref()
125 }
126 /// <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>
127 /// <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>
128 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
129 pub fn if_match(&self) -> ::std::option::Option<&str> {
130 self.if_match.as_deref()
131 }
132 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
133 /// <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>
134 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
135 pub fn if_modified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
136 self.if_modified_since.as_ref()
137 }
138 /// <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>
139 /// <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>
140 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
141 pub fn if_none_match(&self) -> ::std::option::Option<&str> {
142 self.if_none_match.as_deref()
143 }
144 /// <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>
145 /// <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>
146 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
147 pub fn if_unmodified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
148 self.if_unmodified_since.as_ref()
149 }
150 /// <p>Key of the object to get.</p>
151 pub fn key(&self) -> ::std::option::Option<&str> {
152 self.key.as_deref()
153 }
154 /// <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>
155 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
156 /// </note>
157 pub fn range(&self) -> ::std::option::Option<&str> {
158 self.range.as_deref()
159 }
160 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
161 pub fn response_cache_control(&self) -> ::std::option::Option<&str> {
162 self.response_cache_control.as_deref()
163 }
164 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
165 pub fn response_content_disposition(&self) -> ::std::option::Option<&str> {
166 self.response_content_disposition.as_deref()
167 }
168 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
169 pub fn response_content_encoding(&self) -> ::std::option::Option<&str> {
170 self.response_content_encoding.as_deref()
171 }
172 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
173 pub fn response_content_language(&self) -> ::std::option::Option<&str> {
174 self.response_content_language.as_deref()
175 }
176 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
177 pub fn response_content_type(&self) -> ::std::option::Option<&str> {
178 self.response_content_type.as_deref()
179 }
180 /// <p>Sets the <code>Expires</code> header of the response.</p>
181 pub fn response_expires(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
182 self.response_expires.as_ref()
183 }
184 /// <p>Version ID used to reference a specific version of the object.</p>
185 /// <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>
186 /// <ul>
187 /// <li>
188 /// <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>
189 /// <li>
190 /// <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>
191 /// <li>
192 /// <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>
193 /// </ul>
194 /// </note>
195 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
196 pub fn version_id(&self) -> ::std::option::Option<&str> {
197 self.version_id.as_deref()
198 }
199 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
200 /// <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>
201 /// <ul>
202 /// <li>
203 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
204 /// <li>
205 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
206 /// <li>
207 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
208 /// </ul>
209 /// <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>
210 /// <p>This functionality is not supported for directory buckets.</p>
211 /// </note>
212 pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
213 self.sse_customer_algorithm.as_deref()
214 }
215 /// <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>
216 /// <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>
217 /// <ul>
218 /// <li>
219 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
220 /// <li>
221 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
222 /// <li>
223 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
224 /// </ul>
225 /// <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>
226 /// <p>This functionality is not supported for directory buckets.</p>
227 /// </note>
228 pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
229 self.sse_customer_key.as_deref()
230 }
231 /// <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>
232 /// <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>
233 /// <ul>
234 /// <li>
235 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
236 /// <li>
237 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
238 /// <li>
239 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
240 /// </ul>
241 /// <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>
242 /// <p>This functionality is not supported for directory buckets.</p>
243 /// </note>
244 pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
245 self.sse_customer_key_md5.as_deref()
246 }
247 /// <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 corresponding charges to copy the object. 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>
248 /// <p>This functionality is not supported for directory buckets.</p>
249 /// </note>
250 pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
251 self.request_payer.as_ref()
252 }
253 /// <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>
254 pub fn part_number(&self) -> ::std::option::Option<i32> {
255 self.part_number
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 /// <p>In addition, if you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
263 pub fn checksum_mode(&self) -> ::std::option::Option<&crate::types::ChecksumMode> {
264 self.checksum_mode.as_ref()
265 }
266}
267impl ::std::fmt::Debug for GetObjectInput {
268 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
269 let mut formatter = f.debug_struct("GetObjectInput");
270 formatter.field("bucket", &self.bucket);
271 formatter.field("if_match", &self.if_match);
272 formatter.field("if_modified_since", &self.if_modified_since);
273 formatter.field("if_none_match", &self.if_none_match);
274 formatter.field("if_unmodified_since", &self.if_unmodified_since);
275 formatter.field("key", &self.key);
276 formatter.field("range", &self.range);
277 formatter.field("response_cache_control", &self.response_cache_control);
278 formatter.field("response_content_disposition", &self.response_content_disposition);
279 formatter.field("response_content_encoding", &self.response_content_encoding);
280 formatter.field("response_content_language", &self.response_content_language);
281 formatter.field("response_content_type", &self.response_content_type);
282 formatter.field("response_expires", &self.response_expires);
283 formatter.field("version_id", &self.version_id);
284 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
285 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
286 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
287 formatter.field("request_payer", &self.request_payer);
288 formatter.field("part_number", &self.part_number);
289 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
290 formatter.field("checksum_mode", &self.checksum_mode);
291 formatter.finish()
292 }
293}
294impl GetObjectInput {
295 /// Creates a new builder-style object to manufacture [`GetObjectInput`](crate::operation::get_object::GetObjectInput).
296 pub fn builder() -> crate::operation::get_object::builders::GetObjectInputBuilder {
297 crate::operation::get_object::builders::GetObjectInputBuilder::default()
298 }
299}
300
301/// A builder for [`GetObjectInput`](crate::operation::get_object::GetObjectInput).
302#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
303#[non_exhaustive]
304pub struct GetObjectInputBuilder {
305 pub(crate) bucket: ::std::option::Option<::std::string::String>,
306 pub(crate) if_match: ::std::option::Option<::std::string::String>,
307 pub(crate) if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
308 pub(crate) if_none_match: ::std::option::Option<::std::string::String>,
309 pub(crate) if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
310 pub(crate) key: ::std::option::Option<::std::string::String>,
311 pub(crate) range: ::std::option::Option<::std::string::String>,
312 pub(crate) response_cache_control: ::std::option::Option<::std::string::String>,
313 pub(crate) response_content_disposition: ::std::option::Option<::std::string::String>,
314 pub(crate) response_content_encoding: ::std::option::Option<::std::string::String>,
315 pub(crate) response_content_language: ::std::option::Option<::std::string::String>,
316 pub(crate) response_content_type: ::std::option::Option<::std::string::String>,
317 pub(crate) response_expires: ::std::option::Option<::aws_smithy_types::DateTime>,
318 pub(crate) version_id: ::std::option::Option<::std::string::String>,
319 pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
320 pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
321 pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
322 pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
323 pub(crate) part_number: ::std::option::Option<i32>,
324 pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
325 pub(crate) checksum_mode: ::std::option::Option<crate::types::ChecksumMode>,
326}
327impl GetObjectInputBuilder {
328 /// <p>The bucket name containing the object.</p>
329 /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
330 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. 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>
331 /// <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>
332 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
333 /// </note>
334 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
335 /// This field is required.
336 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
337 self.bucket = ::std::option::Option::Some(input.into());
338 self
339 }
340 /// <p>The bucket name containing the object.</p>
341 /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
342 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. 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>
343 /// <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>
344 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
345 /// </note>
346 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
347 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
348 self.bucket = input;
349 self
350 }
351 /// <p>The bucket name containing the object.</p>
352 /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
353 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. 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>
354 /// <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>
355 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
356 /// </note>
357 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
358 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
359 &self.bucket
360 }
361 /// <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>
362 /// <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>
363 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
364 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
365 self.if_match = ::std::option::Option::Some(input.into());
366 self
367 }
368 /// <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>
369 /// <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>
370 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
371 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
372 self.if_match = input;
373 self
374 }
375 /// <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>
376 /// <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>
377 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
378 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
379 &self.if_match
380 }
381 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
382 /// <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>
383 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
384 pub fn if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
385 self.if_modified_since = ::std::option::Option::Some(input);
386 self
387 }
388 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
389 /// <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>
390 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
391 pub fn set_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
392 self.if_modified_since = input;
393 self
394 }
395 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
396 /// <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>
397 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
398 pub fn get_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
399 &self.if_modified_since
400 }
401 /// <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>
402 /// <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>
403 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
404 pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
405 self.if_none_match = ::std::option::Option::Some(input.into());
406 self
407 }
408 /// <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>
409 /// <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>
410 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
411 pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
412 self.if_none_match = input;
413 self
414 }
415 /// <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>
416 /// <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>
417 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
418 pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
419 &self.if_none_match
420 }
421 /// <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>
422 /// <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>
423 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
424 pub fn if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
425 self.if_unmodified_since = ::std::option::Option::Some(input);
426 self
427 }
428 /// <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>
429 /// <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>
430 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
431 pub fn set_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
432 self.if_unmodified_since = input;
433 self
434 }
435 /// <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>
436 /// <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>
437 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
438 pub fn get_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
439 &self.if_unmodified_since
440 }
441 /// <p>Key of the object to get.</p>
442 /// This field is required.
443 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
444 self.key = ::std::option::Option::Some(input.into());
445 self
446 }
447 /// <p>Key of the object to get.</p>
448 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
449 self.key = input;
450 self
451 }
452 /// <p>Key of the object to get.</p>
453 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
454 &self.key
455 }
456 /// <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>
457 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
458 /// </note>
459 pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
460 self.range = ::std::option::Option::Some(input.into());
461 self
462 }
463 /// <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>
464 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
465 /// </note>
466 pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
467 self.range = input;
468 self
469 }
470 /// <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>
471 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
472 /// </note>
473 pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
474 &self.range
475 }
476 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
477 pub fn response_cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
478 self.response_cache_control = ::std::option::Option::Some(input.into());
479 self
480 }
481 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
482 pub fn set_response_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
483 self.response_cache_control = input;
484 self
485 }
486 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
487 pub fn get_response_cache_control(&self) -> &::std::option::Option<::std::string::String> {
488 &self.response_cache_control
489 }
490 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
491 pub fn response_content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
492 self.response_content_disposition = ::std::option::Option::Some(input.into());
493 self
494 }
495 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
496 pub fn set_response_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
497 self.response_content_disposition = input;
498 self
499 }
500 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
501 pub fn get_response_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
502 &self.response_content_disposition
503 }
504 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
505 pub fn response_content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
506 self.response_content_encoding = ::std::option::Option::Some(input.into());
507 self
508 }
509 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
510 pub fn set_response_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
511 self.response_content_encoding = input;
512 self
513 }
514 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
515 pub fn get_response_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
516 &self.response_content_encoding
517 }
518 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
519 pub fn response_content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
520 self.response_content_language = ::std::option::Option::Some(input.into());
521 self
522 }
523 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
524 pub fn set_response_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
525 self.response_content_language = input;
526 self
527 }
528 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
529 pub fn get_response_content_language(&self) -> &::std::option::Option<::std::string::String> {
530 &self.response_content_language
531 }
532 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
533 pub fn response_content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
534 self.response_content_type = ::std::option::Option::Some(input.into());
535 self
536 }
537 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
538 pub fn set_response_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
539 self.response_content_type = input;
540 self
541 }
542 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
543 pub fn get_response_content_type(&self) -> &::std::option::Option<::std::string::String> {
544 &self.response_content_type
545 }
546 /// <p>Sets the <code>Expires</code> header of the response.</p>
547 pub fn response_expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
548 self.response_expires = ::std::option::Option::Some(input);
549 self
550 }
551 /// <p>Sets the <code>Expires</code> header of the response.</p>
552 pub fn set_response_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
553 self.response_expires = input;
554 self
555 }
556 /// <p>Sets the <code>Expires</code> header of the response.</p>
557 pub fn get_response_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
558 &self.response_expires
559 }
560 /// <p>Version ID used to reference a specific version of the object.</p>
561 /// <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>
562 /// <ul>
563 /// <li>
564 /// <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>
565 /// <li>
566 /// <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>
567 /// <li>
568 /// <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>
569 /// </ul>
570 /// </note>
571 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
572 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
573 self.version_id = ::std::option::Option::Some(input.into());
574 self
575 }
576 /// <p>Version ID used to reference a specific version of the object.</p>
577 /// <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>
578 /// <ul>
579 /// <li>
580 /// <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>
581 /// <li>
582 /// <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>
583 /// <li>
584 /// <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>
585 /// </ul>
586 /// </note>
587 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
588 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
589 self.version_id = input;
590 self
591 }
592 /// <p>Version ID used to reference a specific version of the object.</p>
593 /// <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>
594 /// <ul>
595 /// <li>
596 /// <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>
597 /// <li>
598 /// <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>
599 /// <li>
600 /// <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>
601 /// </ul>
602 /// </note>
603 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
604 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
605 &self.version_id
606 }
607 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
608 /// <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>
609 /// <ul>
610 /// <li>
611 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
612 /// <li>
613 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
614 /// <li>
615 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
616 /// </ul>
617 /// <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>
618 /// <p>This functionality is not supported for directory buckets.</p>
619 /// </note>
620 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
621 self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
622 self
623 }
624 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
625 /// <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>
626 /// <ul>
627 /// <li>
628 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
629 /// <li>
630 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
631 /// <li>
632 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
633 /// </ul>
634 /// <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>
635 /// <p>This functionality is not supported for directory buckets.</p>
636 /// </note>
637 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
638 self.sse_customer_algorithm = input;
639 self
640 }
641 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
642 /// <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>
643 /// <ul>
644 /// <li>
645 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
646 /// <li>
647 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
648 /// <li>
649 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
650 /// </ul>
651 /// <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>
652 /// <p>This functionality is not supported for directory buckets.</p>
653 /// </note>
654 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
655 &self.sse_customer_algorithm
656 }
657 /// <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>
658 /// <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>
659 /// <ul>
660 /// <li>
661 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
662 /// <li>
663 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
664 /// <li>
665 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
666 /// </ul>
667 /// <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>
668 /// <p>This functionality is not supported for directory buckets.</p>
669 /// </note>
670 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
671 self.sse_customer_key = ::std::option::Option::Some(input.into());
672 self
673 }
674 /// <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>
675 /// <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>
676 /// <ul>
677 /// <li>
678 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
679 /// <li>
680 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
681 /// <li>
682 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
683 /// </ul>
684 /// <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>
685 /// <p>This functionality is not supported for directory buckets.</p>
686 /// </note>
687 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
688 self.sse_customer_key = input;
689 self
690 }
691 /// <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>
692 /// <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>
693 /// <ul>
694 /// <li>
695 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
696 /// <li>
697 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
698 /// <li>
699 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
700 /// </ul>
701 /// <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>
702 /// <p>This functionality is not supported for directory buckets.</p>
703 /// </note>
704 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
705 &self.sse_customer_key
706 }
707 /// <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>
708 /// <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>
709 /// <ul>
710 /// <li>
711 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
712 /// <li>
713 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
714 /// <li>
715 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
716 /// </ul>
717 /// <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>
718 /// <p>This functionality is not supported for directory buckets.</p>
719 /// </note>
720 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
721 self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
722 self
723 }
724 /// <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>
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_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
738 self.sse_customer_key_md5 = input;
739 self
740 }
741 /// <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>
742 /// <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>
743 /// <ul>
744 /// <li>
745 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
746 /// <li>
747 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
748 /// <li>
749 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
750 /// </ul>
751 /// <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>
752 /// <p>This functionality is not supported for directory buckets.</p>
753 /// </note>
754 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
755 &self.sse_customer_key_md5
756 }
757 /// <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 corresponding charges to copy the object. 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>
758 /// <p>This functionality is not supported for directory buckets.</p>
759 /// </note>
760 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
761 self.request_payer = ::std::option::Option::Some(input);
762 self
763 }
764 /// <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 corresponding charges to copy the object. 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>
765 /// <p>This functionality is not supported for directory buckets.</p>
766 /// </note>
767 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
768 self.request_payer = input;
769 self
770 }
771 /// <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 corresponding charges to copy the object. 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>
772 /// <p>This functionality is not supported for directory buckets.</p>
773 /// </note>
774 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
775 &self.request_payer
776 }
777 /// <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>
778 pub fn part_number(mut self, input: i32) -> Self {
779 self.part_number = ::std::option::Option::Some(input);
780 self
781 }
782 /// <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>
783 pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
784 self.part_number = input;
785 self
786 }
787 /// <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>
788 pub fn get_part_number(&self) -> &::std::option::Option<i32> {
789 &self.part_number
790 }
791 /// <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>
792 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
793 self.expected_bucket_owner = ::std::option::Option::Some(input.into());
794 self
795 }
796 /// <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>
797 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
798 self.expected_bucket_owner = input;
799 self
800 }
801 /// <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>
802 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
803 &self.expected_bucket_owner
804 }
805 /// <p>To retrieve the checksum, this mode must be enabled.</p>
806 /// <p>In addition, if you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
807 pub fn checksum_mode(mut self, input: crate::types::ChecksumMode) -> Self {
808 self.checksum_mode = ::std::option::Option::Some(input);
809 self
810 }
811 /// <p>To retrieve the checksum, this mode must be enabled.</p>
812 /// <p>In addition, if you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
813 pub fn set_checksum_mode(mut self, input: ::std::option::Option<crate::types::ChecksumMode>) -> Self {
814 self.checksum_mode = input;
815 self
816 }
817 /// <p>To retrieve the checksum, this mode must be enabled.</p>
818 /// <p>In addition, if you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
819 pub fn get_checksum_mode(&self) -> &::std::option::Option<crate::types::ChecksumMode> {
820 &self.checksum_mode
821 }
822 /// Consumes the builder and constructs a [`GetObjectInput`](crate::operation::get_object::GetObjectInput).
823 pub fn build(self) -> ::std::result::Result<crate::operation::get_object::GetObjectInput, ::aws_smithy_types::error::operation::BuildError> {
824 ::std::result::Result::Ok(crate::operation::get_object::GetObjectInput {
825 bucket: self.bucket,
826 if_match: self.if_match,
827 if_modified_since: self.if_modified_since,
828 if_none_match: self.if_none_match,
829 if_unmodified_since: self.if_unmodified_since,
830 key: self.key,
831 range: self.range,
832 response_cache_control: self.response_cache_control,
833 response_content_disposition: self.response_content_disposition,
834 response_content_encoding: self.response_content_encoding,
835 response_content_language: self.response_content_language,
836 response_content_type: self.response_content_type,
837 response_expires: self.response_expires,
838 version_id: self.version_id,
839 sse_customer_algorithm: self.sse_customer_algorithm,
840 sse_customer_key: self.sse_customer_key,
841 sse_customer_key_md5: self.sse_customer_key_md5,
842 request_payer: self.request_payer,
843 part_number: self.part_number,
844 expected_bucket_owner: self.expected_bucket_owner,
845 checksum_mode: self.checksum_mode,
846 })
847 }
848}
849impl ::std::fmt::Debug for GetObjectInputBuilder {
850 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
851 let mut formatter = f.debug_struct("GetObjectInputBuilder");
852 formatter.field("bucket", &self.bucket);
853 formatter.field("if_match", &self.if_match);
854 formatter.field("if_modified_since", &self.if_modified_since);
855 formatter.field("if_none_match", &self.if_none_match);
856 formatter.field("if_unmodified_since", &self.if_unmodified_since);
857 formatter.field("key", &self.key);
858 formatter.field("range", &self.range);
859 formatter.field("response_cache_control", &self.response_cache_control);
860 formatter.field("response_content_disposition", &self.response_content_disposition);
861 formatter.field("response_content_encoding", &self.response_content_encoding);
862 formatter.field("response_content_language", &self.response_content_language);
863 formatter.field("response_content_type", &self.response_content_type);
864 formatter.field("response_expires", &self.response_expires);
865 formatter.field("version_id", &self.version_id);
866 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
867 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
868 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
869 formatter.field("request_payer", &self.request_payer);
870 formatter.field("part_number", &self.part_number);
871 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
872 formatter.field("checksum_mode", &self.checksum_mode);
873 formatter.finish()
874 }
875}