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