1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct GetObjectAnnotation;
6impl GetObjectAnnotation {
7 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 .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(GetObjectAnnotationTelemetryInputCaptureInterceptor))
127.with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default()))
128.with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(GetObjectAnnotationEndpointParamsInterceptor))
129.with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(crate::http_response_checksum::ResponseChecksumInterceptor::new(
130 ["crc64nvme", "crc32", "crc32c", "sha256", "sha1", "sha512", "md5", "xxhash64", "xxhash3", "xxhash128"].as_slice(),
131 |input: &::aws_smithy_runtime_api::client::interceptors::context::Input| {
132
133 let input: &crate::operation::get_object_annotation::GetObjectAnnotationInput = input.downcast_ref().expect("correct type");
134 matches!(input.checksum_mode(), ::std::option::Option::Some(crate::types::ChecksumMode::Enabled))
135 },
136 |input: &mut ::aws_smithy_runtime_api::client::interceptors::context::Input, cfg: &::aws_smithy_types::config_bag::ConfigBag| {
137 let input = input
138 .downcast_mut::<crate::operation::get_object_annotation::GetObjectAnnotationInput>()
139 .ok_or("failed to downcast to crate::operation::get_object_annotation::GetObjectAnnotationInput")?;
140
141 let request_validation_enabled =
142 matches!(input.checksum_mode(), Some(crate::types::ChecksumMode::Enabled));
143
144 if !request_validation_enabled {
145 let response_checksum_validation = cfg
147 .load::<::aws_smithy_types::checksum_config::ResponseChecksumValidation>()
148 .unwrap_or(&::aws_smithy_types::checksum_config::ResponseChecksumValidation::WhenSupported);
149
150 let is_presigned_req = cfg.load::<crate::presigning::PresigningMarker>().is_some();
151
152 if is_presigned_req {
154 return ::std::result::Result::Ok(())
155 }
156
157 #[allow(clippy::wildcard_in_or_patterns)]
161 match response_checksum_validation {
162 ::aws_smithy_types::checksum_config::ResponseChecksumValidation::WhenRequired => {}
163 ::aws_smithy_types::checksum_config::ResponseChecksumValidation::WhenSupported | _ => {
164 input.checksum_mode = Some(crate::types::ChecksumMode::Enabled);
165 }
166 }
167 }
168
169 ::std::result::Result::Ok(())
170 }
171 )))
172 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<crate::operation::get_object_annotation::GetObjectAnnotationError>::new())
173.with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<crate::operation::get_object_annotation::GetObjectAnnotationError>::new())
174.with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<crate::operation::get_object_annotation::GetObjectAnnotationError>::builder().transient_errors({
175 let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
176 transient_errors.push("InternalError");
177 ::std::borrow::Cow::Owned(transient_errors)
178 }).build());
179
180 ::std::borrow::Cow::Owned(rcb)
181 }
182}
183
184#[derive(Debug)]
185struct GetObjectAnnotationTelemetryInputCaptureInterceptor;
186
187#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
188impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetObjectAnnotationTelemetryInputCaptureInterceptor {
189 fn name(&self) -> &'static str {
190 "GetObjectAnnotationTelemetryInputCaptureInterceptor"
191 }
192
193 fn read_before_execution(
194 &self,
195 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
196 '_,
197 ::aws_smithy_runtime_api::client::interceptors::context::Input,
198 ::aws_smithy_runtime_api::client::interceptors::context::Output,
199 ::aws_smithy_runtime_api::client::interceptors::context::Error,
200 >,
201 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
202 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
203 let ::std::option::Option::Some(requested) = cfg
205 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
206 .filter(|r| !r.is_empty())
207 else {
208 return ::std::result::Result::Ok(());
209 };
210
211 let ::std::option::Option::Some(input) = context.input().downcast_ref::<GetObjectAnnotationInput>() else {
212 return ::std::result::Result::Ok(());
214 };
215
216 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
217 if requested.should_capture("Bucket") {
218 if let ::std::option::Option::Some(value) = input.bucket.as_deref() {
219 captured.insert("Bucket", value);
220 }
221 }
222 if requested.should_capture("Key") {
223 if let ::std::option::Option::Some(value) = input.key.as_deref() {
224 captured.insert("Key", value);
225 }
226 }
227 if requested.should_capture("AnnotationName") {
228 if let ::std::option::Option::Some(value) = input.annotation_name.as_deref() {
229 captured.insert("AnnotationName", value);
230 }
231 }
232 if requested.should_capture("VersionId") {
233 if let ::std::option::Option::Some(value) = input.version_id.as_deref() {
234 captured.insert("VersionId", value);
235 }
236 }
237 if requested.should_capture("ExpectedBucketOwner") {
238 if let ::std::option::Option::Some(value) = input.expected_bucket_owner.as_deref() {
239 captured.insert("ExpectedBucketOwner", value);
240 }
241 }
242
243 cfg.interceptor_state().store_put(captured);
244 ::std::result::Result::Ok(())
245 }
246}
247#[derive(Debug)]
248struct GetObjectAnnotationResponseDeserializer;
249impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetObjectAnnotationResponseDeserializer {
250 fn deserialize_streaming(
251 &self,
252 response: &mut ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
253 ) -> ::std::option::Option<::aws_smithy_runtime_api::client::interceptors::context::OutputOrError> {
254 #[allow(unused_mut)]
255 let mut force_error = false;
256 ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
257 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
258
259 if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
261 return ::std::option::Option::None;
262 }
263 ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
264 crate::protocol_serde::shape_get_object_annotation::de_get_object_annotation_http_response(response),
265 ))
266 }
267
268 fn deserialize_nonstreaming_with_config(
269 &self,
270 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
271 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
272 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
273 let body = response.body().bytes().expect("body loaded");
275 crate::protocol_serde::type_erase_result(crate::protocol_serde::shape_get_object_annotation::de_get_object_annotation_http_error(
276 response.status().as_u16(),
277 response.headers(),
278 body,
279 ))
280 }
281}
282#[derive(Debug)]
283struct GetObjectAnnotationRequestSerializer;
284impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetObjectAnnotationRequestSerializer {
285 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
286 fn serialize_input(
287 &self,
288 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
289 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
290 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
291 let input = input
292 .downcast::<crate::operation::get_object_annotation::GetObjectAnnotationInput>()
293 .expect("correct type");
294 let _header_serialization_settings = _cfg
295 .load::<crate::serialization_settings::HeaderSerializationSettings>()
296 .cloned()
297 .unwrap_or_default();
298 let mut request_builder = {
299 #[allow(clippy::uninlined_format_args)]
300 fn uri_base(
301 _input: &crate::operation::get_object_annotation::GetObjectAnnotationInput,
302 output: &mut ::std::string::String,
303 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
304 use ::std::fmt::Write as _;
305 let input_1 = &_input.key;
306 let input_1 = input_1
307 .as_ref()
308 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("key", "cannot be empty or unset"))?;
309 let key = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Greedy);
310 if key.is_empty() {
311 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
312 "key",
313 "cannot be empty or unset",
314 ));
315 }
316 ::std::write!(output, "/{Key}", Key = key).expect("formatting should succeed");
317 ::std::result::Result::Ok(())
318 }
319 fn uri_query(
320 _input: &crate::operation::get_object_annotation::GetObjectAnnotationInput,
321 mut output: &mut ::std::string::String,
322 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
323 let mut query = ::aws_smithy_http::query::Writer::new(output);
324 query.push_v("annotation");
325 query.push_kv("x-id", "GetObjectAnnotation");
326 let inner_2 = &_input.annotation_name;
327 let inner_2 = inner_2
328 .as_ref()
329 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("annotation_name", "cannot be empty or unset"))?;
330 if inner_2.is_empty() {
331 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
332 "annotation_name",
333 "cannot be empty or unset",
334 ));
335 }
336 query.push_kv("annotationName", &::aws_smithy_http::query::fmt_string(inner_2));
337 if let ::std::option::Option::Some(inner_3) = &_input.version_id {
338 {
339 query.push_kv("versionId", &::aws_smithy_http::query::fmt_string(inner_3));
340 }
341 }
342 ::std::result::Result::Ok(())
343 }
344 #[allow(clippy::unnecessary_wraps)]
345 fn update_http_builder(
346 input: &crate::operation::get_object_annotation::GetObjectAnnotationInput,
347 builder: ::http_1x::request::Builder,
348 ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
349 let mut uri = ::std::string::String::new();
350 uri_base(input, &mut uri)?;
351 uri_query(input, &mut uri)?;
352 let builder = crate::protocol_serde::shape_get_object_annotation::ser_get_object_annotation_headers(input, builder)?;
353 ::std::result::Result::Ok(builder.method("GET").uri(uri))
354 }
355 let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
356 builder
357 };
358 let body = ::aws_smithy_types::body::SdkBody::from("");
359
360 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
361 }
362}
363#[derive(Debug)]
364struct GetObjectAnnotationEndpointParamsInterceptor;
365
366#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
367impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetObjectAnnotationEndpointParamsInterceptor {
368 fn name(&self) -> &'static str {
369 "GetObjectAnnotationEndpointParamsInterceptor"
370 }
371
372 fn read_before_execution(
373 &self,
374 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
375 '_,
376 ::aws_smithy_runtime_api::client::interceptors::context::Input,
377 ::aws_smithy_runtime_api::client::interceptors::context::Output,
378 ::aws_smithy_runtime_api::client::interceptors::context::Error,
379 >,
380 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
381 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
382 let _input = context
383 .input()
384 .downcast_ref::<GetObjectAnnotationInput>()
385 .ok_or("failed to downcast to GetObjectAnnotationInput")?;
386
387 let params = crate::config::endpoint::Params::builder()
388 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
389 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
390 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
391 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
392 .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
393 .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
394 .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
395 .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
396 .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
397 .set_bucket(Some(
398 _input
399 .bucket
400 .clone()
401 .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
402 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
403 ))
404 .set_key(Some(
405 _input
406 .key
407 .clone()
408 .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
409 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("key", "A required field was not set"))?,
410 ))
411 .build()
412 .map_err(|err| {
413 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
414 })?;
415 cfg.interceptor_state()
416 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
417 ::std::result::Result::Ok(())
418 }
419}
420
421#[non_exhaustive]
426#[derive(::std::fmt::Debug)]
427pub enum GetObjectAnnotationError {
428 NoSuchAnnotation(crate::types::error::NoSuchAnnotation),
430 NoSuchBucket(crate::types::error::NoSuchBucket),
432 NoSuchKey(crate::types::error::NoSuchKey),
434 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
436 variable wildcard pattern and check `.code()`:
437 \
438 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
439 \
440 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetObjectAnnotationError) for what information is available for the error.")]
441 Unhandled(crate::error::sealed_unhandled::Unhandled),
442}
443impl GetObjectAnnotationError {
444 pub fn unhandled(
446 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
447 ) -> Self {
448 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
449 source: err.into(),
450 meta: ::std::default::Default::default(),
451 })
452 }
453
454 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
456 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
457 source: err.clone().into(),
458 meta: err,
459 })
460 }
461 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
466 match self {
467 Self::NoSuchAnnotation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
468 Self::NoSuchBucket(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
469 Self::NoSuchKey(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
470 Self::Unhandled(e) => &e.meta,
471 }
472 }
473 pub fn is_no_such_annotation(&self) -> bool {
475 matches!(self, Self::NoSuchAnnotation(_))
476 }
477 pub fn is_no_such_bucket(&self) -> bool {
479 matches!(self, Self::NoSuchBucket(_))
480 }
481 pub fn is_no_such_key(&self) -> bool {
483 matches!(self, Self::NoSuchKey(_))
484 }
485}
486impl ::std::error::Error for GetObjectAnnotationError {
487 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
488 match self {
489 Self::NoSuchAnnotation(_inner) => ::std::option::Option::Some(_inner),
490 Self::NoSuchBucket(_inner) => ::std::option::Option::Some(_inner),
491 Self::NoSuchKey(_inner) => ::std::option::Option::Some(_inner),
492 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
493 }
494 }
495}
496impl ::std::fmt::Display for GetObjectAnnotationError {
497 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
498 match self {
499 Self::NoSuchAnnotation(_inner) => _inner.fmt(f),
500 Self::NoSuchBucket(_inner) => _inner.fmt(f),
501 Self::NoSuchKey(_inner) => _inner.fmt(f),
502 Self::Unhandled(_inner) => {
503 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
504 write!(f, "unhandled error ({code})")
505 } else {
506 f.write_str("unhandled error")
507 }
508 }
509 }
510 }
511}
512impl ::aws_smithy_types::retry::ProvideErrorKind for GetObjectAnnotationError {
513 fn code(&self) -> ::std::option::Option<&str> {
514 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
515 }
516 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
517 ::std::option::Option::None
518 }
519}
520impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetObjectAnnotationError {
521 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
522 match self {
523 Self::NoSuchAnnotation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
524 Self::NoSuchBucket(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
525 Self::NoSuchKey(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
526 Self::Unhandled(_inner) => &_inner.meta,
527 }
528 }
529}
530impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetObjectAnnotationError {
531 fn create_unhandled_error(
532 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
533 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
534 ) -> Self {
535 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
536 source,
537 meta: meta.unwrap_or_default(),
538 })
539 }
540}
541impl crate::s3_request_id::RequestIdExt for crate::operation::get_object_annotation::GetObjectAnnotationError {
542 fn extended_request_id(&self) -> Option<&str> {
543 self.meta().extended_request_id()
544 }
545}
546impl ::aws_types::request_id::RequestId for crate::operation::get_object_annotation::GetObjectAnnotationError {
547 fn request_id(&self) -> Option<&str> {
548 self.meta().request_id()
549 }
550}
551
552pub use crate::operation::get_object_annotation::_get_object_annotation_input::GetObjectAnnotationInput;
553
554pub use crate::operation::get_object_annotation::_get_object_annotation_output::GetObjectAnnotationOutput;
555
556mod _get_object_annotation_input;
557
558mod _get_object_annotation_output;
559
560pub mod builders;