Skip to main content

aws_sdk_glue/operation/
update_data_quality_evaluation_config.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `UpdateDataQualityEvaluationConfig`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateDataQualityEvaluationConfig;
6impl UpdateDataQualityEvaluationConfig {
7    /// Creates a new `UpdateDataQualityEvaluationConfig`
8    pub fn new() -> Self {
9        Self
10    }
11    /// The schema for this operation's input shape.
12    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
13        crate::operation::update_data_quality_evaluation_config::UpdateDataQualityEvaluationConfigInput::SCHEMA;
14    /// The schema for this operation's output shape.
15    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        // Create a parent span for the entire operation. Includes a random, internal-only,
68        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
69        .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}
99/// Per-operation error registry. Contains an entry for every modeled
100/// error this operation can throw.
101///
102/// Used by the schema-serde error path as the operation-scoped lookup
103/// for registry-backed error reification: an error code that does not
104/// match one of the operation's modeled errors directly is resolved
105/// against this registry first, then widened to the service-wide error
106/// registry.
107pub(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        // Nothing to do unless the customer opted in by naming members to record.
255        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            // A mismatched input is not this interceptor's concern; skip quietly.
264            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        // Load body and headers BEFORE BeforeParseResponse so customizations
303        // (e.g., S3's `body_is_error` check that detects errors returned with
304        // HTTP 200) can inspect them. The legacy non-streaming path also
305        // loads `body` before firing this hook.
306        #[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                    // Registry-backed, operation-scoped reification of an error whose
458                    // code this operation does not model directly: the operation's own
459                    // error registry is consulted first, then the lookup widens to the
460                    // service-wide error registry. On a hit, the reified error is attached
461                    // as the source of the returned unhandled error while its metadata
462                    // (code, message, request id) is preserved; on a miss the generic
463                    // error is returned unchanged.
464                    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            // `headers` is already in scope from the top of the function; alias it as
493            // `_response_headers` so MutateOutput customizations have a stable name to
494            // read from.
495            let _response_headers = headers;
496            // `mut` is required because `deserialize_members` and the `MutateOutput`
497            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
498            // empty output has no members and no customizations to run.
499            #[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// The get_* functions below are generated from JMESPath expressions in the
574// operationContextParams trait. They target the operation's input shape.
575
576/// Error type for the `UpdateDataQualityEvaluationConfigError` operation.
577#[non_exhaustive]
578#[derive(::std::fmt::Debug)]
579pub enum UpdateDataQualityEvaluationConfigError {
580    /// <p>Access to a resource was denied.</p>
581    AccessDeniedException(crate::types::error::AccessDeniedException),
582    /// <p>Two processes are trying to modify a resource simultaneously.</p>
583    ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
584    /// <p>A specified entity does not exist</p>
585    EntityNotFoundException(crate::types::error::EntityNotFoundException),
586    /// <p>An internal service error occurred.</p>
587    InternalServiceException(crate::types::error::InternalServiceException),
588    /// <p>The input provided was not valid.</p>
589    InvalidInputException(crate::types::error::InvalidInputException),
590    /// <p>The operation timed out.</p>
591    OperationTimeoutException(crate::types::error::OperationTimeoutException),
592    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
593    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
594    variable wildcard pattern and check `.code()`:
595     \
596    &nbsp;&nbsp;&nbsp;`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    /// Creates the `UpdateDataQualityEvaluationConfigError::Unhandled` variant from any error type.
603    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    /// Creates the `UpdateDataQualityEvaluationConfigError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
613    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    ///
620    /// Returns error metadata, which includes the error code, message,
621    /// request ID, and potentially additional information.
622    ///
623    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    /// Returns `true` if the error kind is `UpdateDataQualityEvaluationConfigError::AccessDeniedException`.
635    pub fn is_access_denied_exception(&self) -> bool {
636        matches!(self, Self::AccessDeniedException(_))
637    }
638    /// Returns `true` if the error kind is `UpdateDataQualityEvaluationConfigError::ConcurrentModificationException`.
639    pub fn is_concurrent_modification_exception(&self) -> bool {
640        matches!(self, Self::ConcurrentModificationException(_))
641    }
642    /// Returns `true` if the error kind is `UpdateDataQualityEvaluationConfigError::EntityNotFoundException`.
643    pub fn is_entity_not_found_exception(&self) -> bool {
644        matches!(self, Self::EntityNotFoundException(_))
645    }
646    /// Returns `true` if the error kind is `UpdateDataQualityEvaluationConfigError::InternalServiceException`.
647    pub fn is_internal_service_exception(&self) -> bool {
648        matches!(self, Self::InternalServiceException(_))
649    }
650    /// Returns `true` if the error kind is `UpdateDataQualityEvaluationConfigError::InvalidInputException`.
651    pub fn is_invalid_input_exception(&self) -> bool {
652        matches!(self, Self::InvalidInputException(_))
653    }
654    /// Returns `true` if the error kind is `UpdateDataQualityEvaluationConfigError::OperationTimeoutException`.
655    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
737/// Builders
738pub mod builders;