aws_sdk_s3/operation/
list_objects.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `ListObjects`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct ListObjects;
6impl ListObjects {
7    /// Creates a new `ListObjects`
8    pub fn new() -> Self {
9        Self
10    }
11    pub(crate) async fn orchestrate(
12        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
13        input: crate::operation::list_objects::ListObjectsInput,
14    ) -> ::std::result::Result<
15        crate::operation::list_objects::ListObjectsOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::list_objects::ListObjectsError,
18            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19        >,
20    > {
21        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22            ::aws_smithy_runtime_api::client::interceptors::context::Error,
23            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24        >| {
25            err.map_service_error(|err| {
26                err.downcast::<crate::operation::list_objects::ListObjectsError>()
27                    .expect("correct error type")
28            })
29        };
30        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31            .await
32            .map_err(map_err)?;
33        let output = context.finalize().map_err(map_err)?;
34        ::std::result::Result::Ok(
35            output
36                .downcast::<crate::operation::list_objects::ListObjectsOutput>()
37                .expect("correct output type"),
38        )
39    }
40
41    pub(crate) async fn orchestrate_with_stop_point(
42        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43        input: crate::operation::list_objects::ListObjectsInput,
44        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45    ) -> ::std::result::Result<
46        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47        ::aws_smithy_runtime_api::client::result::SdkError<
48            ::aws_smithy_runtime_api::client::interceptors::context::Error,
49            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50        >,
51    > {
52        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("s3", "ListObjects", input, runtime_plugins, stop_point).await
54    }
55
56    pub(crate) fn operation_runtime_plugins(
57        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
58        client_config: &crate::config::Config,
59        config_override: ::std::option::Option<crate::config::Builder>,
60    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
61        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
62        runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![
63            ::aws_runtime::auth::sigv4::SCHEME_ID,
64            #[cfg(feature = "sigv4a")]
65            {
66                ::aws_runtime::auth::sigv4a::SCHEME_ID
67            },
68            crate::s3_express::auth::SCHEME_ID,
69            ::aws_smithy_runtime::client::auth::no_auth::NO_AUTH_SCHEME_ID,
70        ]));
71        if let ::std::option::Option::Some(config_override) = config_override {
72            for plugin in config_override.runtime_plugins.iter().cloned() {
73                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
74            }
75            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
76                config_override,
77                client_config.config.clone(),
78                &client_config.runtime_components,
79            ));
80        }
81        runtime_plugins
82    }
83}
84impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListObjects {
85    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
86        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListObjects");
87
88        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
89            ListObjectsRequestSerializer,
90        ));
91        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
92            ListObjectsResponseDeserializer,
93        ));
94
95        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
96            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
97        ));
98
99        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("ListObjects", "s3"));
100        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
101        signing_options.double_uri_encode = false;
102        signing_options.content_sha256_header = true;
103        signing_options.normalize_uri_path = false;
104        signing_options.payload_override = None;
105
106        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
107            signing_options,
108            ..::std::default::Default::default()
109        });
110
111        ::std::option::Option::Some(cfg.freeze())
112    }
113
114    fn runtime_components(
115        &self,
116        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
117    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
118        #[allow(unused_mut)]
119        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListObjects")
120            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
121            .with_interceptor(ListObjectsEndpointParamsInterceptor)
122            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
123                crate::operation::list_objects::ListObjectsError,
124            >::new())
125            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
126                crate::operation::list_objects::ListObjectsError,
127            >::new())
128            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
129                crate::operation::list_objects::ListObjectsError,
130            >::new());
131
132        ::std::borrow::Cow::Owned(rcb)
133    }
134}
135
136#[derive(Debug)]
137struct ListObjectsResponseDeserializer;
138impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListObjectsResponseDeserializer {
139    fn deserialize_nonstreaming(
140        &self,
141        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
142    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
143        let (success, status) = (response.status().is_success(), response.status().as_u16());
144        let headers = response.headers();
145        let body = response.body().bytes().expect("body loaded");
146        #[allow(unused_mut)]
147        let mut force_error = false;
148        ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
149        if matches!(crate::rest_xml_unwrapped_errors::body_is_error(body), Ok(true)) {
150            force_error = true;
151        }
152        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
153        let parse_result = if !success && status != 200 || force_error {
154            crate::protocol_serde::shape_list_objects::de_list_objects_http_error(status, headers, body)
155        } else {
156            crate::protocol_serde::shape_list_objects::de_list_objects_http_response(status, headers, body)
157        };
158        crate::protocol_serde::type_erase_result(parse_result)
159    }
160}
161#[derive(Debug)]
162struct ListObjectsRequestSerializer;
163impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListObjectsRequestSerializer {
164    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
165    fn serialize_input(
166        &self,
167        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
168        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
169    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
170        let input = input
171            .downcast::<crate::operation::list_objects::ListObjectsInput>()
172            .expect("correct type");
173        let _header_serialization_settings = _cfg
174            .load::<crate::serialization_settings::HeaderSerializationSettings>()
175            .cloned()
176            .unwrap_or_default();
177        let mut request_builder = {
178            fn uri_base(
179                _input: &crate::operation::list_objects::ListObjectsInput,
180                output: &mut ::std::string::String,
181            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
182                use ::std::fmt::Write as _;
183                ::std::write!(output, "/").expect("formatting should succeed");
184                ::std::result::Result::Ok(())
185            }
186            fn uri_query(
187                _input: &crate::operation::list_objects::ListObjectsInput,
188                mut output: &mut ::std::string::String,
189            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
190                let mut query = ::aws_smithy_http::query::Writer::new(output);
191                if let ::std::option::Option::Some(inner_1) = &_input.delimiter {
192                    {
193                        query.push_kv("delimiter", &::aws_smithy_http::query::fmt_string(inner_1));
194                    }
195                }
196                if let ::std::option::Option::Some(inner_2) = &_input.encoding_type {
197                    {
198                        query.push_kv("encoding-type", &::aws_smithy_http::query::fmt_string(inner_2));
199                    }
200                }
201                if let ::std::option::Option::Some(inner_3) = &_input.marker {
202                    {
203                        query.push_kv("marker", &::aws_smithy_http::query::fmt_string(inner_3));
204                    }
205                }
206                if let ::std::option::Option::Some(inner_4) = &_input.max_keys {
207                    {
208                        query.push_kv("max-keys", ::aws_smithy_types::primitive::Encoder::from(*inner_4).encode());
209                    }
210                }
211                if let ::std::option::Option::Some(inner_5) = &_input.prefix {
212                    {
213                        query.push_kv("prefix", &::aws_smithy_http::query::fmt_string(inner_5));
214                    }
215                }
216                ::std::result::Result::Ok(())
217            }
218            #[allow(clippy::unnecessary_wraps)]
219            fn update_http_builder(
220                input: &crate::operation::list_objects::ListObjectsInput,
221                builder: ::http::request::Builder,
222            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
223                let mut uri = ::std::string::String::new();
224                uri_base(input, &mut uri)?;
225                uri_query(input, &mut uri)?;
226                let builder = crate::protocol_serde::shape_list_objects::ser_list_objects_headers(input, builder)?;
227                ::std::result::Result::Ok(builder.method("GET").uri(uri))
228            }
229            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
230            builder
231        };
232        let body = ::aws_smithy_types::body::SdkBody::from("");
233
234        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
235    }
236}
237#[derive(Debug)]
238struct ListObjectsEndpointParamsInterceptor;
239
240impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListObjectsEndpointParamsInterceptor {
241    fn name(&self) -> &'static str {
242        "ListObjectsEndpointParamsInterceptor"
243    }
244
245    fn read_before_execution(
246        &self,
247        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
248            '_,
249            ::aws_smithy_runtime_api::client::interceptors::context::Input,
250            ::aws_smithy_runtime_api::client::interceptors::context::Output,
251            ::aws_smithy_runtime_api::client::interceptors::context::Error,
252        >,
253        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
254    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
255        let _input = context
256            .input()
257            .downcast_ref::<ListObjectsInput>()
258            .ok_or("failed to downcast to ListObjectsInput")?;
259
260        let params = crate::config::endpoint::Params::builder()
261            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
262            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
263            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
264            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
265            .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
266            .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
267            .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
268            .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
269            .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
270            .set_bucket(Some(
271                _input
272                    .bucket
273                    .clone()
274                    .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
275                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
276            ))
277            .set_prefix(_input.prefix.clone())
278            .build()
279            .map_err(|err| {
280                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
281            })?;
282        cfg.interceptor_state()
283            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
284        ::std::result::Result::Ok(())
285    }
286}
287#[allow(unreachable_code, unused_variables)]
288#[cfg(test)]
289mod list_objects_request_test {
290    /// This test validates that parsing respects whitespace
291    /// Test ID: KeysWithWhitespace
292    #[::tokio::test]
293    #[allow(unused_mut)]
294    async fn keys_with_whitespace_response() {
295        let expected_output = crate::operation::list_objects::ListObjectsOutput::builder()
296            .set_max_keys(::std::option::Option::Some(1000))
297            .set_is_truncated(::std::option::Option::Some(false))
298            .set_marker(::std::option::Option::Some("".to_owned()))
299            .set_name(::std::option::Option::Some("bucketname".to_owned()))
300            .set_prefix(::std::option::Option::Some("".to_owned()))
301            .set_contents(::std::option::Option::Some(vec![
302                crate::types::Object::builder()
303                    .set_key(::std::option::Option::Some("    ".to_owned()))
304                    .set_last_modified(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
305                        1626452453, 0_f64,
306                    )))
307                    .set_e_tag(::std::option::Option::Some("\"etag123\"".to_owned()))
308                    .set_size(::std::option::Option::Some(0))
309                    .set_owner(::std::option::Option::Some(
310                        crate::types::Owner::builder()
311                            .set_id(::std::option::Option::Some("owner".to_owned()))
312                            .build(),
313                    ))
314                    .set_storage_class(::std::option::Option::Some(
315                        "STANDARD"
316                            .parse::<crate::types::ObjectStorageClass>()
317                            .expect("static value validated to member"),
318                    ))
319                    .build(),
320                crate::types::Object::builder()
321                    .set_key(::std::option::Option::Some(" a ".to_owned()))
322                    .set_last_modified(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
323                        1626451330, 0_f64,
324                    )))
325                    .set_e_tag(::std::option::Option::Some("\"etag123\"".to_owned()))
326                    .set_size(::std::option::Option::Some(0))
327                    .set_owner(::std::option::Option::Some(
328                        crate::types::Owner::builder()
329                            .set_id(::std::option::Option::Some("owner".to_owned()))
330                            .build(),
331                    ))
332                    .set_storage_class(::std::option::Option::Some(
333                        "STANDARD"
334                            .parse::<crate::types::ObjectStorageClass>()
335                            .expect("static value validated to member"),
336                    ))
337                    .build(),
338            ]))
339            .build();
340        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http::response::Builder::new()
341        .status(200)
342                    .body(::aws_smithy_types::body::SdkBody::from("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<ListBucketResult\n\txmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">\n\t<Name>bucketname</Name>\n\t<Prefix></Prefix>\n\t<Marker></Marker>\n\t<MaxKeys>1000</MaxKeys>\n\t<IsTruncated>false</IsTruncated>\n\t<Contents>\n\t\t<Key>    </Key>\n\t\t<LastModified>2021-07-16T16:20:53.000Z</LastModified>\n\t\t<ETag>&quot;etag123&quot;</ETag>\n\t\t<Size>0</Size>\n\t\t<Owner>\n\t\t\t<ID>owner</ID>\n\t\t</Owner>\n\t\t<StorageClass>STANDARD</StorageClass>\n\t</Contents>\n\t<Contents>\n\t\t<Key> a </Key>\n\t\t<LastModified>2021-07-16T16:02:10.000Z</LastModified>\n\t\t<ETag>&quot;etag123&quot;</ETag>\n\t\t<Size>0</Size>\n\t\t<Owner>\n\t\t\t<ID>owner</ID>\n\t\t</Owner>\n\t\t<StorageClass>STANDARD</StorageClass>\n\t</Contents>\n</ListBucketResult>\n"))
343                    .unwrap()
344                    ).unwrap();
345        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
346        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
347
348        let op = crate::operation::list_objects::ListObjects::new();
349        let config = op.config().expect("the operation has config");
350        let de = config
351            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
352            .expect("the config must have a deserializer");
353
354        let parsed = de.deserialize_streaming(&mut http_response);
355        let parsed = parsed.unwrap_or_else(|| {
356            let http_response =
357                http_response.map(|body| ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(body.bytes().unwrap())));
358            de.deserialize_nonstreaming(&http_response)
359        });
360        let parsed = parsed
361            .expect("should be successful response")
362            .downcast::<crate::operation::list_objects::ListObjectsOutput>()
363            .unwrap();
364        ::pretty_assertions::assert_eq!(parsed.is_truncated, expected_output.is_truncated, "Unexpected value for `is_truncated`");
365        ::pretty_assertions::assert_eq!(parsed.marker, expected_output.marker, "Unexpected value for `marker`");
366        ::pretty_assertions::assert_eq!(parsed.next_marker, expected_output.next_marker, "Unexpected value for `next_marker`");
367        ::pretty_assertions::assert_eq!(parsed.contents, expected_output.contents, "Unexpected value for `contents`");
368        ::pretty_assertions::assert_eq!(parsed.name, expected_output.name, "Unexpected value for `name`");
369        ::pretty_assertions::assert_eq!(parsed.prefix, expected_output.prefix, "Unexpected value for `prefix`");
370        ::pretty_assertions::assert_eq!(parsed.delimiter, expected_output.delimiter, "Unexpected value for `delimiter`");
371        ::pretty_assertions::assert_eq!(parsed.max_keys, expected_output.max_keys, "Unexpected value for `max_keys`");
372        ::pretty_assertions::assert_eq!(
373            parsed.common_prefixes,
374            expected_output.common_prefixes,
375            "Unexpected value for `common_prefixes`"
376        );
377        ::pretty_assertions::assert_eq!(
378            parsed.encoding_type,
379            expected_output.encoding_type,
380            "Unexpected value for `encoding_type`"
381        );
382        ::pretty_assertions::assert_eq!(
383            parsed.request_charged,
384            expected_output.request_charged,
385            "Unexpected value for `request_charged`"
386        );
387    }
388}
389
390/// Error type for the `ListObjectsError` operation.
391#[non_exhaustive]
392#[derive(::std::fmt::Debug)]
393pub enum ListObjectsError {
394    /// <p>The specified bucket does not exist.</p>
395    NoSuchBucket(crate::types::error::NoSuchBucket),
396    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
397    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
398    variable wildcard pattern and check `.code()`:
399     \
400    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
401     \
402    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListObjectsError) for what information is available for the error.")]
403    Unhandled(crate::error::sealed_unhandled::Unhandled),
404}
405impl ListObjectsError {
406    /// Creates the `ListObjectsError::Unhandled` variant from any error type.
407    pub fn unhandled(
408        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
409    ) -> Self {
410        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
411            source: err.into(),
412            meta: ::std::default::Default::default(),
413        })
414    }
415
416    /// Creates the `ListObjectsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
417    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
418        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
419            source: err.clone().into(),
420            meta: err,
421        })
422    }
423    ///
424    /// Returns error metadata, which includes the error code, message,
425    /// request ID, and potentially additional information.
426    ///
427    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
428        match self {
429            Self::NoSuchBucket(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
430            Self::Unhandled(e) => &e.meta,
431        }
432    }
433    /// Returns `true` if the error kind is `ListObjectsError::NoSuchBucket`.
434    pub fn is_no_such_bucket(&self) -> bool {
435        matches!(self, Self::NoSuchBucket(_))
436    }
437}
438impl ::std::error::Error for ListObjectsError {
439    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
440        match self {
441            Self::NoSuchBucket(_inner) => ::std::option::Option::Some(_inner),
442            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
443        }
444    }
445}
446impl ::std::fmt::Display for ListObjectsError {
447    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
448        match self {
449            Self::NoSuchBucket(_inner) => _inner.fmt(f),
450            Self::Unhandled(_inner) => {
451                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
452                    write!(f, "unhandled error ({code})")
453                } else {
454                    f.write_str("unhandled error")
455                }
456            }
457        }
458    }
459}
460impl ::aws_smithy_types::retry::ProvideErrorKind for ListObjectsError {
461    fn code(&self) -> ::std::option::Option<&str> {
462        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
463    }
464    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
465        ::std::option::Option::None
466    }
467}
468impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListObjectsError {
469    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
470        match self {
471            Self::NoSuchBucket(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
472            Self::Unhandled(_inner) => &_inner.meta,
473        }
474    }
475}
476impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListObjectsError {
477    fn create_unhandled_error(
478        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
479        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
480    ) -> Self {
481        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
482            source,
483            meta: meta.unwrap_or_default(),
484        })
485    }
486}
487impl crate::s3_request_id::RequestIdExt for crate::operation::list_objects::ListObjectsError {
488    fn extended_request_id(&self) -> Option<&str> {
489        self.meta().extended_request_id()
490    }
491}
492impl ::aws_types::request_id::RequestId for crate::operation::list_objects::ListObjectsError {
493    fn request_id(&self) -> Option<&str> {
494        self.meta().request_id()
495    }
496}
497
498pub use crate::operation::list_objects::_list_objects_output::ListObjectsOutput;
499
500pub use crate::operation::list_objects::_list_objects_input::ListObjectsInput;
501
502mod _list_objects_input;
503
504mod _list_objects_output;
505
506/// Builders
507pub mod builders;