1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct GetGlueIdentityCenterConfiguration;
6impl GetGlueIdentityCenterConfiguration {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
13 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationInput::SCHEMA;
14 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
16 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationOutput::SCHEMA;
17 pub(crate) async fn orchestrate(
18 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
19 input: crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationInput,
20 ) -> ::std::result::Result<
21 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationOutput,
22 ::aws_smithy_runtime_api::client::result::SdkError<
23 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError,
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::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError>()
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::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationOutput>()
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::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationInput,
50 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
51 ) -> ::std::result::Result<
52 ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
53 ::aws_smithy_runtime_api::client::result::SdkError<
54 ::aws_smithy_runtime_api::client::interceptors::context::Error,
55 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
56 >,
57 > {
58 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
59 use ::tracing::Instrument;
60 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
61 "Glue",
62 "GetGlueIdentityCenterConfiguration",
63 input,
64 runtime_plugins,
65 stop_point,
66 )
67 .instrument(::tracing::debug_span!(
70 "Glue.GetGlueIdentityCenterConfiguration",
71 "rpc.service" = "Glue",
72 "rpc.method" = "GetGlueIdentityCenterConfiguration",
73 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
74 "rpc.system" = "aws-api",
75 ))
76 .await
77 }
78
79 pub(crate) fn operation_runtime_plugins(
80 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
81 client_config: &crate::config::Config,
82 config_override: ::std::option::Option<crate::config::Builder>,
83 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
84 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
85
86 if let ::std::option::Option::Some(config_override) = config_override {
87 for plugin in config_override.runtime_plugins.iter().cloned() {
88 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
89 }
90 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
91 config_override,
92 client_config.config.clone(),
93 &client_config.runtime_components,
94 ));
95 }
96 runtime_plugins
97 }
98}
99pub(crate) mod error_registry {
108 pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
109 ::aws_smithy_schema::registry::TypeRegistry::builder()
110 .insert_error_shape(
111 crate::types::error::AccessDeniedException::SCHEMA,
112 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
113 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AccessDeniedException::deserialize(d)?))
114 },
115 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
116 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AccessDeniedException::deserialize(d)?))
117 },
118 )
119.insert_error_shape(
120 crate::types::error::ConcurrentModificationException::SCHEMA,
121 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
122 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ConcurrentModificationException::deserialize(d)?))
123 },
124 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
125 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ConcurrentModificationException::deserialize(d)?))
126 },
127 )
128.insert_error_shape(
129 crate::types::error::EntityNotFoundException::SCHEMA,
130 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
131 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
132 },
133 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
134 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
135 },
136 )
137.insert_error_shape(
138 crate::types::error::InternalServiceException::SCHEMA,
139 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
140 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
141 },
142 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
143 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
144 },
145 )
146.insert_error_shape(
147 crate::types::error::InvalidInputException::SCHEMA,
148 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
149 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
150 },
151 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
152 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
153 },
154 )
155.insert_error_shape(
156 crate::types::error::OperationTimeoutException::SCHEMA,
157 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
158 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
159 },
160 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
161 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
162 },
163 )
164 .build()
165 });
166}
167impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetGlueIdentityCenterConfiguration {
168 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
169 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetGlueIdentityCenterConfiguration");
170
171 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
172 GetGlueIdentityCenterConfigurationRequestSerializer,
173 ));
174 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
175 GetGlueIdentityCenterConfigurationResponseDeserializer,
176 ));
177
178 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
179 crate::config::auth::Params::builder()
180 .operation_name("GetGlueIdentityCenterConfiguration")
181 .build()
182 .expect("required fields set"),
183 ));
184
185 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
186 "GetGlueIdentityCenterConfiguration",
187 "Glue",
188 ));
189 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
190 signing_options.double_uri_encode = true;
191 signing_options.content_sha256_header = false;
192 signing_options.normalize_uri_path = true;
193 signing_options.payload_override = None;
194
195 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
196 signing_options,
197 ..::std::default::Default::default()
198 });
199
200 ::std::option::Option::Some(cfg.freeze())
201 }
202
203 fn runtime_components(
204 &self,
205 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
206 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
207 #[allow(unused_mut)]
208 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetGlueIdentityCenterConfiguration")
209 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
210 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
211 ))
212 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
213 GetGlueIdentityCenterConfigurationEndpointParamsInterceptor,
214 ))
215 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
216 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError,
217 >::new())
218 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
219 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError,
220 >::new())
221 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
222 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError,
223 >::new())
224 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
225 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError,
226 >::new());
227
228 ::std::borrow::Cow::Owned(rcb)
229 }
230}
231
232#[derive(Debug)]
233struct GetGlueIdentityCenterConfigurationResponseDeserializer;
234impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetGlueIdentityCenterConfigurationResponseDeserializer {
235 fn deserialize_nonstreaming_with_config(
236 &self,
237 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
238 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
239 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
240 let (success, status) = (response.status().is_success(), response.status().as_u16());
241 #[allow(unused_variables)]
246 let body = response.body().bytes().expect("body loaded");
247 let headers = response.headers();
248 #[allow(unused_mut)]
249 let mut force_error = false;
250 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
251 if !success && status != 200 || force_error {
252 let protocol = _cfg
253 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
254 .expect("a SharedClientProtocol is required");
255 #[allow(unused_mut)]
256 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
257 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
258 })?;
259 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
260 let generic = generic_builder.build();
261 let error_code = match generic.code() {
262 ::std::option::Option::Some(code) => code,
263 ::std::option::Option::None => {
264 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
265 ::aws_smithy_runtime_api::box_error::BoxError::from(
266 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError::unhandled(generic),
267 ),
268 ))
269 }
270 };
271 let _error_message = generic.message().map(|msg| msg.to_owned());
272 let err = match error_code {
273 "AccessDeniedException" => {
274 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError::AccessDeniedException({
275 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
276 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
277 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
278 )
279 })?;
280 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
281 tmp.deserialize_members(&mut *deser).map_err(|e| {
282 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
283 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
284 )
285 })?;
286 if tmp.message.is_none() {
287 tmp.message = _error_message;
288 }
289 let tmp = tmp.meta(generic);
290 tmp.build()
291 })
292 }
293 "ConcurrentModificationException" => {
294 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError::ConcurrentModificationException(
295 {
296 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
297 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
298 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
299 )
300 })?;
301 let mut tmp = <crate::types::error::builders::ConcurrentModificationExceptionBuilder>::default();
302 tmp.deserialize_members(&mut *deser).map_err(|e| {
303 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
304 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
305 )
306 })?;
307 if tmp.message.is_none() {
308 tmp.message = _error_message;
309 }
310 let tmp = tmp.meta(generic);
311 tmp.build()
312 },
313 )
314 }
315 "EntityNotFoundException" => {
316 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError::EntityNotFoundException({
317 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
318 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
319 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
320 )
321 })?;
322 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
323 tmp.deserialize_members(&mut *deser).map_err(|e| {
324 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
325 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
326 )
327 })?;
328 if tmp.message.is_none() {
329 tmp.message = _error_message;
330 }
331 let tmp = tmp.meta(generic);
332 tmp.build()
333 })
334 }
335 "InternalServiceException" => {
336 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError::InternalServiceException({
337 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
338 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
339 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
340 )
341 })?;
342 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
343 tmp.deserialize_members(&mut *deser).map_err(|e| {
344 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
345 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
346 )
347 })?;
348 if tmp.message.is_none() {
349 tmp.message = _error_message;
350 }
351 let tmp = tmp.meta(generic);
352 tmp.build()
353 })
354 }
355 "InvalidInputException" => {
356 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError::InvalidInputException({
357 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
358 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
359 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
360 )
361 })?;
362 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
363 tmp.deserialize_members(&mut *deser).map_err(|e| {
364 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
365 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
366 )
367 })?;
368 if tmp.message.is_none() {
369 tmp.message = _error_message;
370 }
371 let tmp = tmp.meta(generic);
372 tmp.build()
373 })
374 }
375 "OperationTimeoutException" => {
376 crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError::OperationTimeoutException({
377 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
378 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
379 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
380 )
381 })?;
382 let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
383 tmp.deserialize_members(&mut *deser).map_err(|e| {
384 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
385 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
386 )
387 })?;
388 if tmp.message.is_none() {
389 tmp.message = _error_message;
390 }
391 let tmp = tmp.meta(generic);
392 tmp.build()
393 })
394 }
395 _ => {
396 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_glue_identity_center_configuration::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_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError 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_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError::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, GetGlueIdentityCenterConfiguration::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 let _response_headers = headers;
435 #[allow(unused_mut)]
439 let mut output =
440 <crate::operation::get_glue_identity_center_configuration::builders::GetGlueIdentityCenterConfigurationOutputBuilder>::default();
441 output.deserialize_members(&mut *deser).map_err(|e| {
442 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
443 })?;
444 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
445 let output = output.build();
446 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
447 }
448 }
449}
450#[derive(Debug)]
451struct GetGlueIdentityCenterConfigurationRequestSerializer;
452impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetGlueIdentityCenterConfigurationRequestSerializer {
453 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
454 fn serialize_input(
455 &self,
456 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
457 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
458 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
459 let input = input
460 .downcast::<crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationInput>()
461 .expect("correct type");
462
463 let protocol = _cfg
464 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
465 .expect("a SharedClientProtocol is required");
466 let mut request = protocol
467 .serialize_request(&input, GetGlueIdentityCenterConfiguration::INPUT_SCHEMA, "/", _cfg)
468 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
469
470 return ::std::result::Result::Ok(request);
471 }
472}
473#[derive(Debug)]
474struct GetGlueIdentityCenterConfigurationEndpointParamsInterceptor;
475
476#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
477impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetGlueIdentityCenterConfigurationEndpointParamsInterceptor {
478 fn name(&self) -> &'static str {
479 "GetGlueIdentityCenterConfigurationEndpointParamsInterceptor"
480 }
481
482 fn read_before_execution(
483 &self,
484 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
485 '_,
486 ::aws_smithy_runtime_api::client::interceptors::context::Input,
487 ::aws_smithy_runtime_api::client::interceptors::context::Output,
488 ::aws_smithy_runtime_api::client::interceptors::context::Error,
489 >,
490 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
491 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
492 let _input = context
493 .input()
494 .downcast_ref::<GetGlueIdentityCenterConfigurationInput>()
495 .ok_or("failed to downcast to GetGlueIdentityCenterConfigurationInput")?;
496
497 let params = crate::config::endpoint::Params::builder()
498 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
499 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
500 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
501 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
502 .build()
503 .map_err(|err| {
504 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
505 })?;
506 cfg.interceptor_state()
507 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
508 ::std::result::Result::Ok(())
509 }
510}
511
512#[non_exhaustive]
517#[derive(::std::fmt::Debug)]
518pub enum GetGlueIdentityCenterConfigurationError {
519 AccessDeniedException(crate::types::error::AccessDeniedException),
521 ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
523 EntityNotFoundException(crate::types::error::EntityNotFoundException),
525 InternalServiceException(crate::types::error::InternalServiceException),
527 InvalidInputException(crate::types::error::InvalidInputException),
529 OperationTimeoutException(crate::types::error::OperationTimeoutException),
531 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
533 variable wildcard pattern and check `.code()`:
534 \
535 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
536 \
537 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetGlueIdentityCenterConfigurationError) for what information is available for the error.")]
538 Unhandled(crate::error::sealed_unhandled::Unhandled),
539}
540impl GetGlueIdentityCenterConfigurationError {
541 pub fn unhandled(
543 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
544 ) -> Self {
545 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
546 source: err.into(),
547 meta: ::std::default::Default::default(),
548 })
549 }
550
551 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
553 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
554 source: err.clone().into(),
555 meta: err,
556 })
557 }
558 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
563 match self {
564 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
565 Self::ConcurrentModificationException(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::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
570 Self::Unhandled(e) => &e.meta,
571 }
572 }
573 pub fn is_access_denied_exception(&self) -> bool {
575 matches!(self, Self::AccessDeniedException(_))
576 }
577 pub fn is_concurrent_modification_exception(&self) -> bool {
579 matches!(self, Self::ConcurrentModificationException(_))
580 }
581 pub fn is_entity_not_found_exception(&self) -> bool {
583 matches!(self, Self::EntityNotFoundException(_))
584 }
585 pub fn is_internal_service_exception(&self) -> bool {
587 matches!(self, Self::InternalServiceException(_))
588 }
589 pub fn is_invalid_input_exception(&self) -> bool {
591 matches!(self, Self::InvalidInputException(_))
592 }
593 pub fn is_operation_timeout_exception(&self) -> bool {
595 matches!(self, Self::OperationTimeoutException(_))
596 }
597}
598impl ::std::error::Error for GetGlueIdentityCenterConfigurationError {
599 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
600 match self {
601 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
602 Self::ConcurrentModificationException(_inner) => ::std::option::Option::Some(_inner),
603 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
604 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
605 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
606 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
607 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
608 }
609 }
610}
611impl ::std::fmt::Display for GetGlueIdentityCenterConfigurationError {
612 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
613 match self {
614 Self::AccessDeniedException(_inner) => _inner.fmt(f),
615 Self::ConcurrentModificationException(_inner) => _inner.fmt(f),
616 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
617 Self::InternalServiceException(_inner) => _inner.fmt(f),
618 Self::InvalidInputException(_inner) => _inner.fmt(f),
619 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
620 Self::Unhandled(_inner) => {
621 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
622 write!(f, "unhandled error ({code})")
623 } else {
624 f.write_str("unhandled error")
625 }
626 }
627 }
628 }
629}
630impl ::aws_smithy_types::retry::ProvideErrorKind for GetGlueIdentityCenterConfigurationError {
631 fn code(&self) -> ::std::option::Option<&str> {
632 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
633 }
634 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
635 ::std::option::Option::None
636 }
637}
638impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetGlueIdentityCenterConfigurationError {
639 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
640 match self {
641 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
642 Self::ConcurrentModificationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
643 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
644 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
645 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
646 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
647 Self::Unhandled(_inner) => &_inner.meta,
648 }
649 }
650}
651impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetGlueIdentityCenterConfigurationError {
652 fn create_unhandled_error(
653 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
654 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
655 ) -> Self {
656 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
657 source,
658 meta: meta.unwrap_or_default(),
659 })
660 }
661}
662impl ::aws_types::request_id::RequestId for crate::operation::get_glue_identity_center_configuration::GetGlueIdentityCenterConfigurationError {
663 fn request_id(&self) -> Option<&str> {
664 self.meta().request_id()
665 }
666}
667
668pub use crate::operation::get_glue_identity_center_configuration::_get_glue_identity_center_configuration_input::GetGlueIdentityCenterConfigurationInput;
669
670pub use crate::operation::get_glue_identity_center_configuration::_get_glue_identity_center_configuration_output::GetGlueIdentityCenterConfigurationOutput;
671
672mod _get_glue_identity_center_configuration_input;
673
674mod _get_glue_identity_center_configuration_output;
675
676pub mod builders;