1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct DeleteGlueIdentityCenterConfiguration;
6impl DeleteGlueIdentityCenterConfiguration {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
13 crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationInput::SCHEMA;
14 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
16 crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationOutput::SCHEMA;
17 pub(crate) async fn orchestrate(
18 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
19 input: crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationInput,
20 ) -> ::std::result::Result<
21 crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationOutput,
22 ::aws_smithy_runtime_api::client::result::SdkError<
23 crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError,
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::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError>()
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::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationOutput>()
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::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationInput,
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 "DeleteGlueIdentityCenterConfiguration",
63 input,
64 runtime_plugins,
65 stop_point,
66 )
67 .instrument(::tracing::debug_span!(
70 "Glue.DeleteGlueIdentityCenterConfiguration",
71 "rpc.service" = "Glue",
72 "rpc.method" = "DeleteGlueIdentityCenterConfiguration",
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 DeleteGlueIdentityCenterConfiguration {
168 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
169 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DeleteGlueIdentityCenterConfiguration");
170
171 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
172 DeleteGlueIdentityCenterConfigurationRequestSerializer,
173 ));
174 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
175 DeleteGlueIdentityCenterConfigurationResponseDeserializer,
176 ));
177
178 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
179 crate::config::auth::Params::builder()
180 .operation_name("DeleteGlueIdentityCenterConfiguration")
181 .build()
182 .expect("required fields set"),
183 ));
184
185 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
186 "DeleteGlueIdentityCenterConfiguration",
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("DeleteGlueIdentityCenterConfiguration")
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 DeleteGlueIdentityCenterConfigurationEndpointParamsInterceptor,
214 ))
215 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
216 crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError,
217 >::new())
218 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
219 crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError,
220 >::new())
221 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
222 crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError,
223 >::new())
224 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
225 crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError,
226 >::new());
227
228 ::std::borrow::Cow::Owned(rcb)
229 }
230}
231
232#[derive(Debug)]
233struct DeleteGlueIdentityCenterConfigurationResponseDeserializer;
234impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteGlueIdentityCenterConfigurationResponseDeserializer {
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::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError::unhandled(
267 generic,
268 ),
269 ),
270 ))
271 }
272 };
273 let _error_message = generic.message().map(|msg| msg.to_owned());
274 let err = match error_code {
275"AccessDeniedException" => crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError::AccessDeniedException({
276let mut deser = protocol.deserialize_error_response(response, _cfg)
277 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
278 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
279 tmp.deserialize_members(&mut *deser)
280 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
281if tmp.message.is_none() {
282 tmp.message = _error_message;
283 }
284let tmp = tmp.meta(generic);
285tmp.build()
286}),
287"ConcurrentModificationException" => crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError::ConcurrentModificationException({
288let mut deser = protocol.deserialize_error_response(response, _cfg)
289 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
290 let mut tmp = <crate::types::error::builders::ConcurrentModificationExceptionBuilder>::default();
291 tmp.deserialize_members(&mut *deser)
292 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
293if tmp.message.is_none() {
294 tmp.message = _error_message;
295 }
296let tmp = tmp.meta(generic);
297tmp.build()
298}),
299"EntityNotFoundException" => crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError::EntityNotFoundException({
300let mut deser = protocol.deserialize_error_response(response, _cfg)
301 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
302 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
303 tmp.deserialize_members(&mut *deser)
304 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
305if tmp.message.is_none() {
306 tmp.message = _error_message;
307 }
308let tmp = tmp.meta(generic);
309tmp.build()
310}),
311"InternalServiceException" => crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError::InternalServiceException({
312let mut deser = protocol.deserialize_error_response(response, _cfg)
313 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
314 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
315 tmp.deserialize_members(&mut *deser)
316 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
317if tmp.message.is_none() {
318 tmp.message = _error_message;
319 }
320let tmp = tmp.meta(generic);
321tmp.build()
322}),
323"InvalidInputException" => crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError::InvalidInputException({
324let mut deser = protocol.deserialize_error_response(response, _cfg)
325 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
326 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
327 tmp.deserialize_members(&mut *deser)
328 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
329if tmp.message.is_none() {
330 tmp.message = _error_message;
331 }
332let tmp = tmp.meta(generic);
333tmp.build()
334}),
335"OperationTimeoutException" => crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError::OperationTimeoutException({
336let mut deser = protocol.deserialize_error_response(response, _cfg)
337 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
338 let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
339 tmp.deserialize_members(&mut *deser)
340 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
341if tmp.message.is_none() {
342 tmp.message = _error_message;
343 }
344let tmp = tmp.meta(generic);
345tmp.build()
346}),
347_ => {
348 match protocol
356 .deserialize_error_response(response, _cfg)
357 .ok()
358 .and_then(|mut deser| {
359 ::aws_smithy_schema::registry::reify_error(
360 crate::operation::delete_glue_identity_center_configuration::error_registry::REGISTRY
361 .or(&crate::error_type_registry::REGISTRY),
362 error_code,
363 &mut *deser,
364 )
365 }) {
366 ::std::option::Option::Some(source) => <crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
367 ::std::option::Option::None => crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError::generic(generic),
368 }
369 }
370};
371 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
372 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
373 ))
374 } else {
375 let protocol = _cfg
376 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
377 .expect("a SharedClientProtocol is required");
378 let mut deser = protocol
379 .deserialize_response(response, DeleteGlueIdentityCenterConfiguration::OUTPUT_SCHEMA, _cfg)
380 .map_err(|e| {
381 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
382 })?;
383 let _response_headers = headers;
387 #[allow(unused_mut)]
391 let mut output =
392 <crate::operation::delete_glue_identity_center_configuration::builders::DeleteGlueIdentityCenterConfigurationOutputBuilder>::default(
393 );
394 output.deserialize_members(&mut *deser).map_err(|e| {
395 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
396 })?;
397 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
398 let output = output.build();
399 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
400 }
401 }
402}
403#[derive(Debug)]
404struct DeleteGlueIdentityCenterConfigurationRequestSerializer;
405impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteGlueIdentityCenterConfigurationRequestSerializer {
406 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
407 fn serialize_input(
408 &self,
409 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
410 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
411 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
412 let input = input
413 .downcast::<crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationInput>()
414 .expect("correct type");
415
416 let protocol = _cfg
417 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
418 .expect("a SharedClientProtocol is required");
419 let mut request = protocol
420 .serialize_request(&input, DeleteGlueIdentityCenterConfiguration::INPUT_SCHEMA, "/", _cfg)
421 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
422
423 return ::std::result::Result::Ok(request);
424 }
425}
426#[derive(Debug)]
427struct DeleteGlueIdentityCenterConfigurationEndpointParamsInterceptor;
428
429#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
430impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteGlueIdentityCenterConfigurationEndpointParamsInterceptor {
431 fn name(&self) -> &'static str {
432 "DeleteGlueIdentityCenterConfigurationEndpointParamsInterceptor"
433 }
434
435 fn read_before_execution(
436 &self,
437 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
438 '_,
439 ::aws_smithy_runtime_api::client::interceptors::context::Input,
440 ::aws_smithy_runtime_api::client::interceptors::context::Output,
441 ::aws_smithy_runtime_api::client::interceptors::context::Error,
442 >,
443 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
444 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
445 let _input = context
446 .input()
447 .downcast_ref::<DeleteGlueIdentityCenterConfigurationInput>()
448 .ok_or("failed to downcast to DeleteGlueIdentityCenterConfigurationInput")?;
449
450 let params = crate::config::endpoint::Params::builder()
451 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
452 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
453 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
454 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
455 .build()
456 .map_err(|err| {
457 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
458 })?;
459 cfg.interceptor_state()
460 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
461 ::std::result::Result::Ok(())
462 }
463}
464
465#[non_exhaustive]
470#[derive(::std::fmt::Debug)]
471pub enum DeleteGlueIdentityCenterConfigurationError {
472 AccessDeniedException(crate::types::error::AccessDeniedException),
474 ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
476 EntityNotFoundException(crate::types::error::EntityNotFoundException),
478 InternalServiceException(crate::types::error::InternalServiceException),
480 InvalidInputException(crate::types::error::InvalidInputException),
482 OperationTimeoutException(crate::types::error::OperationTimeoutException),
484 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
486 variable wildcard pattern and check `.code()`:
487 \
488 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
489 \
490 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DeleteGlueIdentityCenterConfigurationError) for what information is available for the error.")]
491 Unhandled(crate::error::sealed_unhandled::Unhandled),
492}
493impl DeleteGlueIdentityCenterConfigurationError {
494 pub fn unhandled(
496 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
497 ) -> Self {
498 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
499 source: err.into(),
500 meta: ::std::default::Default::default(),
501 })
502 }
503
504 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
506 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
507 source: err.clone().into(),
508 meta: err,
509 })
510 }
511 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
516 match self {
517 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
518 Self::ConcurrentModificationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
519 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
520 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
521 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
522 Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
523 Self::Unhandled(e) => &e.meta,
524 }
525 }
526 pub fn is_access_denied_exception(&self) -> bool {
528 matches!(self, Self::AccessDeniedException(_))
529 }
530 pub fn is_concurrent_modification_exception(&self) -> bool {
532 matches!(self, Self::ConcurrentModificationException(_))
533 }
534 pub fn is_entity_not_found_exception(&self) -> bool {
536 matches!(self, Self::EntityNotFoundException(_))
537 }
538 pub fn is_internal_service_exception(&self) -> bool {
540 matches!(self, Self::InternalServiceException(_))
541 }
542 pub fn is_invalid_input_exception(&self) -> bool {
544 matches!(self, Self::InvalidInputException(_))
545 }
546 pub fn is_operation_timeout_exception(&self) -> bool {
548 matches!(self, Self::OperationTimeoutException(_))
549 }
550}
551impl ::std::error::Error for DeleteGlueIdentityCenterConfigurationError {
552 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
553 match self {
554 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
555 Self::ConcurrentModificationException(_inner) => ::std::option::Option::Some(_inner),
556 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
557 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
558 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
559 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
560 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
561 }
562 }
563}
564impl ::std::fmt::Display for DeleteGlueIdentityCenterConfigurationError {
565 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
566 match self {
567 Self::AccessDeniedException(_inner) => _inner.fmt(f),
568 Self::ConcurrentModificationException(_inner) => _inner.fmt(f),
569 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
570 Self::InternalServiceException(_inner) => _inner.fmt(f),
571 Self::InvalidInputException(_inner) => _inner.fmt(f),
572 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
573 Self::Unhandled(_inner) => {
574 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
575 write!(f, "unhandled error ({code})")
576 } else {
577 f.write_str("unhandled error")
578 }
579 }
580 }
581 }
582}
583impl ::aws_smithy_types::retry::ProvideErrorKind for DeleteGlueIdentityCenterConfigurationError {
584 fn code(&self) -> ::std::option::Option<&str> {
585 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
586 }
587 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
588 ::std::option::Option::None
589 }
590}
591impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DeleteGlueIdentityCenterConfigurationError {
592 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
593 match self {
594 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
595 Self::ConcurrentModificationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
596 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
597 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
598 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
599 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
600 Self::Unhandled(_inner) => &_inner.meta,
601 }
602 }
603}
604impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DeleteGlueIdentityCenterConfigurationError {
605 fn create_unhandled_error(
606 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
607 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
608 ) -> Self {
609 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
610 source,
611 meta: meta.unwrap_or_default(),
612 })
613 }
614}
615impl ::aws_types::request_id::RequestId for crate::operation::delete_glue_identity_center_configuration::DeleteGlueIdentityCenterConfigurationError {
616 fn request_id(&self) -> Option<&str> {
617 self.meta().request_id()
618 }
619}
620
621pub use crate::operation::delete_glue_identity_center_configuration::_delete_glue_identity_center_configuration_input::DeleteGlueIdentityCenterConfigurationInput;
622
623pub use crate::operation::delete_glue_identity_center_configuration::_delete_glue_identity_center_configuration_output::DeleteGlueIdentityCenterConfigurationOutput;
624
625mod _delete_glue_identity_center_configuration_input;
626
627mod _delete_glue_identity_center_configuration_output;
628
629pub mod builders;