Skip to main content

aws_sdk_s3/operation/
get_object_annotation.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `GetObjectAnnotation`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct GetObjectAnnotation;
6impl GetObjectAnnotation {
7    /// Creates a new `GetObjectAnnotation`
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::get_object_annotation::GetObjectAnnotationInput,
14    ) -> ::std::result::Result<
15        crate::operation::get_object_annotation::GetObjectAnnotationOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::get_object_annotation::GetObjectAnnotationError,
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::get_object_annotation::GetObjectAnnotationError>()
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::get_object_annotation::GetObjectAnnotationOutput>()
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::get_object_annotation::GetObjectAnnotationInput,
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        use ::tracing::Instrument;
54        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("S3", "GetObjectAnnotation", input, runtime_plugins, stop_point)
55            // Create a parent span for the entire operation. Includes a random, internal-only,
56            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
57            .instrument(::tracing::debug_span!(
58                "S3.GetObjectAnnotation",
59                "rpc.service" = "S3",
60                "rpc.method" = "GetObjectAnnotation",
61                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62                "rpc.system" = "aws-api",
63            ))
64            .await
65    }
66
67    pub(crate) fn operation_runtime_plugins(
68        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69        client_config: &crate::config::Config,
70        config_override: ::std::option::Option<crate::config::Builder>,
71    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73
74        if let ::std::option::Option::Some(config_override) = config_override {
75            for plugin in config_override.runtime_plugins.iter().cloned() {
76                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77            }
78            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79                config_override,
80                client_config.config.clone(),
81                &client_config.runtime_components,
82            ));
83        }
84        runtime_plugins
85    }
86}
87impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetObjectAnnotation {
88    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetObjectAnnotation");
90
91        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92            GetObjectAnnotationRequestSerializer,
93        ));
94        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95            GetObjectAnnotationResponseDeserializer,
96        ));
97
98        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99            crate::config::auth::Params::builder()
100                .operation_name("GetObjectAnnotation")
101                .build()
102                .expect("required fields set"),
103        ));
104
105        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("GetObjectAnnotation", "S3"));
106        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
107        signing_options.double_uri_encode = false;
108        signing_options.content_sha256_header = true;
109        signing_options.normalize_uri_path = false;
110        signing_options.payload_override = None;
111
112        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
113            signing_options,
114            ..::std::default::Default::default()
115        });
116
117        ::std::option::Option::Some(cfg.freeze())
118    }
119
120    fn runtime_components(
121        &self,
122        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
123    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
124        #[allow(unused_mut)]
125                    let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetObjectAnnotation")
126                            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()))
127.with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(GetObjectAnnotationEndpointParamsInterceptor))
128.with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(crate::http_response_checksum::ResponseChecksumInterceptor::new(
129                                ["crc64nvme", "crc32", "crc32c", "sha256", "sha1", "sha512", "md5", "xxhash64", "xxhash3", "xxhash128"].as_slice(),
130                                |input: &::aws_smithy_runtime_api::client::interceptors::context::Input| {
131
132                                    let input: &crate::operation::get_object_annotation::GetObjectAnnotationInput = input.downcast_ref().expect("correct type");
133                                    matches!(input.checksum_mode(), ::std::option::Option::Some(crate::types::ChecksumMode::Enabled))
134                                },
135                                |input: &mut ::aws_smithy_runtime_api::client::interceptors::context::Input, cfg: &::aws_smithy_types::config_bag::ConfigBag|  {
136                                    let input = input
137                                        .downcast_mut::<crate::operation::get_object_annotation::GetObjectAnnotationInput>()
138                                        .ok_or("failed to downcast to crate::operation::get_object_annotation::GetObjectAnnotationInput")?;
139
140                                    let request_validation_enabled =
141                                        matches!(input.checksum_mode(), Some(crate::types::ChecksumMode::Enabled));
142
143                                    if !request_validation_enabled {
144                                        // This value is set by the user on the SdkConfig to indicate their preference
145                                        let response_checksum_validation = cfg
146                                            .load::<::aws_smithy_types::checksum_config::ResponseChecksumValidation>()
147                                            .unwrap_or(&::aws_smithy_types::checksum_config::ResponseChecksumValidation::WhenSupported);
148
149                                        let is_presigned_req = cfg.load::<crate::presigning::PresigningMarker>().is_some();
150
151                                        // For presigned requests we do not enable the checksum-mode header.
152                                        if is_presigned_req {
153                                            return ::std::result::Result::Ok(())
154                                        }
155
156                                        // If validation setting is WhenSupported (or unknown) we enable response checksum
157                                        // validation. If it is WhenRequired we do not enable (since there is no way to
158                                        // indicate that a response checksum is required).
159                                        #[allow(clippy::wildcard_in_or_patterns)]
160                                        match response_checksum_validation {
161                                            ::aws_smithy_types::checksum_config::ResponseChecksumValidation::WhenRequired => {}
162                                            ::aws_smithy_types::checksum_config::ResponseChecksumValidation::WhenSupported | _ => {
163                                                input.checksum_mode = Some(crate::types::ChecksumMode::Enabled);
164                                            }
165                                        }
166                                    }
167
168                                    ::std::result::Result::Ok(())
169                                }
170                            )))
171                            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<crate::operation::get_object_annotation::GetObjectAnnotationError>::new())
172.with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<crate::operation::get_object_annotation::GetObjectAnnotationError>::new())
173.with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<crate::operation::get_object_annotation::GetObjectAnnotationError>::builder().transient_errors({
174                                            let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
175                                            transient_errors.push("InternalError");
176                                            ::std::borrow::Cow::Owned(transient_errors)
177                                            }).build());
178
179        ::std::borrow::Cow::Owned(rcb)
180    }
181}
182
183#[derive(Debug)]
184struct GetObjectAnnotationResponseDeserializer;
185impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetObjectAnnotationResponseDeserializer {
186    fn deserialize_streaming(
187        &self,
188        response: &mut ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
189    ) -> ::std::option::Option<::aws_smithy_runtime_api::client::interceptors::context::OutputOrError> {
190        #[allow(unused_mut)]
191        let mut force_error = false;
192        ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
193        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
194
195        // If this is an error, defer to the non-streaming parser
196        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
197            return ::std::option::Option::None;
198        }
199        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
200            crate::protocol_serde::shape_get_object_annotation::de_get_object_annotation_http_response(response),
201        ))
202    }
203
204    fn deserialize_nonstreaming_with_config(
205        &self,
206        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
207        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
208    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
209        // For streaming operations, we only hit this case if its an error
210        let body = response.body().bytes().expect("body loaded");
211        crate::protocol_serde::type_erase_result(crate::protocol_serde::shape_get_object_annotation::de_get_object_annotation_http_error(
212            response.status().as_u16(),
213            response.headers(),
214            body,
215        ))
216    }
217}
218#[derive(Debug)]
219struct GetObjectAnnotationRequestSerializer;
220impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetObjectAnnotationRequestSerializer {
221    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
222    fn serialize_input(
223        &self,
224        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
225        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
226    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
227        let input = input
228            .downcast::<crate::operation::get_object_annotation::GetObjectAnnotationInput>()
229            .expect("correct type");
230        let _header_serialization_settings = _cfg
231            .load::<crate::serialization_settings::HeaderSerializationSettings>()
232            .cloned()
233            .unwrap_or_default();
234        let mut request_builder = {
235            #[allow(clippy::uninlined_format_args)]
236            fn uri_base(
237                _input: &crate::operation::get_object_annotation::GetObjectAnnotationInput,
238                output: &mut ::std::string::String,
239            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
240                use ::std::fmt::Write as _;
241                let input_1 = &_input.key;
242                let input_1 = input_1
243                    .as_ref()
244                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("key", "cannot be empty or unset"))?;
245                let key = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Greedy);
246                if key.is_empty() {
247                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
248                        "key",
249                        "cannot be empty or unset",
250                    ));
251                }
252                ::std::write!(output, "/{Key}", Key = key).expect("formatting should succeed");
253                ::std::result::Result::Ok(())
254            }
255            fn uri_query(
256                _input: &crate::operation::get_object_annotation::GetObjectAnnotationInput,
257                mut output: &mut ::std::string::String,
258            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
259                let mut query = ::aws_smithy_http::query::Writer::new(output);
260                query.push_v("annotation");
261                query.push_kv("x-id", "GetObjectAnnotation");
262                let inner_2 = &_input.annotation_name;
263                let inner_2 = inner_2
264                    .as_ref()
265                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("annotation_name", "cannot be empty or unset"))?;
266                if inner_2.is_empty() {
267                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
268                        "annotation_name",
269                        "cannot be empty or unset",
270                    ));
271                }
272                query.push_kv("annotationName", &::aws_smithy_http::query::fmt_string(inner_2));
273                if let ::std::option::Option::Some(inner_3) = &_input.version_id {
274                    {
275                        query.push_kv("versionId", &::aws_smithy_http::query::fmt_string(inner_3));
276                    }
277                }
278                ::std::result::Result::Ok(())
279            }
280            #[allow(clippy::unnecessary_wraps)]
281            fn update_http_builder(
282                input: &crate::operation::get_object_annotation::GetObjectAnnotationInput,
283                builder: ::http_1x::request::Builder,
284            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
285                let mut uri = ::std::string::String::new();
286                uri_base(input, &mut uri)?;
287                uri_query(input, &mut uri)?;
288                let builder = crate::protocol_serde::shape_get_object_annotation::ser_get_object_annotation_headers(input, builder)?;
289                ::std::result::Result::Ok(builder.method("GET").uri(uri))
290            }
291            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
292            builder
293        };
294        let body = ::aws_smithy_types::body::SdkBody::from("");
295
296        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
297    }
298}
299#[derive(Debug)]
300struct GetObjectAnnotationEndpointParamsInterceptor;
301
302#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
303impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetObjectAnnotationEndpointParamsInterceptor {
304    fn name(&self) -> &'static str {
305        "GetObjectAnnotationEndpointParamsInterceptor"
306    }
307
308    fn read_before_execution(
309        &self,
310        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
311            '_,
312            ::aws_smithy_runtime_api::client::interceptors::context::Input,
313            ::aws_smithy_runtime_api::client::interceptors::context::Output,
314            ::aws_smithy_runtime_api::client::interceptors::context::Error,
315        >,
316        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
317    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
318        let _input = context
319            .input()
320            .downcast_ref::<GetObjectAnnotationInput>()
321            .ok_or("failed to downcast to GetObjectAnnotationInput")?;
322
323        let params = crate::config::endpoint::Params::builder()
324            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
325            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
326            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
327            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
328            .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
329            .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
330            .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
331            .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
332            .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
333            .set_bucket(Some(
334                _input
335                    .bucket
336                    .clone()
337                    .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
338                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
339            ))
340            .set_key(Some(
341                _input
342                    .key
343                    .clone()
344                    .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
345                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("key", "A required field was not set"))?,
346            ))
347            .build()
348            .map_err(|err| {
349                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
350            })?;
351        cfg.interceptor_state()
352            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
353        ::std::result::Result::Ok(())
354    }
355}
356
357// The get_* functions below are generated from JMESPath expressions in the
358// operationContextParams trait. They target the operation's input shape.
359
360/// Error type for the `GetObjectAnnotationError` operation.
361#[non_exhaustive]
362#[derive(::std::fmt::Debug)]
363pub enum GetObjectAnnotationError {
364    /// <p>The specified annotation does not exist on this object.</p>
365    NoSuchAnnotation(crate::types::error::NoSuchAnnotation),
366    /// <p>The specified bucket does not exist.</p>
367    NoSuchBucket(crate::types::error::NoSuchBucket),
368    /// <p>The specified key does not exist.</p>
369    NoSuchKey(crate::types::error::NoSuchKey),
370    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
371    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
372    variable wildcard pattern and check `.code()`:
373     \
374    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
375     \
376    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetObjectAnnotationError) for what information is available for the error.")]
377    Unhandled(crate::error::sealed_unhandled::Unhandled),
378}
379impl GetObjectAnnotationError {
380    /// Creates the `GetObjectAnnotationError::Unhandled` variant from any error type.
381    pub fn unhandled(
382        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
383    ) -> Self {
384        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
385            source: err.into(),
386            meta: ::std::default::Default::default(),
387        })
388    }
389
390    /// Creates the `GetObjectAnnotationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
391    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
392        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
393            source: err.clone().into(),
394            meta: err,
395        })
396    }
397    ///
398    /// Returns error metadata, which includes the error code, message,
399    /// request ID, and potentially additional information.
400    ///
401    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
402        match self {
403            Self::NoSuchAnnotation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
404            Self::NoSuchBucket(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
405            Self::NoSuchKey(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
406            Self::Unhandled(e) => &e.meta,
407        }
408    }
409    /// Returns `true` if the error kind is `GetObjectAnnotationError::NoSuchAnnotation`.
410    pub fn is_no_such_annotation(&self) -> bool {
411        matches!(self, Self::NoSuchAnnotation(_))
412    }
413    /// Returns `true` if the error kind is `GetObjectAnnotationError::NoSuchBucket`.
414    pub fn is_no_such_bucket(&self) -> bool {
415        matches!(self, Self::NoSuchBucket(_))
416    }
417    /// Returns `true` if the error kind is `GetObjectAnnotationError::NoSuchKey`.
418    pub fn is_no_such_key(&self) -> bool {
419        matches!(self, Self::NoSuchKey(_))
420    }
421}
422impl ::std::error::Error for GetObjectAnnotationError {
423    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
424        match self {
425            Self::NoSuchAnnotation(_inner) => ::std::option::Option::Some(_inner),
426            Self::NoSuchBucket(_inner) => ::std::option::Option::Some(_inner),
427            Self::NoSuchKey(_inner) => ::std::option::Option::Some(_inner),
428            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
429        }
430    }
431}
432impl ::std::fmt::Display for GetObjectAnnotationError {
433    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
434        match self {
435            Self::NoSuchAnnotation(_inner) => _inner.fmt(f),
436            Self::NoSuchBucket(_inner) => _inner.fmt(f),
437            Self::NoSuchKey(_inner) => _inner.fmt(f),
438            Self::Unhandled(_inner) => {
439                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
440                    write!(f, "unhandled error ({code})")
441                } else {
442                    f.write_str("unhandled error")
443                }
444            }
445        }
446    }
447}
448impl ::aws_smithy_types::retry::ProvideErrorKind for GetObjectAnnotationError {
449    fn code(&self) -> ::std::option::Option<&str> {
450        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
451    }
452    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
453        ::std::option::Option::None
454    }
455}
456impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetObjectAnnotationError {
457    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
458        match self {
459            Self::NoSuchAnnotation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
460            Self::NoSuchBucket(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
461            Self::NoSuchKey(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
462            Self::Unhandled(_inner) => &_inner.meta,
463        }
464    }
465}
466impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetObjectAnnotationError {
467    fn create_unhandled_error(
468        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
469        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
470    ) -> Self {
471        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
472            source,
473            meta: meta.unwrap_or_default(),
474        })
475    }
476}
477impl crate::s3_request_id::RequestIdExt for crate::operation::get_object_annotation::GetObjectAnnotationError {
478    fn extended_request_id(&self) -> Option<&str> {
479        self.meta().extended_request_id()
480    }
481}
482impl ::aws_types::request_id::RequestId for crate::operation::get_object_annotation::GetObjectAnnotationError {
483    fn request_id(&self) -> Option<&str> {
484        self.meta().request_id()
485    }
486}
487
488pub use crate::operation::get_object_annotation::_get_object_annotation_input::GetObjectAnnotationInput;
489
490pub use crate::operation::get_object_annotation::_get_object_annotation_output::GetObjectAnnotationOutput;
491
492mod _get_object_annotation_input;
493
494mod _get_object_annotation_output;
495
496/// Builders
497pub mod builders;