Skip to main content

aws_sdk_workspaces/operation/
associate_workspace_application.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `AssociateWorkspaceApplication`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct AssociateWorkspaceApplication;
6impl AssociateWorkspaceApplication {
7    /// Creates a new `AssociateWorkspaceApplication`
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::associate_workspace_application::AssociateWorkspaceApplicationInput::SCHEMA;
14    /// The schema for this operation's output shape.
15    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
16        crate::operation::associate_workspace_application::AssociateWorkspaceApplicationOutput::SCHEMA;
17    pub(crate) async fn orchestrate(
18        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
19        input: crate::operation::associate_workspace_application::AssociateWorkspaceApplicationInput,
20    ) -> ::std::result::Result<
21        crate::operation::associate_workspace_application::AssociateWorkspaceApplicationOutput,
22        ::aws_smithy_runtime_api::client::result::SdkError<
23            crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError,
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::associate_workspace_application::AssociateWorkspaceApplicationError>()
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::associate_workspace_application::AssociateWorkspaceApplicationOutput>()
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::associate_workspace_application::AssociateWorkspaceApplicationInput,
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            "WorkSpaces",
62            "AssociateWorkspaceApplication",
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            "WorkSpaces.AssociateWorkspaceApplication",
71            "rpc.service" = "WorkSpaces",
72            "rpc.method" = "AssociateWorkspaceApplication",
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::ApplicationNotSupportedException::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::ApplicationNotSupportedException::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::ApplicationNotSupportedException::deserialize(d)?))
126                        },
127                    )
128.insert_error_shape(
129                        crate::types::error::ComputeNotCompatibleException::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::ComputeNotCompatibleException::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::ComputeNotCompatibleException::deserialize(d)?))
135                        },
136                    )
137.insert_error_shape(
138                        crate::types::error::IncompatibleApplicationsException::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::IncompatibleApplicationsException::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::IncompatibleApplicationsException::deserialize(d)?))
144                        },
145                    )
146.insert_error_shape(
147                        crate::types::error::InvalidParameterValuesException::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::InvalidParameterValuesException::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::InvalidParameterValuesException::deserialize(d)?))
153                        },
154                    )
155.insert_error_shape(
156                        crate::types::error::OperatingSystemNotCompatibleException::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::OperatingSystemNotCompatibleException::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::OperatingSystemNotCompatibleException::deserialize(d)?))
162                        },
163                    )
164.insert_error_shape(
165                        crate::types::error::OperationNotSupportedException::SCHEMA,
166                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
167                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationNotSupportedException::deserialize(d)?))
168                        },
169                        |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> {
170                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationNotSupportedException::deserialize(d)?))
171                        },
172                    )
173.insert_error_shape(
174                        crate::types::error::ResourceAlreadyExistsException::SCHEMA,
175                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
176                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceAlreadyExistsException::deserialize(d)?))
177                        },
178                        |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> {
179                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceAlreadyExistsException::deserialize(d)?))
180                        },
181                    )
182.insert_error_shape(
183                        crate::types::error::ResourceInUseException::SCHEMA,
184                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
185                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceInUseException::deserialize(d)?))
186                        },
187                        |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> {
188                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceInUseException::deserialize(d)?))
189                        },
190                    )
191.insert_error_shape(
192                        crate::types::error::ResourceNotFoundException::SCHEMA,
193                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
194                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceNotFoundException::deserialize(d)?))
195                        },
196                        |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> {
197                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceNotFoundException::deserialize(d)?))
198                        },
199                    )
200                            .build()
201    });
202}
203impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for AssociateWorkspaceApplication {
204    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
205        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("AssociateWorkspaceApplication");
206
207        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
208            AssociateWorkspaceApplicationRequestSerializer,
209        ));
210        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
211            AssociateWorkspaceApplicationResponseDeserializer,
212        ));
213
214        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
215            crate::config::auth::Params::builder()
216                .operation_name("AssociateWorkspaceApplication")
217                .build()
218                .expect("required fields set"),
219        ));
220
221        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
222            "AssociateWorkspaceApplication",
223            "WorkSpaces",
224        ));
225        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
226        signing_options.double_uri_encode = true;
227        signing_options.content_sha256_header = false;
228        signing_options.normalize_uri_path = true;
229        signing_options.payload_override = None;
230
231        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
232            signing_options,
233            ..::std::default::Default::default()
234        });
235
236        ::std::option::Option::Some(cfg.freeze())
237    }
238
239    fn runtime_components(
240        &self,
241        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
242    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
243        #[allow(unused_mut)]
244        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("AssociateWorkspaceApplication")
245            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
246                AssociateWorkspaceApplicationTelemetryInputCaptureInterceptor,
247            ))
248            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
249                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
250            ))
251            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
252                AssociateWorkspaceApplicationEndpointParamsInterceptor,
253            ))
254            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
255                crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError,
256            >::new())
257            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
258                crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError,
259            >::new())
260            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
261                crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError,
262            >::new())
263            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
264                crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError,
265            >::new());
266
267        ::std::borrow::Cow::Owned(rcb)
268    }
269}
270
271#[derive(Debug)]
272struct AssociateWorkspaceApplicationTelemetryInputCaptureInterceptor;
273
274#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
275impl ::aws_smithy_runtime_api::client::interceptors::Intercept for AssociateWorkspaceApplicationTelemetryInputCaptureInterceptor {
276    fn name(&self) -> &'static str {
277        "AssociateWorkspaceApplicationTelemetryInputCaptureInterceptor"
278    }
279
280    fn read_before_execution(
281        &self,
282        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
283            '_,
284            ::aws_smithy_runtime_api::client::interceptors::context::Input,
285            ::aws_smithy_runtime_api::client::interceptors::context::Output,
286            ::aws_smithy_runtime_api::client::interceptors::context::Error,
287        >,
288        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
289    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
290        // Nothing to do unless the customer opted in by naming members to record.
291        let ::std::option::Option::Some(requested) = cfg
292            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
293            .filter(|r| !r.is_empty())
294        else {
295            return ::std::result::Result::Ok(());
296        };
297
298        let ::std::option::Option::Some(input) = context.input().downcast_ref::<AssociateWorkspaceApplicationInput>() else {
299            // A mismatched input is not this interceptor's concern; skip quietly.
300            return ::std::result::Result::Ok(());
301        };
302
303        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
304        if requested.should_capture("WorkspaceId") {
305            if let ::std::option::Option::Some(value) = input.workspace_id.as_deref() {
306                captured.insert("WorkspaceId", value);
307            }
308        }
309        if requested.should_capture("ApplicationId") {
310            if let ::std::option::Option::Some(value) = input.application_id.as_deref() {
311                captured.insert("ApplicationId", value);
312            }
313        }
314
315        cfg.interceptor_state().store_put(captured);
316        ::std::result::Result::Ok(())
317    }
318}
319#[derive(Debug)]
320struct AssociateWorkspaceApplicationResponseDeserializer;
321impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for AssociateWorkspaceApplicationResponseDeserializer {
322    fn deserialize_nonstreaming_with_config(
323        &self,
324        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
325        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
326    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
327        let (success, status) = (response.status().is_success(), response.status().as_u16());
328        // Load body and headers BEFORE BeforeParseResponse so customizations
329        // (e.g., S3's `body_is_error` check that detects errors returned with
330        // HTTP 200) can inspect them. The legacy non-streaming path also
331        // loads `body` before firing this hook.
332        #[allow(unused_variables)]
333        let body = response.body().bytes().expect("body loaded");
334        let headers = response.headers();
335        #[allow(unused_mut)]
336        let mut force_error = false;
337        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
338        if !success && status != 200 || force_error {
339            let protocol = _cfg
340                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
341                .expect("a SharedClientProtocol is required");
342            #[allow(unused_mut)]
343            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
344                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
345            })?;
346            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
347            let generic = generic_builder.build();
348            let error_code = match generic.code() {
349                ::std::option::Option::Some(code) => code,
350                ::std::option::Option::None => {
351                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
352                        ::aws_smithy_runtime_api::box_error::BoxError::from(
353                            crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::unhandled(generic),
354                        ),
355                    ))
356                }
357            };
358            let _error_message = generic.message().map(|msg| msg.to_owned());
359            let err = match error_code {
360                "AccessDeniedException" => {
361                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::AccessDeniedException({
362                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
363                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
364                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
365                            )
366                        })?;
367                        let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
368                        tmp.deserialize_members(&mut *deser).map_err(|e| {
369                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
370                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
371                            )
372                        })?;
373                        if tmp.message.is_none() {
374                            tmp.message = _error_message;
375                        }
376                        let tmp = tmp.meta(generic);
377                        tmp.build()
378                    })
379                }
380                "ApplicationNotSupportedException" => {
381                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::ApplicationNotSupportedException({
382                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
383                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
384                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
385                            )
386                        })?;
387                        let mut tmp = <crate::types::error::builders::ApplicationNotSupportedExceptionBuilder>::default();
388                        tmp.deserialize_members(&mut *deser).map_err(|e| {
389                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
390                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
391                            )
392                        })?;
393                        if tmp.message.is_none() {
394                            tmp.message = _error_message;
395                        }
396                        let tmp = tmp.meta(generic);
397                        tmp.build()
398                    })
399                }
400                "ComputeNotCompatibleException" => {
401                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::ComputeNotCompatibleException({
402                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
403                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
404                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
405                            )
406                        })?;
407                        let mut tmp = <crate::types::error::builders::ComputeNotCompatibleExceptionBuilder>::default();
408                        tmp.deserialize_members(&mut *deser).map_err(|e| {
409                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
410                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
411                            )
412                        })?;
413                        if tmp.message.is_none() {
414                            tmp.message = _error_message;
415                        }
416                        let tmp = tmp.meta(generic);
417                        tmp.build()
418                    })
419                }
420                "IncompatibleApplicationsException" => {
421                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::IncompatibleApplicationsException({
422                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
423                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
424                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
425                            )
426                        })?;
427                        let mut tmp = <crate::types::error::builders::IncompatibleApplicationsExceptionBuilder>::default();
428                        tmp.deserialize_members(&mut *deser).map_err(|e| {
429                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
430                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
431                            )
432                        })?;
433                        if tmp.message.is_none() {
434                            tmp.message = _error_message;
435                        }
436                        let tmp = tmp.meta(generic);
437                        tmp.build()
438                    })
439                }
440                "InvalidParameterValuesException" => {
441                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::InvalidParameterValuesException({
442                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
443                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
444                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
445                            )
446                        })?;
447                        let mut tmp = <crate::types::error::builders::InvalidParameterValuesExceptionBuilder>::default();
448                        tmp.deserialize_members(&mut *deser).map_err(|e| {
449                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
450                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
451                            )
452                        })?;
453                        if tmp.message.is_none() {
454                            tmp.message = _error_message;
455                        }
456                        let tmp = tmp.meta(generic);
457                        tmp.build()
458                    })
459                }
460                "OperatingSystemNotCompatibleException" => {
461                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::OperatingSystemNotCompatibleException({
462                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
463                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
464                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
465                            )
466                        })?;
467                        let mut tmp = <crate::types::error::builders::OperatingSystemNotCompatibleExceptionBuilder>::default();
468                        tmp.deserialize_members(&mut *deser).map_err(|e| {
469                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
470                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
471                            )
472                        })?;
473                        if tmp.message.is_none() {
474                            tmp.message = _error_message;
475                        }
476                        let tmp = tmp.meta(generic);
477                        tmp.build()
478                    })
479                }
480                "OperationNotSupportedException" => {
481                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::OperationNotSupportedException({
482                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
483                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
484                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
485                            )
486                        })?;
487                        let mut tmp = <crate::types::error::builders::OperationNotSupportedExceptionBuilder>::default();
488                        tmp.deserialize_members(&mut *deser).map_err(|e| {
489                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
490                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
491                            )
492                        })?;
493                        if tmp.message.is_none() {
494                            tmp.message = _error_message;
495                        }
496                        let tmp = tmp.meta(generic);
497                        tmp.build()
498                    })
499                }
500                "ResourceAlreadyExistsException" => {
501                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::ResourceAlreadyExistsException({
502                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
503                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
504                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
505                            )
506                        })?;
507                        let mut tmp = <crate::types::error::builders::ResourceAlreadyExistsExceptionBuilder>::default();
508                        tmp.deserialize_members(&mut *deser).map_err(|e| {
509                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
510                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
511                            )
512                        })?;
513                        if tmp.message.is_none() {
514                            tmp.message = _error_message;
515                        }
516                        let tmp = tmp.meta(generic);
517                        tmp.build()
518                    })
519                }
520                "ResourceInUseException" => {
521                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::ResourceInUseException({
522                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
523                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
524                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
525                            )
526                        })?;
527                        let mut tmp = <crate::types::error::builders::ResourceInUseExceptionBuilder>::default();
528                        tmp.deserialize_members(&mut *deser).map_err(|e| {
529                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
530                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
531                            )
532                        })?;
533                        if tmp.message.is_none() {
534                            tmp.message = _error_message;
535                        }
536                        let tmp = tmp.meta(generic);
537                        tmp.build()
538                    })
539                }
540                "ResourceNotFoundException" => {
541                    crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::ResourceNotFoundException({
542                        let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
543                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
544                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
545                            )
546                        })?;
547                        let mut tmp = <crate::types::error::builders::ResourceNotFoundExceptionBuilder>::default();
548                        tmp.deserialize_members(&mut *deser).map_err(|e| {
549                            ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
550                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
551                            )
552                        })?;
553                        if tmp.message.is_none() {
554                            tmp.message = _error_message;
555                        }
556                        let tmp = tmp.meta(generic);
557                        tmp.build()
558                    })
559                }
560                _ => {
561                    // Registry-backed, operation-scoped reification of an error whose
562                    // code this operation does not model directly: the operation's own
563                    // error registry is consulted first, then the lookup widens to the
564                    // service-wide error registry. On a hit, the reified error is attached
565                    // as the source of the returned unhandled error while its metadata
566                    // (code, message, request id) is preserved; on a miss the generic
567                    // error is returned unchanged.
568                    match protocol
569                        .deserialize_error_response(response, _cfg)
570                        .ok()
571                        .and_then(|mut deser| {
572                            ::aws_smithy_schema::registry::reify_error(
573                                crate::operation::associate_workspace_application::error_registry::REGISTRY
574                                    .or(&crate::error_type_registry::REGISTRY),
575                                error_code,
576                                &mut *deser,
577                            )
578                        }) {
579                        ::std::option::Option::Some(source) => <crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
580                        ::std::option::Option::None => crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError::generic(generic),
581                    }
582                }
583            };
584            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
585                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
586            ))
587        } else {
588            let protocol = _cfg
589                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
590                .expect("a SharedClientProtocol is required");
591            let mut deser = protocol
592                .deserialize_response(response, AssociateWorkspaceApplication::OUTPUT_SCHEMA, _cfg)
593                .map_err(|e| {
594                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
595                })?;
596            // `headers` is already in scope from the top of the function; alias it as
597            // `_response_headers` so MutateOutput customizations have a stable name to
598            // read from.
599            let _response_headers = headers;
600            // `mut` is required because `deserialize_members` and the `MutateOutput`
601            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
602            // empty output has no members and no customizations to run.
603            #[allow(unused_mut)]
604            let mut output = <crate::operation::associate_workspace_application::builders::AssociateWorkspaceApplicationOutputBuilder>::default();
605            output.deserialize_members(&mut *deser).map_err(|e| {
606                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
607            })?;
608            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
609            let output = output.build();
610            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
611        }
612    }
613}
614#[derive(Debug)]
615struct AssociateWorkspaceApplicationRequestSerializer;
616impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for AssociateWorkspaceApplicationRequestSerializer {
617    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
618    fn serialize_input(
619        &self,
620        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
621        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
622    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
623        let input = input
624            .downcast::<crate::operation::associate_workspace_application::AssociateWorkspaceApplicationInput>()
625            .expect("correct type");
626
627        let protocol = _cfg
628            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
629            .expect("a SharedClientProtocol is required");
630        let mut request = protocol
631            .serialize_request(&input, AssociateWorkspaceApplication::INPUT_SCHEMA, "/", _cfg)
632            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
633
634        return ::std::result::Result::Ok(request);
635    }
636}
637#[derive(Debug)]
638struct AssociateWorkspaceApplicationEndpointParamsInterceptor;
639
640#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
641impl ::aws_smithy_runtime_api::client::interceptors::Intercept for AssociateWorkspaceApplicationEndpointParamsInterceptor {
642    fn name(&self) -> &'static str {
643        "AssociateWorkspaceApplicationEndpointParamsInterceptor"
644    }
645
646    fn read_before_execution(
647        &self,
648        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
649            '_,
650            ::aws_smithy_runtime_api::client::interceptors::context::Input,
651            ::aws_smithy_runtime_api::client::interceptors::context::Output,
652            ::aws_smithy_runtime_api::client::interceptors::context::Error,
653        >,
654        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
655    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
656        let _input = context
657            .input()
658            .downcast_ref::<AssociateWorkspaceApplicationInput>()
659            .ok_or("failed to downcast to AssociateWorkspaceApplicationInput")?;
660
661        let params = crate::config::endpoint::Params::builder()
662            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
663            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
664            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
665            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
666            .build()
667            .map_err(|err| {
668                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
669            })?;
670        cfg.interceptor_state()
671            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
672        ::std::result::Result::Ok(())
673    }
674}
675
676// The get_* functions below are generated from JMESPath expressions in the
677// operationContextParams trait. They target the operation's input shape.
678
679/// Error type for the `AssociateWorkspaceApplicationError` operation.
680#[non_exhaustive]
681#[derive(::std::fmt::Debug)]
682pub enum AssociateWorkspaceApplicationError {
683    /// <p>The user is not authorized to access a resource.</p>
684    AccessDeniedException(crate::types::error::AccessDeniedException),
685    /// <p>The specified application is not supported.</p>
686    ApplicationNotSupportedException(crate::types::error::ApplicationNotSupportedException),
687    /// <p>The compute type of the WorkSpace is not compatible with the application.</p>
688    ComputeNotCompatibleException(crate::types::error::ComputeNotCompatibleException),
689    /// <p>The specified application is not compatible with the resource.</p>
690    IncompatibleApplicationsException(crate::types::error::IncompatibleApplicationsException),
691    /// <p>One or more parameter values are not valid.</p>
692    InvalidParameterValuesException(crate::types::error::InvalidParameterValuesException),
693    /// <p>The operating system of the WorkSpace is not compatible with the application.</p>
694    OperatingSystemNotCompatibleException(crate::types::error::OperatingSystemNotCompatibleException),
695    /// <p>This operation is not supported.</p>
696    OperationNotSupportedException(crate::types::error::OperationNotSupportedException),
697    /// <p>The specified resource already exists.</p>
698    ResourceAlreadyExistsException(crate::types::error::ResourceAlreadyExistsException),
699    /// <p>The specified resource is currently in use.</p>
700    ResourceInUseException(crate::types::error::ResourceInUseException),
701    /// <p>The resource could not be found.</p>
702    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
703    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
704    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
705    variable wildcard pattern and check `.code()`:
706     \
707    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
708     \
709    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-AssociateWorkspaceApplicationError) for what information is available for the error.")]
710    Unhandled(crate::error::sealed_unhandled::Unhandled),
711}
712impl AssociateWorkspaceApplicationError {
713    /// Creates the `AssociateWorkspaceApplicationError::Unhandled` variant from any error type.
714    pub fn unhandled(
715        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
716    ) -> Self {
717        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
718            source: err.into(),
719            meta: ::std::default::Default::default(),
720        })
721    }
722
723    /// Creates the `AssociateWorkspaceApplicationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
724    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
725        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
726            source: err.clone().into(),
727            meta: err,
728        })
729    }
730    ///
731    /// Returns error metadata, which includes the error code, message,
732    /// request ID, and potentially additional information.
733    ///
734    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
735        match self {
736            Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
737            Self::ApplicationNotSupportedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
738            Self::ComputeNotCompatibleException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
739            Self::IncompatibleApplicationsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
740            Self::InvalidParameterValuesException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
741            Self::OperatingSystemNotCompatibleException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
742            Self::OperationNotSupportedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
743            Self::ResourceAlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
744            Self::ResourceInUseException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
745            Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
746            Self::Unhandled(e) => &e.meta,
747        }
748    }
749    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::AccessDeniedException`.
750    pub fn is_access_denied_exception(&self) -> bool {
751        matches!(self, Self::AccessDeniedException(_))
752    }
753    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::ApplicationNotSupportedException`.
754    pub fn is_application_not_supported_exception(&self) -> bool {
755        matches!(self, Self::ApplicationNotSupportedException(_))
756    }
757    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::ComputeNotCompatibleException`.
758    pub fn is_compute_not_compatible_exception(&self) -> bool {
759        matches!(self, Self::ComputeNotCompatibleException(_))
760    }
761    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::IncompatibleApplicationsException`.
762    pub fn is_incompatible_applications_exception(&self) -> bool {
763        matches!(self, Self::IncompatibleApplicationsException(_))
764    }
765    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::InvalidParameterValuesException`.
766    pub fn is_invalid_parameter_values_exception(&self) -> bool {
767        matches!(self, Self::InvalidParameterValuesException(_))
768    }
769    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::OperatingSystemNotCompatibleException`.
770    pub fn is_operating_system_not_compatible_exception(&self) -> bool {
771        matches!(self, Self::OperatingSystemNotCompatibleException(_))
772    }
773    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::OperationNotSupportedException`.
774    pub fn is_operation_not_supported_exception(&self) -> bool {
775        matches!(self, Self::OperationNotSupportedException(_))
776    }
777    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::ResourceAlreadyExistsException`.
778    pub fn is_resource_already_exists_exception(&self) -> bool {
779        matches!(self, Self::ResourceAlreadyExistsException(_))
780    }
781    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::ResourceInUseException`.
782    pub fn is_resource_in_use_exception(&self) -> bool {
783        matches!(self, Self::ResourceInUseException(_))
784    }
785    /// Returns `true` if the error kind is `AssociateWorkspaceApplicationError::ResourceNotFoundException`.
786    pub fn is_resource_not_found_exception(&self) -> bool {
787        matches!(self, Self::ResourceNotFoundException(_))
788    }
789}
790impl ::std::error::Error for AssociateWorkspaceApplicationError {
791    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
792        match self {
793            Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
794            Self::ApplicationNotSupportedException(_inner) => ::std::option::Option::Some(_inner),
795            Self::ComputeNotCompatibleException(_inner) => ::std::option::Option::Some(_inner),
796            Self::IncompatibleApplicationsException(_inner) => ::std::option::Option::Some(_inner),
797            Self::InvalidParameterValuesException(_inner) => ::std::option::Option::Some(_inner),
798            Self::OperatingSystemNotCompatibleException(_inner) => ::std::option::Option::Some(_inner),
799            Self::OperationNotSupportedException(_inner) => ::std::option::Option::Some(_inner),
800            Self::ResourceAlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
801            Self::ResourceInUseException(_inner) => ::std::option::Option::Some(_inner),
802            Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
803            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
804        }
805    }
806}
807impl ::std::fmt::Display for AssociateWorkspaceApplicationError {
808    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
809        match self {
810            Self::AccessDeniedException(_inner) => _inner.fmt(f),
811            Self::ApplicationNotSupportedException(_inner) => _inner.fmt(f),
812            Self::ComputeNotCompatibleException(_inner) => _inner.fmt(f),
813            Self::IncompatibleApplicationsException(_inner) => _inner.fmt(f),
814            Self::InvalidParameterValuesException(_inner) => _inner.fmt(f),
815            Self::OperatingSystemNotCompatibleException(_inner) => _inner.fmt(f),
816            Self::OperationNotSupportedException(_inner) => _inner.fmt(f),
817            Self::ResourceAlreadyExistsException(_inner) => _inner.fmt(f),
818            Self::ResourceInUseException(_inner) => _inner.fmt(f),
819            Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
820            Self::Unhandled(_inner) => {
821                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
822                    write!(f, "unhandled error ({code})")
823                } else {
824                    f.write_str("unhandled error")
825                }
826            }
827        }
828    }
829}
830impl ::aws_smithy_types::retry::ProvideErrorKind for AssociateWorkspaceApplicationError {
831    fn code(&self) -> ::std::option::Option<&str> {
832        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
833    }
834    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
835        ::std::option::Option::None
836    }
837}
838impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AssociateWorkspaceApplicationError {
839    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
840        match self {
841            Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
842            Self::ApplicationNotSupportedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
843            Self::ComputeNotCompatibleException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
844            Self::IncompatibleApplicationsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
845            Self::InvalidParameterValuesException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
846            Self::OperatingSystemNotCompatibleException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
847            Self::OperationNotSupportedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
848            Self::ResourceAlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
849            Self::ResourceInUseException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
850            Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
851            Self::Unhandled(_inner) => &_inner.meta,
852        }
853    }
854}
855impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for AssociateWorkspaceApplicationError {
856    fn create_unhandled_error(
857        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
858        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
859    ) -> Self {
860        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
861            source,
862            meta: meta.unwrap_or_default(),
863        })
864    }
865}
866impl ::aws_types::request_id::RequestId for crate::operation::associate_workspace_application::AssociateWorkspaceApplicationError {
867    fn request_id(&self) -> Option<&str> {
868        self.meta().request_id()
869    }
870}
871
872pub use crate::operation::associate_workspace_application::_associate_workspace_application_input::AssociateWorkspaceApplicationInput;
873
874pub use crate::operation::associate_workspace_application::_associate_workspace_application_output::AssociateWorkspaceApplicationOutput;
875
876mod _associate_workspace_application_input;
877
878mod _associate_workspace_application_output;
879
880/// Builders
881pub mod builders;