Skip to main content

aws_sdk_glue/operation/
create_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 `CreateDataQualityEvaluationConfig`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CreateDataQualityEvaluationConfig;
6impl CreateDataQualityEvaluationConfig {
7    /// Creates a new `CreateDataQualityEvaluationConfig`
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::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigInput::SCHEMA;
14    /// The schema for this operation's output shape.
15    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
16        crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigOutput::SCHEMA;
17    pub(crate) async fn orchestrate(
18        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
19        input: crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigInput,
20    ) -> ::std::result::Result<
21        crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigOutput,
22        ::aws_smithy_runtime_api::client::result::SdkError<
23            crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError,
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::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError>()
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::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigOutput>()
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::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigInput,
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            "CreateDataQualityEvaluationConfig",
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.CreateDataQualityEvaluationConfig",
71            "rpc.service" = "Glue",
72            "rpc.method" = "CreateDataQualityEvaluationConfig",
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        runtime_plugins = runtime_plugins.with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new(
86            |token_provider, input| {
87                let input: &mut crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigInput =
88                    input.downcast_mut().expect("correct type");
89                if input.client_token.is_none() {
90                    input.client_token = ::std::option::Option::Some(token_provider.make_idempotency_token());
91                }
92            },
93        ));
94        if let ::std::option::Option::Some(config_override) = config_override {
95            for plugin in config_override.runtime_plugins.iter().cloned() {
96                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
97            }
98            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
99                config_override,
100                client_config.config.clone(),
101                &client_config.runtime_components,
102            ));
103        }
104        runtime_plugins
105    }
106}
107/// Per-operation error registry. Contains an entry for every modeled
108/// error this operation can throw.
109///
110/// Used by the schema-serde error path as the operation-scoped lookup
111/// for registry-backed error reification: an error code that does not
112/// match one of the operation's modeled errors directly is resolved
113/// against this registry first, then widened to the service-wide error
114/// registry.
115pub(crate) mod error_registry {
116    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
117        ::aws_smithy_schema::registry::TypeRegistry::builder()
118                            .insert_error_shape(
119                        crate::types::error::AccessDeniedException::SCHEMA,
120                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
121                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AccessDeniedException::deserialize(d)?))
122                        },
123                        |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> {
124                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AccessDeniedException::deserialize(d)?))
125                        },
126                    )
127.insert_error_shape(
128                        crate::types::error::AlreadyExistsException::SCHEMA,
129                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
130                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AlreadyExistsException::deserialize(d)?))
131                        },
132                        |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> {
133                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AlreadyExistsException::deserialize(d)?))
134                        },
135                    )
136.insert_error_shape(
137                        crate::types::error::EntityNotFoundException::SCHEMA,
138                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
139                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
140                        },
141                        |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> {
142                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
143                        },
144                    )
145.insert_error_shape(
146                        crate::types::error::IdempotentParameterMismatchException::SCHEMA,
147                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
148                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::IdempotentParameterMismatchException::deserialize(d)?))
149                        },
150                        |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> {
151                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::IdempotentParameterMismatchException::deserialize(d)?))
152                        },
153                    )
154.insert_error_shape(
155                        crate::types::error::InternalServiceException::SCHEMA,
156                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
157                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
158                        },
159                        |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> {
160                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
161                        },
162                    )
163.insert_error_shape(
164                        crate::types::error::InvalidInputException::SCHEMA,
165                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
166                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
167                        },
168                        |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> {
169                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
170                        },
171                    )
172.insert_error_shape(
173                        crate::types::error::OperationTimeoutException::SCHEMA,
174                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
175                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
176                        },
177                        |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> {
178                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
179                        },
180                    )
181.insert_error_shape(
182                        crate::types::error::ResourceNumberLimitExceededException::SCHEMA,
183                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
184                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceNumberLimitExceededException::deserialize(d)?))
185                        },
186                        |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> {
187                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceNumberLimitExceededException::deserialize(d)?))
188                        },
189                    )
190                            .build()
191    });
192}
193impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateDataQualityEvaluationConfig {
194    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
195        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateDataQualityEvaluationConfig");
196
197        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
198            CreateDataQualityEvaluationConfigRequestSerializer,
199        ));
200        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
201            CreateDataQualityEvaluationConfigResponseDeserializer,
202        ));
203
204        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
205            crate::config::auth::Params::builder()
206                .operation_name("CreateDataQualityEvaluationConfig")
207                .build()
208                .expect("required fields set"),
209        ));
210
211        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
212            "CreateDataQualityEvaluationConfig",
213            "Glue",
214        ));
215        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
216        signing_options.double_uri_encode = true;
217        signing_options.content_sha256_header = false;
218        signing_options.normalize_uri_path = true;
219        signing_options.payload_override = None;
220
221        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
222            signing_options,
223            ..::std::default::Default::default()
224        });
225
226        ::std::option::Option::Some(cfg.freeze())
227    }
228
229    fn runtime_components(
230        &self,
231        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
232    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
233        #[allow(unused_mut)]
234        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateDataQualityEvaluationConfig")
235            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
236                CreateDataQualityEvaluationConfigTelemetryInputCaptureInterceptor,
237            ))
238            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
239                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
240            ))
241            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
242                CreateDataQualityEvaluationConfigEndpointParamsInterceptor,
243            ))
244            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
245                crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError,
246            >::new())
247            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
248                crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError,
249            >::new())
250            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
251                crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError,
252            >::new())
253            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
254                crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError,
255            >::new());
256
257        ::std::borrow::Cow::Owned(rcb)
258    }
259}
260
261#[derive(Debug)]
262struct CreateDataQualityEvaluationConfigTelemetryInputCaptureInterceptor;
263
264#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
265impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDataQualityEvaluationConfigTelemetryInputCaptureInterceptor {
266    fn name(&self) -> &'static str {
267        "CreateDataQualityEvaluationConfigTelemetryInputCaptureInterceptor"
268    }
269
270    fn read_before_execution(
271        &self,
272        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
273            '_,
274            ::aws_smithy_runtime_api::client::interceptors::context::Input,
275            ::aws_smithy_runtime_api::client::interceptors::context::Output,
276            ::aws_smithy_runtime_api::client::interceptors::context::Error,
277        >,
278        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
279    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
280        // Nothing to do unless the customer opted in by naming members to record.
281        let ::std::option::Option::Some(requested) = cfg
282            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
283            .filter(|r| !r.is_empty())
284        else {
285            return ::std::result::Result::Ok(());
286        };
287
288        let ::std::option::Option::Some(input) = context.input().downcast_ref::<CreateDataQualityEvaluationConfigInput>() else {
289            // A mismatched input is not this interceptor's concern; skip quietly.
290            return ::std::result::Result::Ok(());
291        };
292
293        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
294        if requested.should_capture("Name") {
295            if let ::std::option::Option::Some(value) = input.name.as_deref() {
296                captured.insert("Name", value);
297            }
298        }
299        if requested.should_capture("RulesetName") {
300            if let ::std::option::Option::Some(value) = input.ruleset_name.as_deref() {
301                captured.insert("RulesetName", value);
302            }
303        }
304        if requested.should_capture("ScheduleExpression") {
305            if let ::std::option::Option::Some(value) = input.schedule_expression.as_deref() {
306                captured.insert("ScheduleExpression", value);
307            }
308        }
309        if requested.should_capture("Role") {
310            if let ::std::option::Option::Some(value) = input.role.as_deref() {
311                captured.insert("Role", value);
312            }
313        }
314        if requested.should_capture("ClientToken") {
315            if let ::std::option::Option::Some(value) = input.client_token.as_deref() {
316                captured.insert("ClientToken", value);
317            }
318        }
319
320        cfg.interceptor_state().store_put(captured);
321        ::std::result::Result::Ok(())
322    }
323}
324#[derive(Debug)]
325struct CreateDataQualityEvaluationConfigResponseDeserializer;
326impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateDataQualityEvaluationConfigResponseDeserializer {
327    fn deserialize_nonstreaming_with_config(
328        &self,
329        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
330        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
331    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
332        let (success, status) = (response.status().is_success(), response.status().as_u16());
333        // Load body and headers BEFORE BeforeParseResponse so customizations
334        // (e.g., S3's `body_is_error` check that detects errors returned with
335        // HTTP 200) can inspect them. The legacy non-streaming path also
336        // loads `body` before firing this hook.
337        #[allow(unused_variables)]
338        let body = response.body().bytes().expect("body loaded");
339        let headers = response.headers();
340        #[allow(unused_mut)]
341        let mut force_error = false;
342        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
343        if !success && status != 200 || force_error {
344            let protocol = _cfg
345                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
346                .expect("a SharedClientProtocol is required");
347            #[allow(unused_mut)]
348            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
349                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
350            })?;
351            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
352            let generic = generic_builder.build();
353            let error_code = match generic.code() {
354                ::std::option::Option::Some(code) => code,
355                ::std::option::Option::None => {
356                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
357                        ::aws_smithy_runtime_api::box_error::BoxError::from(
358                            crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::unhandled(generic),
359                        ),
360                    ))
361                }
362            };
363            let _error_message = generic.message().map(|msg| msg.to_owned());
364            let err = match error_code {
365"AccessDeniedException" => crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::AccessDeniedException({
366let mut deser = protocol.deserialize_error_response(response, _cfg)
367                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
368                    let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
369                    tmp.deserialize_members(&mut *deser)
370                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
371if tmp.message.is_none() {
372                                tmp.message = _error_message;
373                            }
374let tmp = tmp.meta(generic);
375tmp.build()
376}),
377"AlreadyExistsException" => crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::AlreadyExistsException({
378let mut deser = protocol.deserialize_error_response(response, _cfg)
379                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
380                    let mut tmp = <crate::types::error::builders::AlreadyExistsExceptionBuilder>::default();
381                    tmp.deserialize_members(&mut *deser)
382                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
383if tmp.message.is_none() {
384                                tmp.message = _error_message;
385                            }
386let tmp = tmp.meta(generic);
387tmp.build()
388}),
389"EntityNotFoundException" => crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::EntityNotFoundException({
390let mut deser = protocol.deserialize_error_response(response, _cfg)
391                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
392                    let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
393                    tmp.deserialize_members(&mut *deser)
394                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
395if tmp.message.is_none() {
396                                tmp.message = _error_message;
397                            }
398let tmp = tmp.meta(generic);
399tmp.build()
400}),
401"IdempotentParameterMismatchException" => crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::IdempotentParameterMismatchException({
402let mut deser = protocol.deserialize_error_response(response, _cfg)
403                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
404                    let mut tmp = <crate::types::error::builders::IdempotentParameterMismatchExceptionBuilder>::default();
405                    tmp.deserialize_members(&mut *deser)
406                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
407if tmp.message.is_none() {
408                                tmp.message = _error_message;
409                            }
410let tmp = tmp.meta(generic);
411tmp.build()
412}),
413"InternalServiceException" => crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::InternalServiceException({
414let mut deser = protocol.deserialize_error_response(response, _cfg)
415                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
416                    let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
417                    tmp.deserialize_members(&mut *deser)
418                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
419if tmp.message.is_none() {
420                                tmp.message = _error_message;
421                            }
422let tmp = tmp.meta(generic);
423tmp.build()
424}),
425"InvalidInputException" => crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::InvalidInputException({
426let mut deser = protocol.deserialize_error_response(response, _cfg)
427                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
428                    let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
429                    tmp.deserialize_members(&mut *deser)
430                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
431if tmp.message.is_none() {
432                                tmp.message = _error_message;
433                            }
434let tmp = tmp.meta(generic);
435tmp.build()
436}),
437"OperationTimeoutException" => crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::OperationTimeoutException({
438let mut deser = protocol.deserialize_error_response(response, _cfg)
439                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
440                    let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
441                    tmp.deserialize_members(&mut *deser)
442                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
443if tmp.message.is_none() {
444                                tmp.message = _error_message;
445                            }
446let tmp = tmp.meta(generic);
447tmp.build()
448}),
449"ResourceNumberLimitExceededException" => crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::ResourceNumberLimitExceededException({
450let mut deser = protocol.deserialize_error_response(response, _cfg)
451                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
452                    let mut tmp = <crate::types::error::builders::ResourceNumberLimitExceededExceptionBuilder>::default();
453                    tmp.deserialize_members(&mut *deser)
454                        .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
455if tmp.message.is_none() {
456                                tmp.message = _error_message;
457                            }
458let tmp = tmp.meta(generic);
459tmp.build()
460}),
461_ => {
462                    // Registry-backed, operation-scoped reification of an error whose
463                    // code this operation does not model directly: the operation's own
464                    // error registry is consulted first, then the lookup widens to the
465                    // service-wide error registry. On a hit, the reified error is attached
466                    // as the source of the returned unhandled error while its metadata
467                    // (code, message, request id) is preserved; on a miss the generic
468                    // error is returned unchanged.
469                    match protocol
470                        .deserialize_error_response(response, _cfg)
471                        .ok()
472                        .and_then(|mut deser| {
473                            ::aws_smithy_schema::registry::reify_error(
474                                crate::operation::create_data_quality_evaluation_config::error_registry::REGISTRY
475                                    .or(&crate::error_type_registry::REGISTRY),
476                                error_code,
477                                &mut *deser,
478                            )
479                        }) {
480                        ::std::option::Option::Some(source) => <crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
481                        ::std::option::Option::None => crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError::generic(generic),
482                    }
483                }
484};
485            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
486                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
487            ))
488        } else {
489            let protocol = _cfg
490                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
491                .expect("a SharedClientProtocol is required");
492            let mut deser = protocol
493                .deserialize_response(response, CreateDataQualityEvaluationConfig::OUTPUT_SCHEMA, _cfg)
494                .map_err(|e| {
495                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
496                })?;
497            // `headers` is already in scope from the top of the function; alias it as
498            // `_response_headers` so MutateOutput customizations have a stable name to
499            // read from.
500            let _response_headers = headers;
501            // `mut` is required because `deserialize_members` and the `MutateOutput`
502            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
503            // empty output has no members and no customizations to run.
504            #[allow(unused_mut)]
505            let mut output =
506                <crate::operation::create_data_quality_evaluation_config::builders::CreateDataQualityEvaluationConfigOutputBuilder>::default();
507            output.deserialize_members(&mut *deser).map_err(|e| {
508                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
509            })?;
510            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
511            let output = output.build();
512            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
513        }
514    }
515}
516#[derive(Debug)]
517struct CreateDataQualityEvaluationConfigRequestSerializer;
518impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateDataQualityEvaluationConfigRequestSerializer {
519    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
520    fn serialize_input(
521        &self,
522        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
523        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
524    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
525        let input = input
526            .downcast::<crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigInput>()
527            .expect("correct type");
528
529        let protocol = _cfg
530            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
531            .expect("a SharedClientProtocol is required");
532        let mut request = protocol
533            .serialize_request(&input, CreateDataQualityEvaluationConfig::INPUT_SCHEMA, "/", _cfg)
534            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
535
536        return ::std::result::Result::Ok(request);
537    }
538}
539#[derive(Debug)]
540struct CreateDataQualityEvaluationConfigEndpointParamsInterceptor;
541
542#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
543impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDataQualityEvaluationConfigEndpointParamsInterceptor {
544    fn name(&self) -> &'static str {
545        "CreateDataQualityEvaluationConfigEndpointParamsInterceptor"
546    }
547
548    fn read_before_execution(
549        &self,
550        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
551            '_,
552            ::aws_smithy_runtime_api::client::interceptors::context::Input,
553            ::aws_smithy_runtime_api::client::interceptors::context::Output,
554            ::aws_smithy_runtime_api::client::interceptors::context::Error,
555        >,
556        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
557    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
558        let _input = context
559            .input()
560            .downcast_ref::<CreateDataQualityEvaluationConfigInput>()
561            .ok_or("failed to downcast to CreateDataQualityEvaluationConfigInput")?;
562
563        let params = crate::config::endpoint::Params::builder()
564            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
565            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
566            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
567            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
568            .build()
569            .map_err(|err| {
570                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
571            })?;
572        cfg.interceptor_state()
573            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
574        ::std::result::Result::Ok(())
575    }
576}
577
578// The get_* functions below are generated from JMESPath expressions in the
579// operationContextParams trait. They target the operation's input shape.
580
581/// Error type for the `CreateDataQualityEvaluationConfigError` operation.
582#[non_exhaustive]
583#[derive(::std::fmt::Debug)]
584pub enum CreateDataQualityEvaluationConfigError {
585    /// <p>Access to a resource was denied.</p>
586    AccessDeniedException(crate::types::error::AccessDeniedException),
587    /// <p>A resource to be created or added already exists.</p>
588    AlreadyExistsException(crate::types::error::AlreadyExistsException),
589    /// <p>A specified entity does not exist</p>
590    EntityNotFoundException(crate::types::error::EntityNotFoundException),
591    /// <p>The same unique identifier was associated with two different records.</p>
592    IdempotentParameterMismatchException(crate::types::error::IdempotentParameterMismatchException),
593    /// <p>An internal service error occurred.</p>
594    InternalServiceException(crate::types::error::InternalServiceException),
595    /// <p>The input provided was not valid.</p>
596    InvalidInputException(crate::types::error::InvalidInputException),
597    /// <p>The operation timed out.</p>
598    OperationTimeoutException(crate::types::error::OperationTimeoutException),
599    /// <p>A resource numerical limit was exceeded.</p>
600    ResourceNumberLimitExceededException(crate::types::error::ResourceNumberLimitExceededException),
601    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
602    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
603    variable wildcard pattern and check `.code()`:
604     \
605    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
606     \
607    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateDataQualityEvaluationConfigError) for what information is available for the error.")]
608    Unhandled(crate::error::sealed_unhandled::Unhandled),
609}
610impl CreateDataQualityEvaluationConfigError {
611    /// Creates the `CreateDataQualityEvaluationConfigError::Unhandled` variant from any error type.
612    pub fn unhandled(
613        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
614    ) -> Self {
615        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
616            source: err.into(),
617            meta: ::std::default::Default::default(),
618        })
619    }
620
621    /// Creates the `CreateDataQualityEvaluationConfigError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
622    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
623        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
624            source: err.clone().into(),
625            meta: err,
626        })
627    }
628    ///
629    /// Returns error metadata, which includes the error code, message,
630    /// request ID, and potentially additional information.
631    ///
632    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
633        match self {
634            Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
635            Self::AlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
636            Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
637            Self::IdempotentParameterMismatchException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
638            Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
639            Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
640            Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
641            Self::ResourceNumberLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
642            Self::Unhandled(e) => &e.meta,
643        }
644    }
645    /// Returns `true` if the error kind is `CreateDataQualityEvaluationConfigError::AccessDeniedException`.
646    pub fn is_access_denied_exception(&self) -> bool {
647        matches!(self, Self::AccessDeniedException(_))
648    }
649    /// Returns `true` if the error kind is `CreateDataQualityEvaluationConfigError::AlreadyExistsException`.
650    pub fn is_already_exists_exception(&self) -> bool {
651        matches!(self, Self::AlreadyExistsException(_))
652    }
653    /// Returns `true` if the error kind is `CreateDataQualityEvaluationConfigError::EntityNotFoundException`.
654    pub fn is_entity_not_found_exception(&self) -> bool {
655        matches!(self, Self::EntityNotFoundException(_))
656    }
657    /// Returns `true` if the error kind is `CreateDataQualityEvaluationConfigError::IdempotentParameterMismatchException`.
658    pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
659        matches!(self, Self::IdempotentParameterMismatchException(_))
660    }
661    /// Returns `true` if the error kind is `CreateDataQualityEvaluationConfigError::InternalServiceException`.
662    pub fn is_internal_service_exception(&self) -> bool {
663        matches!(self, Self::InternalServiceException(_))
664    }
665    /// Returns `true` if the error kind is `CreateDataQualityEvaluationConfigError::InvalidInputException`.
666    pub fn is_invalid_input_exception(&self) -> bool {
667        matches!(self, Self::InvalidInputException(_))
668    }
669    /// Returns `true` if the error kind is `CreateDataQualityEvaluationConfigError::OperationTimeoutException`.
670    pub fn is_operation_timeout_exception(&self) -> bool {
671        matches!(self, Self::OperationTimeoutException(_))
672    }
673    /// Returns `true` if the error kind is `CreateDataQualityEvaluationConfigError::ResourceNumberLimitExceededException`.
674    pub fn is_resource_number_limit_exceeded_exception(&self) -> bool {
675        matches!(self, Self::ResourceNumberLimitExceededException(_))
676    }
677}
678impl ::std::error::Error for CreateDataQualityEvaluationConfigError {
679    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
680        match self {
681            Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
682            Self::AlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
683            Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
684            Self::IdempotentParameterMismatchException(_inner) => ::std::option::Option::Some(_inner),
685            Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
686            Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
687            Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
688            Self::ResourceNumberLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
689            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
690        }
691    }
692}
693impl ::std::fmt::Display for CreateDataQualityEvaluationConfigError {
694    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
695        match self {
696            Self::AccessDeniedException(_inner) => _inner.fmt(f),
697            Self::AlreadyExistsException(_inner) => _inner.fmt(f),
698            Self::EntityNotFoundException(_inner) => _inner.fmt(f),
699            Self::IdempotentParameterMismatchException(_inner) => _inner.fmt(f),
700            Self::InternalServiceException(_inner) => _inner.fmt(f),
701            Self::InvalidInputException(_inner) => _inner.fmt(f),
702            Self::OperationTimeoutException(_inner) => _inner.fmt(f),
703            Self::ResourceNumberLimitExceededException(_inner) => _inner.fmt(f),
704            Self::Unhandled(_inner) => {
705                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
706                    write!(f, "unhandled error ({code})")
707                } else {
708                    f.write_str("unhandled error")
709                }
710            }
711        }
712    }
713}
714impl ::aws_smithy_types::retry::ProvideErrorKind for CreateDataQualityEvaluationConfigError {
715    fn code(&self) -> ::std::option::Option<&str> {
716        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
717    }
718    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
719        ::std::option::Option::None
720    }
721}
722impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateDataQualityEvaluationConfigError {
723    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
724        match self {
725            Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
726            Self::AlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
727            Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
728            Self::IdempotentParameterMismatchException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
729            Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
730            Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
731            Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
732            Self::ResourceNumberLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
733            Self::Unhandled(_inner) => &_inner.meta,
734        }
735    }
736}
737impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateDataQualityEvaluationConfigError {
738    fn create_unhandled_error(
739        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
740        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
741    ) -> Self {
742        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
743            source,
744            meta: meta.unwrap_or_default(),
745        })
746    }
747}
748impl ::aws_types::request_id::RequestId for crate::operation::create_data_quality_evaluation_config::CreateDataQualityEvaluationConfigError {
749    fn request_id(&self) -> Option<&str> {
750        self.meta().request_id()
751    }
752}
753
754pub use crate::operation::create_data_quality_evaluation_config::_create_data_quality_evaluation_config_input::CreateDataQualityEvaluationConfigInput;
755
756pub use crate::operation::create_data_quality_evaluation_config::_create_data_quality_evaluation_config_output::CreateDataQualityEvaluationConfigOutput;
757
758mod _create_data_quality_evaluation_config_input;
759
760mod _create_data_quality_evaluation_config_output;
761
762/// Builders
763pub mod builders;