aws_sdk_s3/waiters/
object_exists.rs

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