1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct DeleteIntegration;
6impl DeleteIntegration {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::delete_integration::DeleteIntegrationInput::SCHEMA;
13 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::delete_integration::DeleteIntegrationOutput::SCHEMA;
15 pub(crate) async fn orchestrate(
16 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17 input: crate::operation::delete_integration::DeleteIntegrationInput,
18 ) -> ::std::result::Result<
19 crate::operation::delete_integration::DeleteIntegrationOutput,
20 ::aws_smithy_runtime_api::client::result::SdkError<
21 crate::operation::delete_integration::DeleteIntegrationError,
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::delete_integration::DeleteIntegrationError>()
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::delete_integration::DeleteIntegrationOutput>()
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::delete_integration::DeleteIntegrationInput,
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", "DeleteIntegration", input, runtime_plugins, stop_point)
59 .instrument(::tracing::debug_span!(
62 "Glue.DeleteIntegration",
63 "rpc.service" = "Glue",
64 "rpc.method" = "DeleteIntegration",
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}
91pub(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::ConflictException::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::ConflictException::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::ConflictException::deserialize(d)?))
118 },
119 )
120.insert_error_shape(
121 crate::types::error::EntityNotFoundException::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::EntityNotFoundException::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::EntityNotFoundException::deserialize(d)?))
127 },
128 )
129.insert_error_shape(
130 crate::types::error::IntegrationConflictOperationFault::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::IntegrationConflictOperationFault::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::IntegrationConflictOperationFault::deserialize(d)?))
136 },
137 )
138.insert_error_shape(
139 crate::types::error::IntegrationNotFoundFault::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::IntegrationNotFoundFault::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::IntegrationNotFoundFault::deserialize(d)?))
145 },
146 )
147.insert_error_shape(
148 crate::types::error::InternalServerException::SCHEMA,
149 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
150 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerException::deserialize(d)?))
151 },
152 |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> {
153 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerException::deserialize(d)?))
154 },
155 )
156.insert_error_shape(
157 crate::types::error::InternalServiceException::SCHEMA,
158 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
159 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
160 },
161 |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> {
162 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
163 },
164 )
165.insert_error_shape(
166 crate::types::error::InvalidInputException::SCHEMA,
167 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
168 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
169 },
170 |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> {
171 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
172 },
173 )
174.insert_error_shape(
175 crate::types::error::InvalidIntegrationStateFault::SCHEMA,
176 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
177 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidIntegrationStateFault::deserialize(d)?))
178 },
179 |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> {
180 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidIntegrationStateFault::deserialize(d)?))
181 },
182 )
183.insert_error_shape(
184 crate::types::error::InvalidStateException::SCHEMA,
185 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
186 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidStateException::deserialize(d)?))
187 },
188 |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> {
189 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidStateException::deserialize(d)?))
190 },
191 )
192.insert_error_shape(
193 crate::types::error::ValidationException::SCHEMA,
194 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
195 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ValidationException::deserialize(d)?))
196 },
197 |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> {
198 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ValidationException::deserialize(d)?))
199 },
200 )
201 .build()
202 });
203}
204impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DeleteIntegration {
205 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
206 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DeleteIntegration");
207
208 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
209 DeleteIntegrationRequestSerializer,
210 ));
211 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
212 DeleteIntegrationResponseDeserializer,
213 ));
214
215 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
216 crate::config::auth::Params::builder()
217 .operation_name("DeleteIntegration")
218 .build()
219 .expect("required fields set"),
220 ));
221
222 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("DeleteIntegration", "Glue"));
223 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
224 signing_options.double_uri_encode = true;
225 signing_options.content_sha256_header = false;
226 signing_options.normalize_uri_path = true;
227 signing_options.payload_override = None;
228
229 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
230 signing_options,
231 ..::std::default::Default::default()
232 });
233
234 ::std::option::Option::Some(cfg.freeze())
235 }
236
237 fn runtime_components(
238 &self,
239 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
240 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
241 #[allow(unused_mut)]
242 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DeleteIntegration")
243 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
244 DeleteIntegrationTelemetryInputCaptureInterceptor,
245 ))
246 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
247 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
248 ))
249 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
250 DeleteIntegrationEndpointParamsInterceptor,
251 ))
252 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
253 crate::operation::delete_integration::DeleteIntegrationError,
254 >::new())
255 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
256 crate::operation::delete_integration::DeleteIntegrationError,
257 >::new())
258 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
259 crate::operation::delete_integration::DeleteIntegrationError,
260 >::new())
261 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
262 crate::operation::delete_integration::DeleteIntegrationError,
263 >::new());
264
265 ::std::borrow::Cow::Owned(rcb)
266 }
267}
268
269#[derive(Debug)]
270struct DeleteIntegrationTelemetryInputCaptureInterceptor;
271
272#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
273impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteIntegrationTelemetryInputCaptureInterceptor {
274 fn name(&self) -> &'static str {
275 "DeleteIntegrationTelemetryInputCaptureInterceptor"
276 }
277
278 fn read_before_execution(
279 &self,
280 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
281 '_,
282 ::aws_smithy_runtime_api::client::interceptors::context::Input,
283 ::aws_smithy_runtime_api::client::interceptors::context::Output,
284 ::aws_smithy_runtime_api::client::interceptors::context::Error,
285 >,
286 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
287 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
288 let ::std::option::Option::Some(requested) = cfg
290 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
291 .filter(|r| !r.is_empty())
292 else {
293 return ::std::result::Result::Ok(());
294 };
295
296 let ::std::option::Option::Some(input) = context.input().downcast_ref::<DeleteIntegrationInput>() else {
297 return ::std::result::Result::Ok(());
299 };
300
301 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
302 if requested.should_capture("IntegrationIdentifier") {
303 if let ::std::option::Option::Some(value) = input.integration_identifier.as_deref() {
304 captured.insert("IntegrationIdentifier", value);
305 }
306 }
307
308 cfg.interceptor_state().store_put(captured);
309 ::std::result::Result::Ok(())
310 }
311}
312#[derive(Debug)]
313struct DeleteIntegrationResponseDeserializer;
314impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteIntegrationResponseDeserializer {
315 fn deserialize_nonstreaming_with_config(
316 &self,
317 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
318 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
319 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
320 let (success, status) = (response.status().is_success(), response.status().as_u16());
321 #[allow(unused_variables)]
326 let body = response.body().bytes().expect("body loaded");
327 let headers = response.headers();
328 #[allow(unused_mut)]
329 let mut force_error = false;
330 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
331 if !success && status != 200 || force_error {
332 let protocol = _cfg
333 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
334 .expect("a SharedClientProtocol is required");
335 #[allow(unused_mut)]
336 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
337 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
338 })?;
339 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
340 let generic = generic_builder.build();
341 let error_code = match generic.code() {
342 ::std::option::Option::Some(code) => code,
343 ::std::option::Option::None => {
344 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
345 ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::delete_integration::DeleteIntegrationError::unhandled(
346 generic,
347 )),
348 ))
349 }
350 };
351 let _error_message = generic.message().map(|msg| msg.to_owned());
352 let err = match error_code {
353 "AccessDeniedException" => crate::operation::delete_integration::DeleteIntegrationError::AccessDeniedException({
354 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
355 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
356 e,
357 ))
358 })?;
359 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
360 tmp.deserialize_members(&mut *deser).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 if tmp.message.is_none() {
366 tmp.message = _error_message;
367 }
368 let tmp = tmp.meta(generic);
369 tmp.build()
370 }),
371 "ConflictException" => crate::operation::delete_integration::DeleteIntegrationError::ConflictException({
372 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
373 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
374 e,
375 ))
376 })?;
377 let mut tmp = <crate::types::error::builders::ConflictExceptionBuilder>::default();
378 tmp.deserialize_members(&mut *deser).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 if tmp.message.is_none() {
384 tmp.message = _error_message;
385 }
386 let tmp = tmp.meta(generic);
387 tmp.build()
388 }),
389 "EntityNotFoundException" => crate::operation::delete_integration::DeleteIntegrationError::EntityNotFoundException({
390 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
391 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
392 e,
393 ))
394 })?;
395 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
396 tmp.deserialize_members(&mut *deser).map_err(|e| {
397 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
398 e,
399 ))
400 })?;
401 if tmp.message.is_none() {
402 tmp.message = _error_message;
403 }
404 let tmp = tmp.meta(generic);
405 tmp.build()
406 }),
407 "IntegrationConflictOperationFault" => {
408 crate::operation::delete_integration::DeleteIntegrationError::IntegrationConflictOperationFault({
409 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
410 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
411 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
412 )
413 })?;
414 let mut tmp = <crate::types::error::builders::IntegrationConflictOperationFaultBuilder>::default();
415 tmp.deserialize_members(&mut *deser).map_err(|e| {
416 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
417 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
418 )
419 })?;
420 if tmp.message.is_none() {
421 tmp.message = _error_message;
422 }
423 let tmp = tmp.meta(generic);
424 tmp.build()
425 })
426 }
427 "IntegrationNotFoundFault" => crate::operation::delete_integration::DeleteIntegrationError::IntegrationNotFoundFault({
428 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
429 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
430 e,
431 ))
432 })?;
433 let mut tmp = <crate::types::error::builders::IntegrationNotFoundFaultBuilder>::default();
434 tmp.deserialize_members(&mut *deser).map_err(|e| {
435 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
436 e,
437 ))
438 })?;
439 if tmp.message.is_none() {
440 tmp.message = _error_message;
441 }
442 let tmp = tmp.meta(generic);
443 tmp.build()
444 }),
445 "InternalServerException" => crate::operation::delete_integration::DeleteIntegrationError::InternalServerException({
446 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
447 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
448 e,
449 ))
450 })?;
451 let mut tmp = <crate::types::error::builders::InternalServerExceptionBuilder>::default();
452 tmp.deserialize_members(&mut *deser).map_err(|e| {
453 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
454 e,
455 ))
456 })?;
457 if tmp.message.is_none() {
458 tmp.message = _error_message;
459 }
460 let tmp = tmp.meta(generic);
461 tmp.build()
462 }),
463 "InternalServiceException" => crate::operation::delete_integration::DeleteIntegrationError::InternalServiceException({
464 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
465 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
466 e,
467 ))
468 })?;
469 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
470 tmp.deserialize_members(&mut *deser).map_err(|e| {
471 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
472 e,
473 ))
474 })?;
475 if tmp.message.is_none() {
476 tmp.message = _error_message;
477 }
478 let tmp = tmp.meta(generic);
479 tmp.build()
480 }),
481 "InvalidInputException" => crate::operation::delete_integration::DeleteIntegrationError::InvalidInputException({
482 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
483 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
484 e,
485 ))
486 })?;
487 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
488 tmp.deserialize_members(&mut *deser).map_err(|e| {
489 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
490 e,
491 ))
492 })?;
493 if tmp.message.is_none() {
494 tmp.message = _error_message;
495 }
496 let tmp = tmp.meta(generic);
497 tmp.build()
498 }),
499 "InvalidIntegrationStateFault" => crate::operation::delete_integration::DeleteIntegrationError::InvalidIntegrationStateFault({
500 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
501 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
502 e,
503 ))
504 })?;
505 let mut tmp = <crate::types::error::builders::InvalidIntegrationStateFaultBuilder>::default();
506 tmp.deserialize_members(&mut *deser).map_err(|e| {
507 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
508 e,
509 ))
510 })?;
511 if tmp.message.is_none() {
512 tmp.message = _error_message;
513 }
514 let tmp = tmp.meta(generic);
515 tmp.build()
516 }),
517 "InvalidStateException" => crate::operation::delete_integration::DeleteIntegrationError::InvalidStateException({
518 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
519 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
520 e,
521 ))
522 })?;
523 let mut tmp = <crate::types::error::builders::InvalidStateExceptionBuilder>::default();
524 tmp.deserialize_members(&mut *deser).map_err(|e| {
525 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
526 e,
527 ))
528 })?;
529 if tmp.message.is_none() {
530 tmp.message = _error_message;
531 }
532 let tmp = tmp.meta(generic);
533 tmp.build()
534 }),
535 "ValidationException" => crate::operation::delete_integration::DeleteIntegrationError::ValidationException({
536 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
537 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
538 e,
539 ))
540 })?;
541 let mut tmp = <crate::types::error::builders::ValidationExceptionBuilder>::default();
542 tmp.deserialize_members(&mut *deser).map_err(|e| {
543 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
544 e,
545 ))
546 })?;
547 if tmp.message.is_none() {
548 tmp.message = _error_message;
549 }
550 let tmp = tmp.meta(generic);
551 tmp.build()
552 }),
553 _ => {
554 match protocol
562 .deserialize_error_response(response, _cfg)
563 .ok()
564 .and_then(|mut deser| {
565 ::aws_smithy_schema::registry::reify_error(
566 crate::operation::delete_integration::error_registry::REGISTRY
567 .or(&crate::error_type_registry::REGISTRY),
568 error_code,
569 &mut *deser,
570 )
571 }) {
572 ::std::option::Option::Some(source) => <crate::operation::delete_integration::DeleteIntegrationError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
573 ::std::option::Option::None => crate::operation::delete_integration::DeleteIntegrationError::generic(generic),
574 }
575 }
576 };
577 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
578 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
579 ))
580 } else {
581 let protocol = _cfg
582 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
583 .expect("a SharedClientProtocol is required");
584 let mut deser = protocol
585 .deserialize_response(response, DeleteIntegration::OUTPUT_SCHEMA, _cfg)
586 .map_err(|e| {
587 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
588 })?;
589 let _response_headers = headers;
593 #[allow(unused_mut)]
597 let mut output = <crate::operation::delete_integration::builders::DeleteIntegrationOutputBuilder>::default();
598 output.deserialize_members(&mut *deser).map_err(|e| {
599 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
600 })?;
601 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
602 let output = crate::serde_util::delete_integration_output_output_correct_errors(output)
603 .build()
604 .map_err(|e| {
605 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
606 })?;
607 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
608 }
609 }
610}
611#[derive(Debug)]
612struct DeleteIntegrationRequestSerializer;
613impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteIntegrationRequestSerializer {
614 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
615 fn serialize_input(
616 &self,
617 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
618 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
619 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
620 let input = input
621 .downcast::<crate::operation::delete_integration::DeleteIntegrationInput>()
622 .expect("correct type");
623
624 let protocol = _cfg
625 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
626 .expect("a SharedClientProtocol is required");
627 let mut request = protocol
628 .serialize_request(&input, DeleteIntegration::INPUT_SCHEMA, "/", _cfg)
629 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
630
631 return ::std::result::Result::Ok(request);
632 }
633}
634#[derive(Debug)]
635struct DeleteIntegrationEndpointParamsInterceptor;
636
637#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
638impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteIntegrationEndpointParamsInterceptor {
639 fn name(&self) -> &'static str {
640 "DeleteIntegrationEndpointParamsInterceptor"
641 }
642
643 fn read_before_execution(
644 &self,
645 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
646 '_,
647 ::aws_smithy_runtime_api::client::interceptors::context::Input,
648 ::aws_smithy_runtime_api::client::interceptors::context::Output,
649 ::aws_smithy_runtime_api::client::interceptors::context::Error,
650 >,
651 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
652 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
653 let _input = context
654 .input()
655 .downcast_ref::<DeleteIntegrationInput>()
656 .ok_or("failed to downcast to DeleteIntegrationInput")?;
657
658 let params = crate::config::endpoint::Params::builder()
659 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
660 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
661 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
662 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
663 .build()
664 .map_err(|err| {
665 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
666 })?;
667 cfg.interceptor_state()
668 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
669 ::std::result::Result::Ok(())
670 }
671}
672
673#[non_exhaustive]
678#[derive(::std::fmt::Debug)]
679pub enum DeleteIntegrationError {
680 AccessDeniedException(crate::types::error::AccessDeniedException),
682 ConflictException(crate::types::error::ConflictException),
684 EntityNotFoundException(crate::types::error::EntityNotFoundException),
686 IntegrationConflictOperationFault(crate::types::error::IntegrationConflictOperationFault),
688 IntegrationNotFoundFault(crate::types::error::IntegrationNotFoundFault),
690 InternalServerException(crate::types::error::InternalServerException),
692 InternalServiceException(crate::types::error::InternalServiceException),
694 InvalidInputException(crate::types::error::InvalidInputException),
696 InvalidIntegrationStateFault(crate::types::error::InvalidIntegrationStateFault),
698 InvalidStateException(crate::types::error::InvalidStateException),
700 ValidationException(crate::types::error::ValidationException),
702 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
704 variable wildcard pattern and check `.code()`:
705 \
706 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
707 \
708 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DeleteIntegrationError) for what information is available for the error.")]
709 Unhandled(crate::error::sealed_unhandled::Unhandled),
710}
711impl DeleteIntegrationError {
712 pub fn unhandled(
714 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
715 ) -> Self {
716 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
717 source: err.into(),
718 meta: ::std::default::Default::default(),
719 })
720 }
721
722 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
724 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
725 source: err.clone().into(),
726 meta: err,
727 })
728 }
729 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
734 match self {
735 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
736 Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
737 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
738 Self::IntegrationConflictOperationFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
739 Self::IntegrationNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
740 Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
741 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
742 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
743 Self::InvalidIntegrationStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
744 Self::InvalidStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
745 Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
746 Self::Unhandled(e) => &e.meta,
747 }
748 }
749 pub fn is_access_denied_exception(&self) -> bool {
751 matches!(self, Self::AccessDeniedException(_))
752 }
753 pub fn is_conflict_exception(&self) -> bool {
755 matches!(self, Self::ConflictException(_))
756 }
757 pub fn is_entity_not_found_exception(&self) -> bool {
759 matches!(self, Self::EntityNotFoundException(_))
760 }
761 pub fn is_integration_conflict_operation_fault(&self) -> bool {
763 matches!(self, Self::IntegrationConflictOperationFault(_))
764 }
765 pub fn is_integration_not_found_fault(&self) -> bool {
767 matches!(self, Self::IntegrationNotFoundFault(_))
768 }
769 pub fn is_internal_server_exception(&self) -> bool {
771 matches!(self, Self::InternalServerException(_))
772 }
773 pub fn is_internal_service_exception(&self) -> bool {
775 matches!(self, Self::InternalServiceException(_))
776 }
777 pub fn is_invalid_input_exception(&self) -> bool {
779 matches!(self, Self::InvalidInputException(_))
780 }
781 pub fn is_invalid_integration_state_fault(&self) -> bool {
783 matches!(self, Self::InvalidIntegrationStateFault(_))
784 }
785 pub fn is_invalid_state_exception(&self) -> bool {
787 matches!(self, Self::InvalidStateException(_))
788 }
789 pub fn is_validation_exception(&self) -> bool {
791 matches!(self, Self::ValidationException(_))
792 }
793}
794impl ::std::error::Error for DeleteIntegrationError {
795 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
796 match self {
797 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
798 Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
799 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
800 Self::IntegrationConflictOperationFault(_inner) => ::std::option::Option::Some(_inner),
801 Self::IntegrationNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
802 Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
803 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
804 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
805 Self::InvalidIntegrationStateFault(_inner) => ::std::option::Option::Some(_inner),
806 Self::InvalidStateException(_inner) => ::std::option::Option::Some(_inner),
807 Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
808 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
809 }
810 }
811}
812impl ::std::fmt::Display for DeleteIntegrationError {
813 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
814 match self {
815 Self::AccessDeniedException(_inner) => _inner.fmt(f),
816 Self::ConflictException(_inner) => _inner.fmt(f),
817 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
818 Self::IntegrationConflictOperationFault(_inner) => _inner.fmt(f),
819 Self::IntegrationNotFoundFault(_inner) => _inner.fmt(f),
820 Self::InternalServerException(_inner) => _inner.fmt(f),
821 Self::InternalServiceException(_inner) => _inner.fmt(f),
822 Self::InvalidInputException(_inner) => _inner.fmt(f),
823 Self::InvalidIntegrationStateFault(_inner) => _inner.fmt(f),
824 Self::InvalidStateException(_inner) => _inner.fmt(f),
825 Self::ValidationException(_inner) => _inner.fmt(f),
826 Self::Unhandled(_inner) => {
827 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
828 write!(f, "unhandled error ({code})")
829 } else {
830 f.write_str("unhandled error")
831 }
832 }
833 }
834 }
835}
836impl ::aws_smithy_types::retry::ProvideErrorKind for DeleteIntegrationError {
837 fn code(&self) -> ::std::option::Option<&str> {
838 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
839 }
840 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
841 ::std::option::Option::None
842 }
843}
844impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DeleteIntegrationError {
845 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
846 match self {
847 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
848 Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
849 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
850 Self::IntegrationConflictOperationFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
851 Self::IntegrationNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
852 Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
853 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
854 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
855 Self::InvalidIntegrationStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
856 Self::InvalidStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
857 Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
858 Self::Unhandled(_inner) => &_inner.meta,
859 }
860 }
861}
862impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DeleteIntegrationError {
863 fn create_unhandled_error(
864 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
865 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
866 ) -> Self {
867 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
868 source,
869 meta: meta.unwrap_or_default(),
870 })
871 }
872}
873impl ::aws_types::request_id::RequestId for crate::operation::delete_integration::DeleteIntegrationError {
874 fn request_id(&self) -> Option<&str> {
875 self.meta().request_id()
876 }
877}
878
879pub use crate::operation::delete_integration::_delete_integration_input::DeleteIntegrationInput;
880
881pub use crate::operation::delete_integration::_delete_integration_output::DeleteIntegrationOutput;
882
883mod _delete_integration_input;
884
885mod _delete_integration_output;
886
887pub mod builders;