1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct ListChangedBlocks;
6impl ListChangedBlocks {
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::list_changed_blocks::ListChangedBlocksInput,
14 ) -> ::std::result::Result<
15 crate::operation::list_changed_blocks::ListChangedBlocksOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::list_changed_blocks::ListChangedBlocksError,
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_changed_blocks::ListChangedBlocksError>()
27 .expect("correct error type")
28 })
29 };
30 use ::tracing::Instrument;
31 let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
32 .instrument(::tracing::debug_span!(
35 "ebs.ListChangedBlocks",
36 "rpc.service" = "ebs",
37 "rpc.method" = "ListChangedBlocks",
38 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
39 "rpc.system" = "aws-api",
40 ))
41 .await
42 .map_err(map_err)?;
43 let output = context.finalize().map_err(map_err)?;
44 ::std::result::Result::Ok(
45 output
46 .downcast::<crate::operation::list_changed_blocks::ListChangedBlocksOutput>()
47 .expect("correct output type"),
48 )
49 }
50
51 pub(crate) async fn orchestrate_with_stop_point(
52 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
53 input: crate::operation::list_changed_blocks::ListChangedBlocksInput,
54 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
55 ) -> ::std::result::Result<
56 ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
57 ::aws_smithy_runtime_api::client::result::SdkError<
58 ::aws_smithy_runtime_api::client::interceptors::context::Error,
59 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
60 >,
61 > {
62 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
63 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("ebs", "ListChangedBlocks", input, runtime_plugins, stop_point).await
64 }
65
66 pub(crate) fn operation_runtime_plugins(
67 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
68 client_config: &crate::config::Config,
69 config_override: ::std::option::Option<crate::config::Builder>,
70 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
71 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
72 runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![
73 ::aws_runtime::auth::sigv4::SCHEME_ID,
74 ]));
75 if let ::std::option::Option::Some(config_override) = config_override {
76 for plugin in config_override.runtime_plugins.iter().cloned() {
77 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
78 }
79 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
80 config_override,
81 client_config.config.clone(),
82 &client_config.runtime_components,
83 ));
84 }
85 runtime_plugins
86 }
87}
88impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ListChangedBlocks {
89 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
90 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ListChangedBlocks");
91
92 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
93 ListChangedBlocksRequestSerializer,
94 ));
95 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
96 ListChangedBlocksResponseDeserializer,
97 ));
98
99 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
100 ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
101 ));
102
103 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
104 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("ListChangedBlocks", "ebs"));
105 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
106 signing_options.double_uri_encode = true;
107 signing_options.content_sha256_header = false;
108 signing_options.normalize_uri_path = true;
109 signing_options.payload_override = None;
110
111 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
112 signing_options,
113 ..::std::default::Default::default()
114 });
115
116 ::std::option::Option::Some(cfg.freeze())
117 }
118
119 fn runtime_components(
120 &self,
121 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
122 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
123 #[allow(unused_mut)]
124 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ListChangedBlocks")
125 .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
126 .with_interceptor(ListChangedBlocksEndpointParamsInterceptor)
127 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
128 crate::operation::list_changed_blocks::ListChangedBlocksError,
129 >::new())
130 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
131 crate::operation::list_changed_blocks::ListChangedBlocksError,
132 >::new())
133 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
134 crate::operation::list_changed_blocks::ListChangedBlocksError,
135 >::new());
136
137 ::std::borrow::Cow::Owned(rcb)
138 }
139}
140
141#[derive(Debug)]
142struct ListChangedBlocksResponseDeserializer;
143impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ListChangedBlocksResponseDeserializer {
144 fn deserialize_nonstreaming(
145 &self,
146 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
147 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
148 let (success, status) = (response.status().is_success(), response.status().as_u16());
149 let headers = response.headers();
150 let body = response.body().bytes().expect("body loaded");
151 #[allow(unused_mut)]
152 let mut force_error = false;
153 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
154 let parse_result = if !success && status != 200 || force_error {
155 crate::protocol_serde::shape_list_changed_blocks::de_list_changed_blocks_http_error(status, headers, body)
156 } else {
157 crate::protocol_serde::shape_list_changed_blocks::de_list_changed_blocks_http_response(status, headers, body)
158 };
159 crate::protocol_serde::type_erase_result(parse_result)
160 }
161}
162#[derive(Debug)]
163struct ListChangedBlocksRequestSerializer;
164impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ListChangedBlocksRequestSerializer {
165 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
166 fn serialize_input(
167 &self,
168 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
169 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
170 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
171 let input = input
172 .downcast::<crate::operation::list_changed_blocks::ListChangedBlocksInput>()
173 .expect("correct type");
174 let _header_serialization_settings = _cfg
175 .load::<crate::serialization_settings::HeaderSerializationSettings>()
176 .cloned()
177 .unwrap_or_default();
178 let mut request_builder = {
179 fn uri_base(
180 _input: &crate::operation::list_changed_blocks::ListChangedBlocksInput,
181 output: &mut ::std::string::String,
182 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
183 use ::std::fmt::Write as _;
184 let input_1 = &_input.second_snapshot_id;
185 let input_1 = input_1.as_ref().ok_or_else(|| {
186 ::aws_smithy_types::error::operation::BuildError::missing_field("second_snapshot_id", "cannot be empty or unset")
187 })?;
188 let second_snapshot_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
189 if second_snapshot_id.is_empty() {
190 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
191 "second_snapshot_id",
192 "cannot be empty or unset",
193 ));
194 }
195 ::std::write!(
196 output,
197 "/snapshots/{SecondSnapshotId}/changedblocks",
198 SecondSnapshotId = second_snapshot_id
199 )
200 .expect("formatting should succeed");
201 ::std::result::Result::Ok(())
202 }
203 fn uri_query(
204 _input: &crate::operation::list_changed_blocks::ListChangedBlocksInput,
205 mut output: &mut ::std::string::String,
206 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
207 let mut query = ::aws_smithy_http::query::Writer::new(output);
208 if let ::std::option::Option::Some(inner_2) = &_input.first_snapshot_id {
209 {
210 query.push_kv("firstSnapshotId", &::aws_smithy_http::query::fmt_string(inner_2));
211 }
212 }
213 if let ::std::option::Option::Some(inner_3) = &_input.next_token {
214 {
215 query.push_kv("pageToken", &::aws_smithy_http::query::fmt_string(inner_3));
216 }
217 }
218 if let ::std::option::Option::Some(inner_4) = &_input.max_results {
219 {
220 query.push_kv("maxResults", ::aws_smithy_types::primitive::Encoder::from(*inner_4).encode());
221 }
222 }
223 if let ::std::option::Option::Some(inner_5) = &_input.starting_block_index {
224 {
225 query.push_kv("startingBlockIndex", ::aws_smithy_types::primitive::Encoder::from(*inner_5).encode());
226 }
227 }
228 ::std::result::Result::Ok(())
229 }
230 #[allow(clippy::unnecessary_wraps)]
231 fn update_http_builder(
232 input: &crate::operation::list_changed_blocks::ListChangedBlocksInput,
233 builder: ::http::request::Builder,
234 ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
235 let mut uri = ::std::string::String::new();
236 uri_base(input, &mut uri)?;
237 uri_query(input, &mut uri)?;
238 ::std::result::Result::Ok(builder.method("GET").uri(uri))
239 }
240 let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
241 builder
242 };
243 let body = ::aws_smithy_types::body::SdkBody::from("");
244
245 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
246 }
247}
248#[derive(Debug)]
249struct ListChangedBlocksEndpointParamsInterceptor;
250
251impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ListChangedBlocksEndpointParamsInterceptor {
252 fn name(&self) -> &'static str {
253 "ListChangedBlocksEndpointParamsInterceptor"
254 }
255
256 fn read_before_execution(
257 &self,
258 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
259 '_,
260 ::aws_smithy_runtime_api::client::interceptors::context::Input,
261 ::aws_smithy_runtime_api::client::interceptors::context::Output,
262 ::aws_smithy_runtime_api::client::interceptors::context::Error,
263 >,
264 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
265 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
266 let _input = context
267 .input()
268 .downcast_ref::<ListChangedBlocksInput>()
269 .ok_or("failed to downcast to ListChangedBlocksInput")?;
270
271 let params = crate::config::endpoint::Params::builder()
272 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
273 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
274 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
275 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
276 .build()
277 .map_err(|err| {
278 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
279 })?;
280 cfg.interceptor_state()
281 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
282 ::std::result::Result::Ok(())
283 }
284}
285
286#[allow(unreachable_code, unused_variables)]
290#[cfg(test)]
291mod list_changed_blocks_test {
292
293 #[::tokio::test]
296 #[::tracing_test::traced_test]
297 async fn lowercase_message_response() {
298 let expected_output = crate::types::error::ValidationException::builder()
299 .set_message(::std::option::Option::Some("1 validation error detected".to_owned()))
300 .build();
301 let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
302 ::http::response::Builder::new()
303 .header("content-length", "77")
304 .header("content-type", "application/json")
305 .header("date", "Wed, 30 Jun 2021 23:42:27 GMT")
306 .header(
307 "x-amzn-errortype",
308 "ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/",
309 )
310 .header("x-amzn-requestid", "2af8f013-250a-4f6e-88ae-6dd7f6e12807")
311 .status(400)
312 .body(::aws_smithy_types::body::SdkBody::from(
313 "{\n \"message\": \"1 validation error detected\"\n}\n",
314 ))
315 .unwrap(),
316 )
317 .unwrap();
318 use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
319 use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
320
321 let op = crate::operation::list_changed_blocks::ListChangedBlocks::new();
322 let config = op.config().expect("the operation has config");
323 let de = config
324 .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
325 .expect("the config must have a deserializer");
326
327 let parsed = de.deserialize_streaming(&mut http_response);
328 let parsed = parsed.unwrap_or_else(|| {
329 let http_response = http_response.map(|body| {
330 ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
331 body.bytes().unwrap(),
332 ::aws_smithy_protocol_test::MediaType::from("application/json"),
333 )))
334 });
335 de.deserialize_nonstreaming(&http_response)
336 });
337 let parsed = parsed.expect_err("should be error response");
338 let parsed: &crate::operation::list_changed_blocks::ListChangedBlocksError =
339 parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
340 if let crate::operation::list_changed_blocks::ListChangedBlocksError::ValidationException(parsed) = parsed {
341 ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
342 ::pretty_assertions::assert_eq!(parsed.reason, expected_output.reason, "Unexpected value for `reason`");
343 } else {
344 panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
345 }
346 }
347
348 #[::tokio::test]
351 #[::tracing_test::traced_test]
352 async fn uppercase_message_response() {
353 let expected_output = crate::types::error::ValidationException::builder()
354 .set_message(::std::option::Option::Some("Invalid volume size: 99999999999".to_owned()))
355 .set_reason(::std::option::Option::Some(
356 "INVALID_VOLUME_SIZE"
357 .parse::<crate::types::ValidationExceptionReason>()
358 .expect("static value validated to member"),
359 ))
360 .build();
361 let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
362 ::http::response::Builder::new()
363 .header("content-length", "77")
364 .header("content-type", "application/json")
365 .header("date", "Wed, 30 Jun 2021 23:42:27 GMT")
366 .header(
367 "x-amzn-errortype",
368 "ValidationException:http://internal.amazon.com/coral/com.amazon.zeppelindataservice/",
369 )
370 .header("x-amzn-requestid", "2af8f013-250a-4f6e-88ae-6dd7f6e12807")
371 .status(400)
372 .body(::aws_smithy_types::body::SdkBody::from(
373 "{\"Message\":\"Invalid volume size: 99999999999\",\"Reason\":\"INVALID_VOLUME_SIZE\"}\n",
374 ))
375 .unwrap(),
376 )
377 .unwrap();
378 use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
379 use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
380
381 let op = crate::operation::list_changed_blocks::ListChangedBlocks::new();
382 let config = op.config().expect("the operation has config");
383 let de = config
384 .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
385 .expect("the config must have a deserializer");
386
387 let parsed = de.deserialize_streaming(&mut http_response);
388 let parsed = parsed.unwrap_or_else(|| {
389 let http_response = http_response.map(|body| {
390 ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
391 body.bytes().unwrap(),
392 ::aws_smithy_protocol_test::MediaType::from("application/json"),
393 )))
394 });
395 de.deserialize_nonstreaming(&http_response)
396 });
397 let parsed = parsed.expect_err("should be error response");
398 let parsed: &crate::operation::list_changed_blocks::ListChangedBlocksError =
399 parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
400 if let crate::operation::list_changed_blocks::ListChangedBlocksError::ValidationException(parsed) = parsed {
401 ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
402 ::pretty_assertions::assert_eq!(parsed.reason, expected_output.reason, "Unexpected value for `reason`");
403 } else {
404 panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
405 }
406 }
407}
408
409#[non_exhaustive]
411#[derive(::std::fmt::Debug)]
412pub enum ListChangedBlocksError {
413 AccessDeniedException(crate::types::error::AccessDeniedException),
415 InternalServerException(crate::types::error::InternalServerException),
417 RequestThrottledException(crate::types::error::RequestThrottledException),
419 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
421 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
423 ValidationException(crate::types::error::ValidationException),
425 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
427 variable wildcard pattern and check `.code()`:
428 \
429 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
430 \
431 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ListChangedBlocksError) for what information is available for the error.")]
432 Unhandled(crate::error::sealed_unhandled::Unhandled),
433}
434impl ListChangedBlocksError {
435 pub fn unhandled(
437 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
438 ) -> Self {
439 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
440 source: err.into(),
441 meta: ::std::default::Default::default(),
442 })
443 }
444
445 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
447 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
448 source: err.clone().into(),
449 meta: err,
450 })
451 }
452 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
457 match self {
458 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
459 Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
460 Self::RequestThrottledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
461 Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
462 Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
463 Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
464 Self::Unhandled(e) => &e.meta,
465 }
466 }
467 pub fn is_access_denied_exception(&self) -> bool {
469 matches!(self, Self::AccessDeniedException(_))
470 }
471 pub fn is_internal_server_exception(&self) -> bool {
473 matches!(self, Self::InternalServerException(_))
474 }
475 pub fn is_request_throttled_exception(&self) -> bool {
477 matches!(self, Self::RequestThrottledException(_))
478 }
479 pub fn is_resource_not_found_exception(&self) -> bool {
481 matches!(self, Self::ResourceNotFoundException(_))
482 }
483 pub fn is_service_quota_exceeded_exception(&self) -> bool {
485 matches!(self, Self::ServiceQuotaExceededException(_))
486 }
487 pub fn is_validation_exception(&self) -> bool {
489 matches!(self, Self::ValidationException(_))
490 }
491}
492impl ::std::error::Error for ListChangedBlocksError {
493 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
494 match self {
495 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
496 Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
497 Self::RequestThrottledException(_inner) => ::std::option::Option::Some(_inner),
498 Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
499 Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner),
500 Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
501 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
502 }
503 }
504}
505impl ::std::fmt::Display for ListChangedBlocksError {
506 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
507 match self {
508 Self::AccessDeniedException(_inner) => _inner.fmt(f),
509 Self::InternalServerException(_inner) => _inner.fmt(f),
510 Self::RequestThrottledException(_inner) => _inner.fmt(f),
511 Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
512 Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
513 Self::ValidationException(_inner) => _inner.fmt(f),
514 Self::Unhandled(_inner) => {
515 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
516 write!(f, "unhandled error ({code})")
517 } else {
518 f.write_str("unhandled error")
519 }
520 }
521 }
522 }
523}
524impl ::aws_smithy_types::retry::ProvideErrorKind for ListChangedBlocksError {
525 fn code(&self) -> ::std::option::Option<&str> {
526 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
527 }
528 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
529 ::std::option::Option::None
530 }
531}
532impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ListChangedBlocksError {
533 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
534 match self {
535 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
536 Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
537 Self::RequestThrottledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
538 Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
539 Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
540 Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
541 Self::Unhandled(_inner) => &_inner.meta,
542 }
543 }
544}
545impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ListChangedBlocksError {
546 fn create_unhandled_error(
547 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
548 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
549 ) -> Self {
550 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
551 source,
552 meta: meta.unwrap_or_default(),
553 })
554 }
555}
556impl ::aws_types::request_id::RequestId for crate::operation::list_changed_blocks::ListChangedBlocksError {
557 fn request_id(&self) -> Option<&str> {
558 self.meta().request_id()
559 }
560}
561
562pub use crate::operation::list_changed_blocks::_list_changed_blocks_output::ListChangedBlocksOutput;
563
564pub use crate::operation::list_changed_blocks::_list_changed_blocks_input::ListChangedBlocksInput;
565
566mod _list_changed_blocks_input;
567
568mod _list_changed_blocks_output;
569
570pub mod builders;
572
573pub mod paginator;