1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CompleteSnapshot;
6impl CompleteSnapshot {
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::complete_snapshot::CompleteSnapshotInput,
14 ) -> ::std::result::Result<
15 crate::operation::complete_snapshot::CompleteSnapshotOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::complete_snapshot::CompleteSnapshotError,
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::complete_snapshot::CompleteSnapshotError>()
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::complete_snapshot::CompleteSnapshotOutput>()
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::complete_snapshot::CompleteSnapshotInput,
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("ebs", "CompleteSnapshot", 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 ]));
65 if let ::std::option::Option::Some(config_override) = config_override {
66 for plugin in config_override.runtime_plugins.iter().cloned() {
67 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
68 }
69 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
70 config_override,
71 client_config.config.clone(),
72 &client_config.runtime_components,
73 ));
74 }
75 runtime_plugins
76 }
77}
78impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CompleteSnapshot {
79 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
80 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CompleteSnapshot");
81
82 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
83 CompleteSnapshotRequestSerializer,
84 ));
85 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
86 CompleteSnapshotResponseDeserializer,
87 ));
88
89 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
90 ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
91 ));
92
93 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("CompleteSnapshot", "ebs"));
94 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
95 signing_options.double_uri_encode = true;
96 signing_options.content_sha256_header = false;
97 signing_options.normalize_uri_path = true;
98 signing_options.payload_override = None;
99
100 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
101 signing_options,
102 ..::std::default::Default::default()
103 });
104
105 ::std::option::Option::Some(cfg.freeze())
106 }
107
108 fn runtime_components(
109 &self,
110 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
111 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
112 #[allow(unused_mut)]
113 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CompleteSnapshot")
114 .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
115 .with_interceptor(CompleteSnapshotEndpointParamsInterceptor)
116 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
117 crate::operation::complete_snapshot::CompleteSnapshotError,
118 >::new())
119 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
120 crate::operation::complete_snapshot::CompleteSnapshotError,
121 >::new())
122 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
123 crate::operation::complete_snapshot::CompleteSnapshotError,
124 >::new());
125
126 ::std::borrow::Cow::Owned(rcb)
127 }
128}
129
130#[derive(Debug)]
131struct CompleteSnapshotResponseDeserializer;
132impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CompleteSnapshotResponseDeserializer {
133 fn deserialize_nonstreaming(
134 &self,
135 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
136 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
137 let (success, status) = (response.status().is_success(), response.status().as_u16());
138 let headers = response.headers();
139 let body = response.body().bytes().expect("body loaded");
140 #[allow(unused_mut)]
141 let mut force_error = false;
142 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
143 let parse_result = if !success && status != 202 || force_error {
144 crate::protocol_serde::shape_complete_snapshot::de_complete_snapshot_http_error(status, headers, body)
145 } else {
146 crate::protocol_serde::shape_complete_snapshot::de_complete_snapshot_http_response(status, headers, body)
147 };
148 crate::protocol_serde::type_erase_result(parse_result)
149 }
150}
151#[derive(Debug)]
152struct CompleteSnapshotRequestSerializer;
153impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CompleteSnapshotRequestSerializer {
154 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
155 fn serialize_input(
156 &self,
157 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
158 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
159 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
160 let input = input
161 .downcast::<crate::operation::complete_snapshot::CompleteSnapshotInput>()
162 .expect("correct type");
163 let _header_serialization_settings = _cfg
164 .load::<crate::serialization_settings::HeaderSerializationSettings>()
165 .cloned()
166 .unwrap_or_default();
167 let mut request_builder = {
168 fn uri_base(
169 _input: &crate::operation::complete_snapshot::CompleteSnapshotInput,
170 output: &mut ::std::string::String,
171 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
172 use ::std::fmt::Write as _;
173 let input_1 = &_input.snapshot_id;
174 let input_1 = input_1
175 .as_ref()
176 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("snapshot_id", "cannot be empty or unset"))?;
177 let snapshot_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
178 if snapshot_id.is_empty() {
179 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
180 "snapshot_id",
181 "cannot be empty or unset",
182 ));
183 }
184 ::std::write!(output, "/snapshots/completion/{SnapshotId}", SnapshotId = snapshot_id).expect("formatting should succeed");
185 ::std::result::Result::Ok(())
186 }
187 #[allow(clippy::unnecessary_wraps)]
188 fn update_http_builder(
189 input: &crate::operation::complete_snapshot::CompleteSnapshotInput,
190 builder: ::http::request::Builder,
191 ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
192 let mut uri = ::std::string::String::new();
193 uri_base(input, &mut uri)?;
194 let builder = crate::protocol_serde::shape_complete_snapshot::ser_complete_snapshot_headers(input, builder)?;
195 ::std::result::Result::Ok(builder.method("POST").uri(uri))
196 }
197 let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
198 builder
199 };
200 let body = ::aws_smithy_types::body::SdkBody::from("");
201
202 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
203 }
204}
205#[derive(Debug)]
206struct CompleteSnapshotEndpointParamsInterceptor;
207
208impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CompleteSnapshotEndpointParamsInterceptor {
209 fn name(&self) -> &'static str {
210 "CompleteSnapshotEndpointParamsInterceptor"
211 }
212
213 fn read_before_execution(
214 &self,
215 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
216 '_,
217 ::aws_smithy_runtime_api::client::interceptors::context::Input,
218 ::aws_smithy_runtime_api::client::interceptors::context::Output,
219 ::aws_smithy_runtime_api::client::interceptors::context::Error,
220 >,
221 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
222 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
223 let _input = context
224 .input()
225 .downcast_ref::<CompleteSnapshotInput>()
226 .ok_or("failed to downcast to CompleteSnapshotInput")?;
227
228 let params = crate::config::endpoint::Params::builder()
229 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
230 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
231 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
232 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
233 .build()
234 .map_err(|err| {
235 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
236 })?;
237 cfg.interceptor_state()
238 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
239 ::std::result::Result::Ok(())
240 }
241}
242
243#[allow(unreachable_code, unused_variables)]
247#[cfg(test)]
248mod complete_snapshot_test {
249
250 #[::tokio::test]
253 #[::tracing_test::traced_test]
254 async fn lowercase_message_response() {
255 let expected_output = crate::types::error::ValidationException::builder()
256 .set_message(::std::option::Option::Some("1 validation error detected".to_owned()))
257 .build();
258 let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
259 ::http::response::Builder::new()
260 .header("content-length", "77")
261 .header("content-type", "application/json")
262 .header("date", "Wed, 30 Jun 2021 23:42:27 GMT")
263 .header(
264 "x-amzn-errortype",
265 "ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/",
266 )
267 .header("x-amzn-requestid", "2af8f013-250a-4f6e-88ae-6dd7f6e12807")
268 .status(400)
269 .body(::aws_smithy_types::body::SdkBody::from(
270 "{\n \"message\": \"1 validation error detected\"\n}\n",
271 ))
272 .unwrap(),
273 )
274 .unwrap();
275 use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
276 use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
277
278 let op = crate::operation::complete_snapshot::CompleteSnapshot::new();
279 let config = op.config().expect("the operation has config");
280 let de = config
281 .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
282 .expect("the config must have a deserializer");
283
284 let parsed = de.deserialize_streaming(&mut http_response);
285 let parsed = parsed.unwrap_or_else(|| {
286 let http_response = http_response.map(|body| {
287 ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
288 body.bytes().unwrap(),
289 ::aws_smithy_protocol_test::MediaType::from("application/json"),
290 )))
291 });
292 de.deserialize_nonstreaming(&http_response)
293 });
294 let parsed = parsed.expect_err("should be error response");
295 let parsed: &crate::operation::complete_snapshot::CompleteSnapshotError =
296 parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
297 if let crate::operation::complete_snapshot::CompleteSnapshotError::ValidationException(parsed) = parsed {
298 ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
299 ::pretty_assertions::assert_eq!(parsed.reason, expected_output.reason, "Unexpected value for `reason`");
300 } else {
301 panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
302 }
303 }
304
305 #[::tokio::test]
308 #[::tracing_test::traced_test]
309 async fn uppercase_message_response() {
310 let expected_output = crate::types::error::ValidationException::builder()
311 .set_message(::std::option::Option::Some("Invalid volume size: 99999999999".to_owned()))
312 .set_reason(::std::option::Option::Some(
313 "INVALID_VOLUME_SIZE"
314 .parse::<crate::types::ValidationExceptionReason>()
315 .expect("static value validated to member"),
316 ))
317 .build();
318 let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
319 ::http::response::Builder::new()
320 .header("content-length", "77")
321 .header("content-type", "application/json")
322 .header("date", "Wed, 30 Jun 2021 23:42:27 GMT")
323 .header(
324 "x-amzn-errortype",
325 "ValidationException:http://internal.amazon.com/coral/com.amazon.zeppelindataservice/",
326 )
327 .header("x-amzn-requestid", "2af8f013-250a-4f6e-88ae-6dd7f6e12807")
328 .status(400)
329 .body(::aws_smithy_types::body::SdkBody::from(
330 "{\"Message\":\"Invalid volume size: 99999999999\",\"Reason\":\"INVALID_VOLUME_SIZE\"}\n",
331 ))
332 .unwrap(),
333 )
334 .unwrap();
335 use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
336 use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
337
338 let op = crate::operation::complete_snapshot::CompleteSnapshot::new();
339 let config = op.config().expect("the operation has config");
340 let de = config
341 .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
342 .expect("the config must have a deserializer");
343
344 let parsed = de.deserialize_streaming(&mut http_response);
345 let parsed = parsed.unwrap_or_else(|| {
346 let http_response = http_response.map(|body| {
347 ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
348 body.bytes().unwrap(),
349 ::aws_smithy_protocol_test::MediaType::from("application/json"),
350 )))
351 });
352 de.deserialize_nonstreaming(&http_response)
353 });
354 let parsed = parsed.expect_err("should be error response");
355 let parsed: &crate::operation::complete_snapshot::CompleteSnapshotError =
356 parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
357 if let crate::operation::complete_snapshot::CompleteSnapshotError::ValidationException(parsed) = parsed {
358 ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
359 ::pretty_assertions::assert_eq!(parsed.reason, expected_output.reason, "Unexpected value for `reason`");
360 } else {
361 panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
362 }
363 }
364}
365
366#[non_exhaustive]
368#[derive(::std::fmt::Debug)]
369pub enum CompleteSnapshotError {
370 AccessDeniedException(crate::types::error::AccessDeniedException),
372 InternalServerException(crate::types::error::InternalServerException),
374 RequestThrottledException(crate::types::error::RequestThrottledException),
376 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
378 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
380 ValidationException(crate::types::error::ValidationException),
382 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
384 variable wildcard pattern and check `.code()`:
385 \
386 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
387 \
388 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CompleteSnapshotError) for what information is available for the error.")]
389 Unhandled(crate::error::sealed_unhandled::Unhandled),
390}
391impl CompleteSnapshotError {
392 pub fn unhandled(
394 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
395 ) -> Self {
396 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
397 source: err.into(),
398 meta: ::std::default::Default::default(),
399 })
400 }
401
402 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
404 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
405 source: err.clone().into(),
406 meta: err,
407 })
408 }
409 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
414 match self {
415 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
416 Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
417 Self::RequestThrottledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
418 Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
419 Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
420 Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
421 Self::Unhandled(e) => &e.meta,
422 }
423 }
424 pub fn is_access_denied_exception(&self) -> bool {
426 matches!(self, Self::AccessDeniedException(_))
427 }
428 pub fn is_internal_server_exception(&self) -> bool {
430 matches!(self, Self::InternalServerException(_))
431 }
432 pub fn is_request_throttled_exception(&self) -> bool {
434 matches!(self, Self::RequestThrottledException(_))
435 }
436 pub fn is_resource_not_found_exception(&self) -> bool {
438 matches!(self, Self::ResourceNotFoundException(_))
439 }
440 pub fn is_service_quota_exceeded_exception(&self) -> bool {
442 matches!(self, Self::ServiceQuotaExceededException(_))
443 }
444 pub fn is_validation_exception(&self) -> bool {
446 matches!(self, Self::ValidationException(_))
447 }
448}
449impl ::std::error::Error for CompleteSnapshotError {
450 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
451 match self {
452 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
453 Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
454 Self::RequestThrottledException(_inner) => ::std::option::Option::Some(_inner),
455 Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
456 Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner),
457 Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
458 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
459 }
460 }
461}
462impl ::std::fmt::Display for CompleteSnapshotError {
463 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
464 match self {
465 Self::AccessDeniedException(_inner) => _inner.fmt(f),
466 Self::InternalServerException(_inner) => _inner.fmt(f),
467 Self::RequestThrottledException(_inner) => _inner.fmt(f),
468 Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
469 Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
470 Self::ValidationException(_inner) => _inner.fmt(f),
471 Self::Unhandled(_inner) => {
472 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
473 write!(f, "unhandled error ({code})")
474 } else {
475 f.write_str("unhandled error")
476 }
477 }
478 }
479 }
480}
481impl ::aws_smithy_types::retry::ProvideErrorKind for CompleteSnapshotError {
482 fn code(&self) -> ::std::option::Option<&str> {
483 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
484 }
485 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
486 ::std::option::Option::None
487 }
488}
489impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CompleteSnapshotError {
490 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
491 match self {
492 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
493 Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
494 Self::RequestThrottledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
495 Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
496 Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
497 Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
498 Self::Unhandled(_inner) => &_inner.meta,
499 }
500 }
501}
502impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CompleteSnapshotError {
503 fn create_unhandled_error(
504 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
505 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
506 ) -> Self {
507 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
508 source,
509 meta: meta.unwrap_or_default(),
510 })
511 }
512}
513impl ::aws_types::request_id::RequestId for crate::operation::complete_snapshot::CompleteSnapshotError {
514 fn request_id(&self) -> Option<&str> {
515 self.meta().request_id()
516 }
517}
518
519pub use crate::operation::complete_snapshot::_complete_snapshot_output::CompleteSnapshotOutput;
520
521pub use crate::operation::complete_snapshot::_complete_snapshot_input::CompleteSnapshotInput;
522
523mod _complete_snapshot_input;
524
525mod _complete_snapshot_output;
526
527pub mod builders;