Skip to main content

aws_sdk_glue/operation/
get_dashboard_url.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `GetDashboardUrl`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct GetDashboardUrl;
6impl GetDashboardUrl {
7    /// Creates a new `GetDashboardUrl`
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> = crate::operation::get_dashboard_url::GetDashboardUrlInput::SCHEMA;
13    /// The schema for this operation's output shape.
14    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::get_dashboard_url::GetDashboardUrlOutput::SCHEMA;
15    pub(crate) async fn orchestrate(
16        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17        input: crate::operation::get_dashboard_url::GetDashboardUrlInput,
18    ) -> ::std::result::Result<
19        crate::operation::get_dashboard_url::GetDashboardUrlOutput,
20        ::aws_smithy_runtime_api::client::result::SdkError<
21            crate::operation::get_dashboard_url::GetDashboardUrlError,
22            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
23        >,
24    > {
25        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
26            ::aws_smithy_runtime_api::client::interceptors::context::Error,
27            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
28        >| {
29            err.map_service_error(|err| {
30                err.downcast::<crate::operation::get_dashboard_url::GetDashboardUrlError>()
31                    .expect("correct error type")
32            })
33        };
34        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
35            .await
36            .map_err(map_err)?;
37        let output = context.finalize().map_err(map_err)?;
38        ::std::result::Result::Ok(
39            output
40                .downcast::<crate::operation::get_dashboard_url::GetDashboardUrlOutput>()
41                .expect("correct output type"),
42        )
43    }
44
45    pub(crate) async fn orchestrate_with_stop_point(
46        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
47        input: crate::operation::get_dashboard_url::GetDashboardUrlInput,
48        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
49    ) -> ::std::result::Result<
50        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
51        ::aws_smithy_runtime_api::client::result::SdkError<
52            ::aws_smithy_runtime_api::client::interceptors::context::Error,
53            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
54        >,
55    > {
56        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
57        use ::tracing::Instrument;
58        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Glue", "GetDashboardUrl", input, runtime_plugins, stop_point)
59            // Create a parent span for the entire operation. Includes a random, internal-only,
60            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
61            .instrument(::tracing::debug_span!(
62                "Glue.GetDashboardUrl",
63                "rpc.service" = "Glue",
64                "rpc.method" = "GetDashboardUrl",
65                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
66                "rpc.system" = "aws-api",
67            ))
68            .await
69    }
70
71    pub(crate) fn operation_runtime_plugins(
72        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
73        client_config: &crate::config::Config,
74        config_override: ::std::option::Option<crate::config::Builder>,
75    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
76        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
77
78        if let ::std::option::Option::Some(config_override) = config_override {
79            for plugin in config_override.runtime_plugins.iter().cloned() {
80                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
81            }
82            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
83                config_override,
84                client_config.config.clone(),
85                &client_config.runtime_components,
86            ));
87        }
88        runtime_plugins
89    }
90}
91/// Per-operation error registry. Contains an entry for every modeled
92/// error this operation can throw.
93///
94/// Used by the schema-serde error path as the operation-scoped lookup
95/// for registry-backed error reification: an error code that does not
96/// match one of the operation's modeled errors directly is resolved
97/// against this registry first, then widened to the service-wide error
98/// registry.
99pub(crate) mod error_registry {
100    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
101        ::aws_smithy_schema::registry::TypeRegistry::builder()
102                            .insert_error_shape(
103                        crate::types::error::AccessDeniedException::SCHEMA,
104                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
105                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AccessDeniedException::deserialize(d)?))
106                        },
107                        |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> {
108                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AccessDeniedException::deserialize(d)?))
109                        },
110                    )
111.insert_error_shape(
112                        crate::types::error::EntityNotFoundException::SCHEMA,
113                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
114                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
115                        },
116                        |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> {
117                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
118                        },
119                    )
120.insert_error_shape(
121                        crate::types::error::InternalServiceException::SCHEMA,
122                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
123                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
124                        },
125                        |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> {
126                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
127                        },
128                    )
129.insert_error_shape(
130                        crate::types::error::InvalidInputException::SCHEMA,
131                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
132                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
133                        },
134                        |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> {
135                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
136                        },
137                    )
138.insert_error_shape(
139                        crate::types::error::OperationNotSupportedException::SCHEMA,
140                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
141                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationNotSupportedException::deserialize(d)?))
142                        },
143                        |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> {
144                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationNotSupportedException::deserialize(d)?))
145                        },
146                    )
147                            .build()
148    });
149}
150impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetDashboardUrl {
151    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
152        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetDashboardUrl");
153
154        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
155            GetDashboardUrlRequestSerializer,
156        ));
157        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
158            GetDashboardUrlResponseDeserializer,
159        ));
160
161        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
162            crate::config::auth::Params::builder()
163                .operation_name("GetDashboardUrl")
164                .build()
165                .expect("required fields set"),
166        ));
167
168        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
169        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("GetDashboardUrl", "Glue"));
170        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
171        signing_options.double_uri_encode = true;
172        signing_options.content_sha256_header = false;
173        signing_options.normalize_uri_path = true;
174        signing_options.payload_override = None;
175
176        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
177            signing_options,
178            ..::std::default::Default::default()
179        });
180
181        ::std::option::Option::Some(cfg.freeze())
182    }
183
184    fn runtime_components(
185        &self,
186        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
187    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
188        #[allow(unused_mut)]
189        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetDashboardUrl")
190            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
191                GetDashboardUrlTelemetryInputCaptureInterceptor,
192            ))
193            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
194                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
195            ))
196            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
197                GetDashboardUrlEndpointParamsInterceptor,
198            ))
199            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
200                crate::operation::get_dashboard_url::GetDashboardUrlError,
201            >::new())
202            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
203                crate::operation::get_dashboard_url::GetDashboardUrlError,
204            >::new())
205            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
206                crate::operation::get_dashboard_url::GetDashboardUrlError,
207            >::new())
208            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
209                crate::operation::get_dashboard_url::GetDashboardUrlError,
210            >::new());
211
212        ::std::borrow::Cow::Owned(rcb)
213    }
214}
215
216#[derive(Debug)]
217struct GetDashboardUrlTelemetryInputCaptureInterceptor;
218
219#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
220impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetDashboardUrlTelemetryInputCaptureInterceptor {
221    fn name(&self) -> &'static str {
222        "GetDashboardUrlTelemetryInputCaptureInterceptor"
223    }
224
225    fn read_before_execution(
226        &self,
227        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
228            '_,
229            ::aws_smithy_runtime_api::client::interceptors::context::Input,
230            ::aws_smithy_runtime_api::client::interceptors::context::Output,
231            ::aws_smithy_runtime_api::client::interceptors::context::Error,
232        >,
233        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
234    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
235        // Nothing to do unless the customer opted in by naming members to record.
236        let ::std::option::Option::Some(requested) = cfg
237            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
238            .filter(|r| !r.is_empty())
239        else {
240            return ::std::result::Result::Ok(());
241        };
242
243        let ::std::option::Option::Some(input) = context.input().downcast_ref::<GetDashboardUrlInput>() else {
244            // A mismatched input is not this interceptor's concern; skip quietly.
245            return ::std::result::Result::Ok(());
246        };
247
248        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
249        if requested.should_capture("ResourceId") {
250            if let ::std::option::Option::Some(value) = input.resource_id.as_deref() {
251                captured.insert("ResourceId", value);
252            }
253        }
254        if requested.should_capture("RequestOrigin") {
255            if let ::std::option::Option::Some(value) = input.request_origin.as_deref() {
256                captured.insert("RequestOrigin", value);
257            }
258        }
259
260        cfg.interceptor_state().store_put(captured);
261        ::std::result::Result::Ok(())
262    }
263}
264#[derive(Debug)]
265struct GetDashboardUrlResponseDeserializer;
266impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetDashboardUrlResponseDeserializer {
267    fn deserialize_nonstreaming_with_config(
268        &self,
269        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
270        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
271    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
272        let (success, status) = (response.status().is_success(), response.status().as_u16());
273        // Load body and headers BEFORE BeforeParseResponse so customizations
274        // (e.g., S3's `body_is_error` check that detects errors returned with
275        // HTTP 200) can inspect them. The legacy non-streaming path also
276        // loads `body` before firing this hook.
277        #[allow(unused_variables)]
278        let body = response.body().bytes().expect("body loaded");
279        let headers = response.headers();
280        #[allow(unused_mut)]
281        let mut force_error = false;
282        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
283        if !success && status != 200 || force_error {
284            let protocol = _cfg
285                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
286                .expect("a SharedClientProtocol is required");
287            #[allow(unused_mut)]
288            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
289                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
290            })?;
291            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
292            let generic = generic_builder.build();
293            let error_code = match generic.code() {
294                ::std::option::Option::Some(code) => code,
295                ::std::option::Option::None => {
296                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
297                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::get_dashboard_url::GetDashboardUrlError::unhandled(
298                            generic,
299                        )),
300                    ))
301                }
302            };
303            let _error_message = generic.message().map(|msg| msg.to_owned());
304            let err = match error_code {
305                "AccessDeniedException" => crate::operation::get_dashboard_url::GetDashboardUrlError::AccessDeniedException({
306                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
307                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
308                            e,
309                        ))
310                    })?;
311                    let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
312                    tmp.deserialize_members(&mut *deser).map_err(|e| {
313                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
314                            e,
315                        ))
316                    })?;
317                    if tmp.message.is_none() {
318                        tmp.message = _error_message;
319                    }
320                    let tmp = tmp.meta(generic);
321                    tmp.build()
322                }),
323                "EntityNotFoundException" => crate::operation::get_dashboard_url::GetDashboardUrlError::EntityNotFoundException({
324                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
325                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
326                            e,
327                        ))
328                    })?;
329                    let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
330                    tmp.deserialize_members(&mut *deser).map_err(|e| {
331                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
332                            e,
333                        ))
334                    })?;
335                    if tmp.message.is_none() {
336                        tmp.message = _error_message;
337                    }
338                    let tmp = tmp.meta(generic);
339                    tmp.build()
340                }),
341                "InternalServiceException" => crate::operation::get_dashboard_url::GetDashboardUrlError::InternalServiceException({
342                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
343                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
344                            e,
345                        ))
346                    })?;
347                    let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
348                    tmp.deserialize_members(&mut *deser).map_err(|e| {
349                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
350                            e,
351                        ))
352                    })?;
353                    if tmp.message.is_none() {
354                        tmp.message = _error_message;
355                    }
356                    let tmp = tmp.meta(generic);
357                    tmp.build()
358                }),
359                "InvalidInputException" => crate::operation::get_dashboard_url::GetDashboardUrlError::InvalidInputException({
360                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
361                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
362                            e,
363                        ))
364                    })?;
365                    let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
366                    tmp.deserialize_members(&mut *deser).map_err(|e| {
367                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
368                            e,
369                        ))
370                    })?;
371                    if tmp.message.is_none() {
372                        tmp.message = _error_message;
373                    }
374                    let tmp = tmp.meta(generic);
375                    tmp.build()
376                }),
377                "OperationNotSupportedException" => crate::operation::get_dashboard_url::GetDashboardUrlError::OperationNotSupportedException({
378                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
379                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
380                            e,
381                        ))
382                    })?;
383                    let mut tmp = <crate::types::error::builders::OperationNotSupportedExceptionBuilder>::default();
384                    tmp.deserialize_members(&mut *deser).map_err(|e| {
385                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
386                            e,
387                        ))
388                    })?;
389                    if tmp.message.is_none() {
390                        tmp.message = _error_message;
391                    }
392                    let tmp = tmp.meta(generic);
393                    tmp.build()
394                }),
395                _ => {
396                    // Registry-backed, operation-scoped reification of an error whose
397                    // code this operation does not model directly: the operation's own
398                    // error registry is consulted first, then the lookup widens to the
399                    // service-wide error registry. On a hit, the reified error is attached
400                    // as the source of the returned unhandled error while its metadata
401                    // (code, message, request id) is preserved; on a miss the generic
402                    // error is returned unchanged.
403                    match protocol
404                        .deserialize_error_response(response, _cfg)
405                        .ok()
406                        .and_then(|mut deser| {
407                            ::aws_smithy_schema::registry::reify_error(
408                                crate::operation::get_dashboard_url::error_registry::REGISTRY
409                                    .or(&crate::error_type_registry::REGISTRY),
410                                error_code,
411                                &mut *deser,
412                            )
413                        }) {
414                        ::std::option::Option::Some(source) => <crate::operation::get_dashboard_url::GetDashboardUrlError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
415                        ::std::option::Option::None => crate::operation::get_dashboard_url::GetDashboardUrlError::generic(generic),
416                    }
417                }
418            };
419            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
420                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
421            ))
422        } else {
423            let protocol = _cfg
424                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
425                .expect("a SharedClientProtocol is required");
426            let mut deser = protocol
427                .deserialize_response(response, GetDashboardUrl::OUTPUT_SCHEMA, _cfg)
428                .map_err(|e| {
429                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
430                })?;
431            // `headers` is already in scope from the top of the function; alias it as
432            // `_response_headers` so MutateOutput customizations have a stable name to
433            // read from.
434            let _response_headers = headers;
435            // `mut` is required because `deserialize_members` and the `MutateOutput`
436            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
437            // empty output has no members and no customizations to run.
438            #[allow(unused_mut)]
439            let mut output = <crate::operation::get_dashboard_url::builders::GetDashboardUrlOutputBuilder>::default();
440            output.deserialize_members(&mut *deser).map_err(|e| {
441                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
442            })?;
443            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
444            let output = crate::serde_util::get_dashboard_url_output_output_correct_errors(output)
445                .build()
446                .map_err(|e| {
447                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
448                })?;
449            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
450        }
451    }
452}
453#[derive(Debug)]
454struct GetDashboardUrlRequestSerializer;
455impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetDashboardUrlRequestSerializer {
456    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
457    fn serialize_input(
458        &self,
459        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
460        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
461    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
462        let input = input
463            .downcast::<crate::operation::get_dashboard_url::GetDashboardUrlInput>()
464            .expect("correct type");
465
466        let protocol = _cfg
467            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
468            .expect("a SharedClientProtocol is required");
469        let mut request = protocol
470            .serialize_request(&input, GetDashboardUrl::INPUT_SCHEMA, "/", _cfg)
471            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
472
473        return ::std::result::Result::Ok(request);
474    }
475}
476#[derive(Debug)]
477struct GetDashboardUrlEndpointParamsInterceptor;
478
479#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
480impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetDashboardUrlEndpointParamsInterceptor {
481    fn name(&self) -> &'static str {
482        "GetDashboardUrlEndpointParamsInterceptor"
483    }
484
485    fn read_before_execution(
486        &self,
487        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
488            '_,
489            ::aws_smithy_runtime_api::client::interceptors::context::Input,
490            ::aws_smithy_runtime_api::client::interceptors::context::Output,
491            ::aws_smithy_runtime_api::client::interceptors::context::Error,
492        >,
493        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
494    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
495        let _input = context
496            .input()
497            .downcast_ref::<GetDashboardUrlInput>()
498            .ok_or("failed to downcast to GetDashboardUrlInput")?;
499
500        let params = crate::config::endpoint::Params::builder()
501            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
502            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
503            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
504            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
505            .build()
506            .map_err(|err| {
507                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
508            })?;
509        cfg.interceptor_state()
510            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
511        ::std::result::Result::Ok(())
512    }
513}
514
515// The get_* functions below are generated from JMESPath expressions in the
516// operationContextParams trait. They target the operation's input shape.
517
518/// Error type for the `GetDashboardUrlError` operation.
519#[non_exhaustive]
520#[derive(::std::fmt::Debug)]
521pub enum GetDashboardUrlError {
522    /// <p>Access to a resource was denied.</p>
523    AccessDeniedException(crate::types::error::AccessDeniedException),
524    /// <p>A specified entity does not exist</p>
525    EntityNotFoundException(crate::types::error::EntityNotFoundException),
526    /// <p>An internal service error occurred.</p>
527    InternalServiceException(crate::types::error::InternalServiceException),
528    /// <p>The input provided was not valid.</p>
529    InvalidInputException(crate::types::error::InvalidInputException),
530    /// <p>The operation is not available in the region.</p>
531    OperationNotSupportedException(crate::types::error::OperationNotSupportedException),
532    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
533    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
534    variable wildcard pattern and check `.code()`:
535     \
536    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
537     \
538    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetDashboardUrlError) for what information is available for the error.")]
539    Unhandled(crate::error::sealed_unhandled::Unhandled),
540}
541impl GetDashboardUrlError {
542    /// Creates the `GetDashboardUrlError::Unhandled` variant from any error type.
543    pub fn unhandled(
544        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
545    ) -> Self {
546        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
547            source: err.into(),
548            meta: ::std::default::Default::default(),
549        })
550    }
551
552    /// Creates the `GetDashboardUrlError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
553    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
554        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
555            source: err.clone().into(),
556            meta: err,
557        })
558    }
559    ///
560    /// Returns error metadata, which includes the error code, message,
561    /// request ID, and potentially additional information.
562    ///
563    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
564        match self {
565            Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
566            Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
567            Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
568            Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
569            Self::OperationNotSupportedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
570            Self::Unhandled(e) => &e.meta,
571        }
572    }
573    /// Returns `true` if the error kind is `GetDashboardUrlError::AccessDeniedException`.
574    pub fn is_access_denied_exception(&self) -> bool {
575        matches!(self, Self::AccessDeniedException(_))
576    }
577    /// Returns `true` if the error kind is `GetDashboardUrlError::EntityNotFoundException`.
578    pub fn is_entity_not_found_exception(&self) -> bool {
579        matches!(self, Self::EntityNotFoundException(_))
580    }
581    /// Returns `true` if the error kind is `GetDashboardUrlError::InternalServiceException`.
582    pub fn is_internal_service_exception(&self) -> bool {
583        matches!(self, Self::InternalServiceException(_))
584    }
585    /// Returns `true` if the error kind is `GetDashboardUrlError::InvalidInputException`.
586    pub fn is_invalid_input_exception(&self) -> bool {
587        matches!(self, Self::InvalidInputException(_))
588    }
589    /// Returns `true` if the error kind is `GetDashboardUrlError::OperationNotSupportedException`.
590    pub fn is_operation_not_supported_exception(&self) -> bool {
591        matches!(self, Self::OperationNotSupportedException(_))
592    }
593}
594impl ::std::error::Error for GetDashboardUrlError {
595    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
596        match self {
597            Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
598            Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
599            Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
600            Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
601            Self::OperationNotSupportedException(_inner) => ::std::option::Option::Some(_inner),
602            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
603        }
604    }
605}
606impl ::std::fmt::Display for GetDashboardUrlError {
607    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
608        match self {
609            Self::AccessDeniedException(_inner) => _inner.fmt(f),
610            Self::EntityNotFoundException(_inner) => _inner.fmt(f),
611            Self::InternalServiceException(_inner) => _inner.fmt(f),
612            Self::InvalidInputException(_inner) => _inner.fmt(f),
613            Self::OperationNotSupportedException(_inner) => _inner.fmt(f),
614            Self::Unhandled(_inner) => {
615                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
616                    write!(f, "unhandled error ({code})")
617                } else {
618                    f.write_str("unhandled error")
619                }
620            }
621        }
622    }
623}
624impl ::aws_smithy_types::retry::ProvideErrorKind for GetDashboardUrlError {
625    fn code(&self) -> ::std::option::Option<&str> {
626        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
627    }
628    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
629        ::std::option::Option::None
630    }
631}
632impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetDashboardUrlError {
633    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
634        match self {
635            Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
636            Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
637            Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
638            Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
639            Self::OperationNotSupportedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
640            Self::Unhandled(_inner) => &_inner.meta,
641        }
642    }
643}
644impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetDashboardUrlError {
645    fn create_unhandled_error(
646        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
647        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
648    ) -> Self {
649        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
650            source,
651            meta: meta.unwrap_or_default(),
652        })
653    }
654}
655impl ::aws_types::request_id::RequestId for crate::operation::get_dashboard_url::GetDashboardUrlError {
656    fn request_id(&self) -> Option<&str> {
657        self.meta().request_id()
658    }
659}
660
661pub use crate::operation::get_dashboard_url::_get_dashboard_url_input::GetDashboardUrlInput;
662
663pub use crate::operation::get_dashboard_url::_get_dashboard_url_output::GetDashboardUrlOutput;
664
665mod _get_dashboard_url_input;
666
667mod _get_dashboard_url_output;
668
669/// Builders
670pub mod builders;