aws_sdk_s3/waiters/
object_not_exists.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3///
4/// Fluent builder for the `object_not_exists` waiter.
5///
6/// This builder is intended to be used similar to the other fluent builders for
7/// normal operations on the client. However, instead of a `send` method, it has
8/// a `wait` method that takes a maximum amount of time to wait.
9///
10/// Construct this fluent builder using the client by importing the
11/// [`Waiters`](crate::client::Waiters) trait and calling the methods
12/// prefixed with `wait_until`.
13///
14#[derive(::std::clone::Clone, ::std::fmt::Debug)]
15pub struct ObjectNotExistsFluentBuilder {
16    handle: ::std::sync::Arc<crate::client::Handle>,
17    inner: crate::operation::head_object::builders::HeadObjectInputBuilder,
18}
19impl ObjectNotExistsFluentBuilder {
20    /// Creates a new `ObjectNotExistsFluentBuilder`.
21    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
22        Self {
23            handle,
24            inner: ::std::default::Default::default(),
25        }
26    }
27    /// Access the HeadObject as a reference.
28    pub fn as_input(&self) -> &crate::operation::head_object::builders::HeadObjectInputBuilder {
29        &self.inner
30    }
31    /// Wait for `object_not_exists`
32    pub async fn wait(
33        self,
34        max_wait: ::std::time::Duration,
35    ) -> ::std::result::Result<
36        crate::waiters::object_not_exists::ObjectNotExistsFinalPoll,
37        crate::waiters::object_not_exists::WaitUntilObjectNotExistsError,
38    > {
39        let input = self
40            .inner
41            .build()
42            .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
43        let runtime_plugins = crate::operation::head_object::HeadObject::operation_runtime_plugins(
44            self.handle.runtime_plugins.clone(),
45            &self.handle.conf,
46            ::std::option::Option::None,
47        )
48        .with_operation_plugin(crate::sdk_feature_tracker::waiter::WaiterFeatureTrackerRuntimePlugin::new());
49        let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
50        let runtime_components_builder = runtime_plugins
51            .apply_client_configuration(&mut cfg)
52            .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
53        let time_components = runtime_components_builder.into_time_components();
54        let sleep_impl = time_components.sleep_impl().expect("a sleep impl is required by waiters");
55        let time_source = time_components.time_source().expect("a time source is required by waiters");
56
57        let acceptor = move |result: ::std::result::Result<
58            &crate::operation::head_object::HeadObjectOutput,
59            &crate::operation::head_object::HeadObjectError,
60        >| {
61            // Matches: {"errorType":"NotFound"}
62            if crate::waiters::matchers::match_head_object_01223db2f9ae15f05(result) {
63                return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
64            }
65            ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
66        };
67        let operation = move || {
68            let input = input.clone();
69            let runtime_plugins = runtime_plugins.clone();
70            async move { crate::operation::head_object::HeadObject::orchestrate(&runtime_plugins, input).await }
71        };
72        let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
73            .min_delay(::std::time::Duration::from_secs(5))
74            .max_delay(::std::time::Duration::from_secs(120))
75            .max_wait(max_wait)
76            .time_source(time_source)
77            .sleep_impl(sleep_impl)
78            .acceptor(acceptor)
79            .operation(operation)
80            .build();
81        ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
82    }
83    /// <p>The name of the bucket that contains the object.</p>
84    /// <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>
85    /// <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><note>
86    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
87    /// </note>
88    /// <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>
89    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.inner = self.inner.bucket(input.into());
91        self
92    }
93    /// <p>The name of the bucket that contains the object.</p>
94    /// <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>
95    /// <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><note>
96    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
97    /// </note>
98    /// <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>
99    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.inner = self.inner.set_bucket(input);
101        self
102    }
103    /// <p>The name of the bucket that contains the object.</p>
104    /// <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>
105    /// <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><note>
106    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
107    /// </note>
108    /// <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>
109    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
110        self.inner.get_bucket()
111    }
112    /// <p>Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.</p>
113    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
114    /// <ul>
115    /// <li>
116    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
117    /// <li>
118    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
119    /// </ul>
120    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
121    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
122    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.inner = self.inner.if_match(input.into());
124        self
125    }
126    /// <p>Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) 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:</p>
128    /// <ul>
129    /// <li>
130    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
131    /// <li>
132    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
133    /// </ul>
134    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
135    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
136    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_if_match(input);
138        self
139    }
140    /// <p>Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.</p>
141    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
142    /// <ul>
143    /// <li>
144    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
145    /// <li>
146    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
147    /// </ul>
148    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
149    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
150    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_if_match()
152    }
153    /// <p>Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.</p>
154    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
155    /// <ul>
156    /// <li>
157    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
158    /// <li>
159    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
160    /// </ul>
161    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
162    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
163    pub fn if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
164        self.inner = self.inner.if_modified_since(input);
165        self
166    }
167    /// <p>Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.</p>
168    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
169    /// <ul>
170    /// <li>
171    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
172    /// <li>
173    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
174    /// </ul>
175    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
176    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
177    pub fn set_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
178        self.inner = self.inner.set_if_modified_since(input);
179        self
180    }
181    /// <p>Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.</p>
182    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
183    /// <ul>
184    /// <li>
185    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
186    /// <li>
187    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
188    /// </ul>
189    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
190    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
191    pub fn get_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
192        self.inner.get_if_modified_since()
193    }
194    /// <p>Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.</p>
195    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
196    /// <ul>
197    /// <li>
198    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
199    /// <li>
200    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
201    /// </ul>
202    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
203    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
204    pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205        self.inner = self.inner.if_none_match(input.into());
206        self
207    }
208    /// <p>Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.</p>
209    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
210    /// <ul>
211    /// <li>
212    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
213    /// <li>
214    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
215    /// </ul>
216    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
217    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
218    pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219        self.inner = self.inner.set_if_none_match(input);
220        self
221    }
222    /// <p>Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.</p>
223    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
224    /// <ul>
225    /// <li>
226    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
227    /// <li>
228    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
229    /// </ul>
230    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
231    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
232    pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
233        self.inner.get_if_none_match()
234    }
235    /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.</p>
236    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
237    /// <ul>
238    /// <li>
239    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
240    /// <li>
241    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
242    /// </ul>
243    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
244    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
245    pub fn if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
246        self.inner = self.inner.if_unmodified_since(input);
247        self
248    }
249    /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.</p>
250    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
251    /// <ul>
252    /// <li>
253    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
254    /// <li>
255    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
256    /// </ul>
257    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
258    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
259    pub fn set_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
260        self.inner = self.inner.set_if_unmodified_since(input);
261        self
262    }
263    /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.</p>
264    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
265    /// <ul>
266    /// <li>
267    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
268    /// <li>
269    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
270    /// </ul>
271    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
272    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
273    pub fn get_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
274        self.inner.get_if_unmodified_since()
275    }
276    /// <p>The object key.</p>
277    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278        self.inner = self.inner.key(input.into());
279        self
280    }
281    /// <p>The object key.</p>
282    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283        self.inner = self.inner.set_key(input);
284        self
285    }
286    /// <p>The object key.</p>
287    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
288        self.inner.get_key()
289    }
290    /// <p>HeadObject returns only the metadata for an object. If the Range is satisfiable, only the <code>ContentLength</code> is affected in the response. If the Range is not satisfiable, S3 returns a <code>416 - Requested Range Not Satisfiable</code> error.</p>
291    pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
292        self.inner = self.inner.range(input.into());
293        self
294    }
295    /// <p>HeadObject returns only the metadata for an object. If the Range is satisfiable, only the <code>ContentLength</code> is affected in the response. If the Range is not satisfiable, S3 returns a <code>416 - Requested Range Not Satisfiable</code> error.</p>
296    pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
297        self.inner = self.inner.set_range(input);
298        self
299    }
300    /// <p>HeadObject returns only the metadata for an object. If the Range is satisfiable, only the <code>ContentLength</code> is affected in the response. If the Range is not satisfiable, S3 returns a <code>416 - Requested Range Not Satisfiable</code> error.</p>
301    pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
302        self.inner.get_range()
303    }
304    /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
305    pub fn response_cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306        self.inner = self.inner.response_cache_control(input.into());
307        self
308    }
309    /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
310    pub fn set_response_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
311        self.inner = self.inner.set_response_cache_control(input);
312        self
313    }
314    /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
315    pub fn get_response_cache_control(&self) -> &::std::option::Option<::std::string::String> {
316        self.inner.get_response_cache_control()
317    }
318    /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
319    pub fn response_content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
320        self.inner = self.inner.response_content_disposition(input.into());
321        self
322    }
323    /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
324    pub fn set_response_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
325        self.inner = self.inner.set_response_content_disposition(input);
326        self
327    }
328    /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
329    pub fn get_response_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
330        self.inner.get_response_content_disposition()
331    }
332    /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
333    pub fn response_content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
334        self.inner = self.inner.response_content_encoding(input.into());
335        self
336    }
337    /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
338    pub fn set_response_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
339        self.inner = self.inner.set_response_content_encoding(input);
340        self
341    }
342    /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
343    pub fn get_response_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
344        self.inner.get_response_content_encoding()
345    }
346    /// <p>Sets the <code>Content-Language</code> header of the response.</p>
347    pub fn response_content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
348        self.inner = self.inner.response_content_language(input.into());
349        self
350    }
351    /// <p>Sets the <code>Content-Language</code> header of the response.</p>
352    pub fn set_response_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
353        self.inner = self.inner.set_response_content_language(input);
354        self
355    }
356    /// <p>Sets the <code>Content-Language</code> header of the response.</p>
357    pub fn get_response_content_language(&self) -> &::std::option::Option<::std::string::String> {
358        self.inner.get_response_content_language()
359    }
360    /// <p>Sets the <code>Content-Type</code> header of the response.</p>
361    pub fn response_content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
362        self.inner = self.inner.response_content_type(input.into());
363        self
364    }
365    /// <p>Sets the <code>Content-Type</code> header of the response.</p>
366    pub fn set_response_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
367        self.inner = self.inner.set_response_content_type(input);
368        self
369    }
370    /// <p>Sets the <code>Content-Type</code> header of the response.</p>
371    pub fn get_response_content_type(&self) -> &::std::option::Option<::std::string::String> {
372        self.inner.get_response_content_type()
373    }
374    /// <p>Sets the <code>Expires</code> header of the response.</p>
375    pub fn response_expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
376        self.inner = self.inner.response_expires(input);
377        self
378    }
379    /// <p>Sets the <code>Expires</code> header of the response.</p>
380    pub fn set_response_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
381        self.inner = self.inner.set_response_expires(input);
382        self
383    }
384    /// <p>Sets the <code>Expires</code> header of the response.</p>
385    pub fn get_response_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
386        self.inner.get_response_expires()
387    }
388    /// <p>Version ID used to reference a specific version of the object.</p><note>
389    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
390    /// </note>
391    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
392        self.inner = self.inner.version_id(input.into());
393        self
394    }
395    /// <p>Version ID used to reference a specific version of the object.</p><note>
396    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
397    /// </note>
398    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
399        self.inner = self.inner.set_version_id(input);
400        self
401    }
402    /// <p>Version ID used to reference a specific version of the object.</p><note>
403    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
404    /// </note>
405    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
406        self.inner.get_version_id()
407    }
408    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
409    /// <p>This functionality is not supported for directory buckets.</p>
410    /// </note>
411    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
412        self.inner = self.inner.sse_customer_algorithm(input.into());
413        self
414    }
415    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
416    /// <p>This functionality is not supported for directory buckets.</p>
417    /// </note>
418    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
419        self.inner = self.inner.set_sse_customer_algorithm(input);
420        self
421    }
422    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
423    /// <p>This functionality is not supported for directory buckets.</p>
424    /// </note>
425    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
426        self.inner.get_sse_customer_algorithm()
427    }
428    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
429    /// <p>This functionality is not supported for directory buckets.</p>
430    /// </note>
431    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
432        self.inner = self.inner.sse_customer_key(input.into());
433        self
434    }
435    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
436    /// <p>This functionality is not supported for directory buckets.</p>
437    /// </note>
438    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
439        self.inner = self.inner.set_sse_customer_key(input);
440        self
441    }
442    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
443    /// <p>This functionality is not supported for directory buckets.</p>
444    /// </note>
445    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
446        self.inner.get_sse_customer_key()
447    }
448    /// <p>Specifies the 128-bit MD5 digest of the 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><note>
449    /// <p>This functionality is not supported for directory buckets.</p>
450    /// </note>
451    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
452        self.inner = self.inner.sse_customer_key_md5(input.into());
453        self
454    }
455    /// <p>Specifies the 128-bit MD5 digest of the 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><note>
456    /// <p>This functionality is not supported for directory buckets.</p>
457    /// </note>
458    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
459        self.inner = self.inner.set_sse_customer_key_md5(input);
460        self
461    }
462    /// <p>Specifies the 128-bit MD5 digest of the 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><note>
463    /// <p>This functionality is not supported for directory buckets.</p>
464    /// </note>
465    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
466        self.inner.get_sse_customer_key_md5()
467    }
468    /// <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>
469    /// <p>This functionality is not supported for directory buckets.</p>
470    /// </note>
471    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
472        self.inner = self.inner.request_payer(input);
473        self
474    }
475    /// <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>
476    /// <p>This functionality is not supported for directory buckets.</p>
477    /// </note>
478    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
479        self.inner = self.inner.set_request_payer(input);
480        self
481    }
482    /// <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>
483    /// <p>This functionality is not supported for directory buckets.</p>
484    /// </note>
485    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
486        self.inner.get_request_payer()
487    }
488    /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
489    pub fn part_number(mut self, input: i32) -> Self {
490        self.inner = self.inner.part_number(input);
491        self
492    }
493    /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
494    pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
495        self.inner = self.inner.set_part_number(input);
496        self
497    }
498    /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
499    pub fn get_part_number(&self) -> &::std::option::Option<i32> {
500        self.inner.get_part_number()
501    }
502    /// <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>
503    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
504        self.inner = self.inner.expected_bucket_owner(input.into());
505        self
506    }
507    /// <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>
508    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
509        self.inner = self.inner.set_expected_bucket_owner(input);
510        self
511    }
512    /// <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>
513    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
514        self.inner.get_expected_bucket_owner()
515    }
516    /// <p>To retrieve the checksum, this parameter must be enabled.</p>
517    /// <p><b>General purpose buckets</b> - 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>
518    /// <p><b>Directory buckets</b> - If you enable <code>ChecksumMode</code> and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p>
519    pub fn checksum_mode(mut self, input: crate::types::ChecksumMode) -> Self {
520        self.inner = self.inner.checksum_mode(input);
521        self
522    }
523    /// <p>To retrieve the checksum, this parameter must be enabled.</p>
524    /// <p><b>General purpose buckets</b> - 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>
525    /// <p><b>Directory buckets</b> - If you enable <code>ChecksumMode</code> and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p>
526    pub fn set_checksum_mode(mut self, input: ::std::option::Option<crate::types::ChecksumMode>) -> Self {
527        self.inner = self.inner.set_checksum_mode(input);
528        self
529    }
530    /// <p>To retrieve the checksum, this parameter must be enabled.</p>
531    /// <p><b>General purpose buckets</b> - 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>
532    /// <p><b>Directory buckets</b> - If you enable <code>ChecksumMode</code> and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p>
533    pub fn get_checksum_mode(&self) -> &::std::option::Option<crate::types::ChecksumMode> {
534        self.inner.get_checksum_mode()
535    }
536}
537
538/// Successful return type for the `object_not_exists` waiter.
539pub type ObjectNotExistsFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
540    crate::operation::head_object::HeadObjectOutput,
541    ::aws_smithy_runtime_api::client::result::SdkError<
542        crate::operation::head_object::HeadObjectError,
543        ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
544    >,
545>;
546
547/// Error type for the `object_not_exists` waiter.
548pub type WaitUntilObjectNotExistsError = ::aws_smithy_runtime_api::client::waiters::error::WaiterError<
549    crate::operation::head_object::HeadObjectOutput,
550    crate::operation::head_object::HeadObjectError,
551>;