1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateDataQualityEvaluationConfig;
6impl UpdateDataQualityEvaluationConfig {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
13 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigInput::SCHEMA;
14 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
16 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigOutput::SCHEMA;
17 pub(crate) async fn orchestrate(
18 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
19 input: crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigInput,
20 ) -> ::std::result::Result<
21 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigOutput,
22 ::aws_smithy_runtime_api::client::result::SdkError<
23 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
24 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
25 >,
26 > {
27 let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
28 ::aws_smithy_runtime_api::client::interceptors::context::Error,
29 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
30 >| {
31 err.map_service_error(|err| {
32 err.downcast::<crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError>()
33 .expect("correct error type")
34 })
35 };
36 let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
37 .await
38 .map_err(map_err)?;
39 let output = context.finalize().map_err(map_err)?;
40 ::std::result::Result::Ok(
41 output
42 .downcast::<crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigOutput>()
43 .expect("correct output type"),
44 )
45 }
46
47 pub(crate) async fn orchestrate_with_stop_point(
48 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
49 input: crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigInput,
50 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
51 ) -> ::std::result::Result<
52 ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
53 ::aws_smithy_runtime_api::client::result::SdkError<
54 ::aws_smithy_runtime_api::client::interceptors::context::Error,
55 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
56 >,
57 > {
58 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
59 use ::tracing::Instrument;
60 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
61 "Glue",
62 "UpdateDataQualityEvaluationConfig",
63 input,
64 runtime_plugins,
65 stop_point,
66 )
67 .instrument(::tracing::debug_span!(
70 "Glue.UpdateDataQualityEvaluationConfig",
71 "rpc.service" = "Glue",
72 "rpc.method" = "UpdateDataQualityEvaluationConfig",
73 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
74 "rpc.system" = "aws-api",
75 ))
76 .await
77 }
78
79 pub(crate) fn operation_runtime_plugins(
80 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
81 client_config: &crate::config::Config,
82 config_override: ::std::option::Option<crate::config::Builder>,
83 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
84 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
85
86 if let ::std::option::Option::Some(config_override) = config_override {
87 for plugin in config_override.runtime_plugins.iter().cloned() {
88 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
89 }
90 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
91 config_override,
92 client_config.config.clone(),
93 &client_config.runtime_components,
94 ));
95 }
96 runtime_plugins
97 }
98}
99pub(crate) mod error_registry {
108 pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
109 ::aws_smithy_schema::registry::TypeRegistry::builder()
110 .insert_error_shape(
111 crate::types::error::AccessDeniedException::SCHEMA,
112 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
113 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AccessDeniedException::deserialize(d)?))
114 },
115 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
116 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AccessDeniedException::deserialize(d)?))
117 },
118 )
119.insert_error_shape(
120 crate::types::error::ConcurrentModificationException::SCHEMA,
121 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
122 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ConcurrentModificationException::deserialize(d)?))
123 },
124 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
125 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ConcurrentModificationException::deserialize(d)?))
126 },
127 )
128.insert_error_shape(
129 crate::types::error::EntityNotFoundException::SCHEMA,
130 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
131 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
132 },
133 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
134 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
135 },
136 )
137.insert_error_shape(
138 crate::types::error::InternalServiceException::SCHEMA,
139 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
140 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
141 },
142 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
143 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
144 },
145 )
146.insert_error_shape(
147 crate::types::error::InvalidInputException::SCHEMA,
148 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
149 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
150 },
151 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
152 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
153 },
154 )
155.insert_error_shape(
156 crate::types::error::OperationTimeoutException::SCHEMA,
157 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
158 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
159 },
160 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
161 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
162 },
163 )
164 .build()
165 });
166}
167impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateDataQualityEvaluationConfig {
168 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
169 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateDataQualityEvaluationConfig");
170
171 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
172 UpdateDataQualityEvaluationConfigRequestSerializer,
173 ));
174 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
175 UpdateDataQualityEvaluationConfigResponseDeserializer,
176 ));
177
178 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
179 crate::config::auth::Params::builder()
180 .operation_name("UpdateDataQualityEvaluationConfig")
181 .build()
182 .expect("required fields set"),
183 ));
184
185 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
186 "UpdateDataQualityEvaluationConfig",
187 "Glue",
188 ));
189 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
190 signing_options.double_uri_encode = true;
191 signing_options.content_sha256_header = false;
192 signing_options.normalize_uri_path = true;
193 signing_options.payload_override = None;
194
195 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
196 signing_options,
197 ..::std::default::Default::default()
198 });
199
200 ::std::option::Option::Some(cfg.freeze())
201 }
202
203 fn runtime_components(
204 &self,
205 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
206 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
207 #[allow(unused_mut)]
208 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateDataQualityEvaluationConfig")
209 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
210 UpdateDataQualityEvaluationConfigTelemetryInputCaptureInterceptor,
211 ))
212 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
213 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
214 ))
215 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
216 UpdateDataQualityEvaluationConfigEndpointParamsInterceptor,
217 ))
218 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
219 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
220 >::new())
221 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
222 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
223 >::new())
224 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
225 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
226 >::new())
227 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
228 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError,
229 >::new());
230
231 ::std::borrow::Cow::Owned(rcb)
232 }
233}
234
235#[derive(Debug)]
236struct UpdateDataQualityEvaluationConfigTelemetryInputCaptureInterceptor;
237
238#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
239impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateDataQualityEvaluationConfigTelemetryInputCaptureInterceptor {
240 fn name(&self) -> &'static str {
241 "UpdateDataQualityEvaluationConfigTelemetryInputCaptureInterceptor"
242 }
243
244 fn read_before_execution(
245 &self,
246 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
247 '_,
248 ::aws_smithy_runtime_api::client::interceptors::context::Input,
249 ::aws_smithy_runtime_api::client::interceptors::context::Output,
250 ::aws_smithy_runtime_api::client::interceptors::context::Error,
251 >,
252 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
253 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
254 let ::std::option::Option::Some(requested) = cfg
256 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
257 .filter(|r| !r.is_empty())
258 else {
259 return ::std::result::Result::Ok(());
260 };
261
262 let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateDataQualityEvaluationConfigInput>() else {
263 return ::std::result::Result::Ok(());
265 };
266
267 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
268 if requested.should_capture("Name") {
269 if let ::std::option::Option::Some(value) = input.name.as_deref() {
270 captured.insert("Name", value);
271 }
272 }
273 if requested.should_capture("RulesetName") {
274 if let ::std::option::Option::Some(value) = input.ruleset_name.as_deref() {
275 captured.insert("RulesetName", value);
276 }
277 }
278 if requested.should_capture("ScheduleExpression") {
279 if let ::std::option::Option::Some(value) = input.schedule_expression.as_deref() {
280 captured.insert("ScheduleExpression", value);
281 }
282 }
283 if requested.should_capture("Role") {
284 if let ::std::option::Option::Some(value) = input.role.as_deref() {
285 captured.insert("Role", value);
286 }
287 }
288
289 cfg.interceptor_state().store_put(captured);
290 ::std::result::Result::Ok(())
291 }
292}
293#[derive(Debug)]
294struct UpdateDataQualityEvaluationConfigResponseDeserializer;
295impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateDataQualityEvaluationConfigResponseDeserializer {
296 fn deserialize_nonstreaming_with_config(
297 &self,
298 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
299 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
300 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
301 let (success, status) = (response.status().is_success(), response.status().as_u16());
302 #[allow(unused_variables)]
307 let body = response.body().bytes().expect("body loaded");
308 let headers = response.headers();
309 #[allow(unused_mut)]
310 let mut force_error = false;
311 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
312 if !success && status != 200 || force_error {
313 let protocol = _cfg
314 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
315 .expect("a SharedClientProtocol is required");
316 #[allow(unused_mut)]
317 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
318 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
319 })?;
320 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
321 let generic = generic_builder.build();
322 let error_code = match generic.code() {
323 ::std::option::Option::Some(code) => code,
324 ::std::option::Option::None => {
325 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
326 ::aws_smithy_runtime_api::box_error::BoxError::from(
327 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError::unhandled(generic),
328 ),
329 ))
330 }
331 };
332 let _error_message = generic.message().map(|msg| msg.to_owned());
333 let err = match error_code {
334 "AccessDeniedException" => {
335 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError::AccessDeniedException({
336 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
337 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
338 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
339 )
340 })?;
341 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
342 tmp.deserialize_members(&mut *deser).map_err(|e| {
343 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
344 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
345 )
346 })?;
347 if tmp.message.is_none() {
348 tmp.message = _error_message;
349 }
350 let tmp = tmp.meta(generic);
351 tmp.build()
352 })
353 }
354 "ConcurrentModificationException" => {
355 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError::ConcurrentModificationException(
356 {
357 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
358 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
359 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
360 )
361 })?;
362 let mut tmp = <crate::types::error::builders::ConcurrentModificationExceptionBuilder>::default();
363 tmp.deserialize_members(&mut *deser).map_err(|e| {
364 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
365 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
366 )
367 })?;
368 if tmp.message.is_none() {
369 tmp.message = _error_message;
370 }
371 let tmp = tmp.meta(generic);
372 tmp.build()
373 },
374 )
375 }
376 "EntityNotFoundException" => {
377 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError::EntityNotFoundException({
378 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
379 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
380 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
381 )
382 })?;
383 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
384 tmp.deserialize_members(&mut *deser).map_err(|e| {
385 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
386 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
387 )
388 })?;
389 if tmp.message.is_none() {
390 tmp.message = _error_message;
391 }
392 let tmp = tmp.meta(generic);
393 tmp.build()
394 })
395 }
396 "InternalServiceException" => {
397 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError::InternalServiceException({
398 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
399 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
400 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
401 )
402 })?;
403 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
404 tmp.deserialize_members(&mut *deser).map_err(|e| {
405 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
406 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
407 )
408 })?;
409 if tmp.message.is_none() {
410 tmp.message = _error_message;
411 }
412 let tmp = tmp.meta(generic);
413 tmp.build()
414 })
415 }
416 "InvalidInputException" => {
417 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError::InvalidInputException({
418 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
419 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
420 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
421 )
422 })?;
423 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
424 tmp.deserialize_members(&mut *deser).map_err(|e| {
425 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
426 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
427 )
428 })?;
429 if tmp.message.is_none() {
430 tmp.message = _error_message;
431 }
432 let tmp = tmp.meta(generic);
433 tmp.build()
434 })
435 }
436 "OperationTimeoutException" => {
437 crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError::OperationTimeoutException({
438 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
439 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
440 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
441 )
442 })?;
443 let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
444 tmp.deserialize_members(&mut *deser).map_err(|e| {
445 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
446 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
447 )
448 })?;
449 if tmp.message.is_none() {
450 tmp.message = _error_message;
451 }
452 let tmp = tmp.meta(generic);
453 tmp.build()
454 })
455 }
456 _ => {
457 match protocol
465 .deserialize_error_response(response, _cfg)
466 .ok()
467 .and_then(|mut deser| {
468 ::aws_smithy_schema::registry::reify_error(
469 crate::operation::update_data_quality_evaluation_config::error_registry::REGISTRY
470 .or(&crate::error_type_registry::REGISTRY),
471 error_code,
472 &mut *deser,
473 )
474 }) {
475 ::std::option::Option::Some(source) => <crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
476 ::std::option::Option::None => crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError::generic(generic),
477 }
478 }
479 };
480 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
481 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
482 ))
483 } else {
484 let protocol = _cfg
485 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
486 .expect("a SharedClientProtocol is required");
487 let mut deser = protocol
488 .deserialize_response(response, UpdateDataQualityEvaluationConfig::OUTPUT_SCHEMA, _cfg)
489 .map_err(|e| {
490 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
491 })?;
492 let _response_headers = headers;
496 #[allow(unused_mut)]
500 let mut output =
501 <crate::operation::update_data_quality_evaluation_config::builders::UpdateDataQualityEvaluationConfigOutputBuilder>::default();
502 output.deserialize_members(&mut *deser).map_err(|e| {
503 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
504 })?;
505 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
506 let output = output.build();
507 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
508 }
509 }
510}
511#[derive(Debug)]
512struct UpdateDataQualityEvaluationConfigRequestSerializer;
513impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateDataQualityEvaluationConfigRequestSerializer {
514 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
515 fn serialize_input(
516 &self,
517 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
518 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
519 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
520 let input = input
521 .downcast::<crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigInput>()
522 .expect("correct type");
523
524 let protocol = _cfg
525 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
526 .expect("a SharedClientProtocol is required");
527 let mut request = protocol
528 .serialize_request(&input, UpdateDataQualityEvaluationConfig::INPUT_SCHEMA, "/", _cfg)
529 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
530
531 return ::std::result::Result::Ok(request);
532 }
533}
534#[derive(Debug)]
535struct UpdateDataQualityEvaluationConfigEndpointParamsInterceptor;
536
537#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
538impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateDataQualityEvaluationConfigEndpointParamsInterceptor {
539 fn name(&self) -> &'static str {
540 "UpdateDataQualityEvaluationConfigEndpointParamsInterceptor"
541 }
542
543 fn read_before_execution(
544 &self,
545 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
546 '_,
547 ::aws_smithy_runtime_api::client::interceptors::context::Input,
548 ::aws_smithy_runtime_api::client::interceptors::context::Output,
549 ::aws_smithy_runtime_api::client::interceptors::context::Error,
550 >,
551 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
552 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
553 let _input = context
554 .input()
555 .downcast_ref::<UpdateDataQualityEvaluationConfigInput>()
556 .ok_or("failed to downcast to UpdateDataQualityEvaluationConfigInput")?;
557
558 let params = crate::config::endpoint::Params::builder()
559 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
560 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
561 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
562 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
563 .build()
564 .map_err(|err| {
565 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
566 })?;
567 cfg.interceptor_state()
568 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
569 ::std::result::Result::Ok(())
570 }
571}
572
573#[non_exhaustive]
578#[derive(::std::fmt::Debug)]
579pub enum UpdateDataQualityEvaluationConfigError {
580 AccessDeniedException(crate::types::error::AccessDeniedException),
582 ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
584 EntityNotFoundException(crate::types::error::EntityNotFoundException),
586 InternalServiceException(crate::types::error::InternalServiceException),
588 InvalidInputException(crate::types::error::InvalidInputException),
590 OperationTimeoutException(crate::types::error::OperationTimeoutException),
592 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
594 variable wildcard pattern and check `.code()`:
595 \
596 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
597 \
598 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateDataQualityEvaluationConfigError) for what information is available for the error.")]
599 Unhandled(crate::error::sealed_unhandled::Unhandled),
600}
601impl UpdateDataQualityEvaluationConfigError {
602 pub fn unhandled(
604 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
605 ) -> Self {
606 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
607 source: err.into(),
608 meta: ::std::default::Default::default(),
609 })
610 }
611
612 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
614 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
615 source: err.clone().into(),
616 meta: err,
617 })
618 }
619 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
624 match self {
625 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
626 Self::ConcurrentModificationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
627 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
628 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
629 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
630 Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
631 Self::Unhandled(e) => &e.meta,
632 }
633 }
634 pub fn is_access_denied_exception(&self) -> bool {
636 matches!(self, Self::AccessDeniedException(_))
637 }
638 pub fn is_concurrent_modification_exception(&self) -> bool {
640 matches!(self, Self::ConcurrentModificationException(_))
641 }
642 pub fn is_entity_not_found_exception(&self) -> bool {
644 matches!(self, Self::EntityNotFoundException(_))
645 }
646 pub fn is_internal_service_exception(&self) -> bool {
648 matches!(self, Self::InternalServiceException(_))
649 }
650 pub fn is_invalid_input_exception(&self) -> bool {
652 matches!(self, Self::InvalidInputException(_))
653 }
654 pub fn is_operation_timeout_exception(&self) -> bool {
656 matches!(self, Self::OperationTimeoutException(_))
657 }
658}
659impl ::std::error::Error for UpdateDataQualityEvaluationConfigError {
660 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
661 match self {
662 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
663 Self::ConcurrentModificationException(_inner) => ::std::option::Option::Some(_inner),
664 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
665 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
666 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
667 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
668 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
669 }
670 }
671}
672impl ::std::fmt::Display for UpdateDataQualityEvaluationConfigError {
673 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
674 match self {
675 Self::AccessDeniedException(_inner) => _inner.fmt(f),
676 Self::ConcurrentModificationException(_inner) => _inner.fmt(f),
677 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
678 Self::InternalServiceException(_inner) => _inner.fmt(f),
679 Self::InvalidInputException(_inner) => _inner.fmt(f),
680 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
681 Self::Unhandled(_inner) => {
682 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
683 write!(f, "unhandled error ({code})")
684 } else {
685 f.write_str("unhandled error")
686 }
687 }
688 }
689 }
690}
691impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateDataQualityEvaluationConfigError {
692 fn code(&self) -> ::std::option::Option<&str> {
693 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
694 }
695 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
696 ::std::option::Option::None
697 }
698}
699impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateDataQualityEvaluationConfigError {
700 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
701 match self {
702 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
703 Self::ConcurrentModificationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
704 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
705 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
706 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
707 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
708 Self::Unhandled(_inner) => &_inner.meta,
709 }
710 }
711}
712impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateDataQualityEvaluationConfigError {
713 fn create_unhandled_error(
714 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
715 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
716 ) -> Self {
717 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
718 source,
719 meta: meta.unwrap_or_default(),
720 })
721 }
722}
723impl ::aws_types::request_id::RequestId for crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigError {
724 fn request_id(&self) -> Option<&str> {
725 self.meta().request_id()
726 }
727}
728
729pub use crate::operation::update_data_quality_evaluation_config::_update_data_quality_evaluation_config_input::UpdateDataQualityEvaluationConfigInput;
730
731pub use crate::operation::update_data_quality_evaluation_config::_update_data_quality_evaluation_config_output::UpdateDataQualityEvaluationConfigOutput;
732
733mod _update_data_quality_evaluation_config_input;
734
735mod _update_data_quality_evaluation_config_output;
736
737pub mod builders;