1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct DescribeInboundIntegrations;
6impl DescribeInboundIntegrations {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
13 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsInput::SCHEMA;
14 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
16 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsOutput::SCHEMA;
17 pub(crate) async fn orchestrate(
18 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
19 input: crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsInput,
20 ) -> ::std::result::Result<
21 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsOutput,
22 ::aws_smithy_runtime_api::client::result::SdkError<
23 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError,
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::describe_inbound_integrations::DescribeInboundIntegrationsError>()
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::describe_inbound_integrations::DescribeInboundIntegrationsOutput>()
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::describe_inbound_integrations::DescribeInboundIntegrationsInput,
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("Glue", "DescribeInboundIntegrations", input, runtime_plugins, stop_point)
61 .instrument(::tracing::debug_span!(
64 "Glue.DescribeInboundIntegrations",
65 "rpc.service" = "Glue",
66 "rpc.method" = "DescribeInboundIntegrations",
67 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
68 "rpc.system" = "aws-api",
69 ))
70 .await
71 }
72
73 pub(crate) fn operation_runtime_plugins(
74 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
75 client_config: &crate::config::Config,
76 config_override: ::std::option::Option<crate::config::Builder>,
77 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
78 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
79
80 if let ::std::option::Option::Some(config_override) = config_override {
81 for plugin in config_override.runtime_plugins.iter().cloned() {
82 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
83 }
84 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
85 config_override,
86 client_config.config.clone(),
87 &client_config.runtime_components,
88 ));
89 }
90 runtime_plugins
91 }
92}
93pub(crate) mod error_registry {
102 pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
103 ::aws_smithy_schema::registry::TypeRegistry::builder()
104 .insert_error_shape(
105 crate::types::error::AccessDeniedException::SCHEMA,
106 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
107 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AccessDeniedException::deserialize(d)?))
108 },
109 |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> {
110 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AccessDeniedException::deserialize(d)?))
111 },
112 )
113.insert_error_shape(
114 crate::types::error::EntityNotFoundException::SCHEMA,
115 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
116 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
117 },
118 |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> {
119 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
120 },
121 )
122.insert_error_shape(
123 crate::types::error::IntegrationNotFoundFault::SCHEMA,
124 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
125 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::IntegrationNotFoundFault::deserialize(d)?))
126 },
127 |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> {
128 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::IntegrationNotFoundFault::deserialize(d)?))
129 },
130 )
131.insert_error_shape(
132 crate::types::error::InternalServerException::SCHEMA,
133 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
134 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerException::deserialize(d)?))
135 },
136 |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> {
137 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerException::deserialize(d)?))
138 },
139 )
140.insert_error_shape(
141 crate::types::error::InternalServiceException::SCHEMA,
142 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
143 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
144 },
145 |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> {
146 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
147 },
148 )
149.insert_error_shape(
150 crate::types::error::InvalidInputException::SCHEMA,
151 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
152 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
153 },
154 |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> {
155 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
156 },
157 )
158.insert_error_shape(
159 crate::types::error::OperationNotSupportedException::SCHEMA,
160 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
161 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationNotSupportedException::deserialize(d)?))
162 },
163 |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> {
164 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationNotSupportedException::deserialize(d)?))
165 },
166 )
167.insert_error_shape(
168 crate::types::error::TargetResourceNotFound::SCHEMA,
169 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
170 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::TargetResourceNotFound::deserialize(d)?))
171 },
172 |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> {
173 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::TargetResourceNotFound::deserialize(d)?))
174 },
175 )
176.insert_error_shape(
177 crate::types::error::ValidationException::SCHEMA,
178 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
179 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ValidationException::deserialize(d)?))
180 },
181 |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> {
182 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ValidationException::deserialize(d)?))
183 },
184 )
185 .build()
186 });
187}
188impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DescribeInboundIntegrations {
189 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
190 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DescribeInboundIntegrations");
191
192 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
193 DescribeInboundIntegrationsRequestSerializer,
194 ));
195 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
196 DescribeInboundIntegrationsResponseDeserializer,
197 ));
198
199 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
200 crate::config::auth::Params::builder()
201 .operation_name("DescribeInboundIntegrations")
202 .build()
203 .expect("required fields set"),
204 ));
205
206 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
207 "DescribeInboundIntegrations",
208 "Glue",
209 ));
210 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
211 signing_options.double_uri_encode = true;
212 signing_options.content_sha256_header = false;
213 signing_options.normalize_uri_path = true;
214 signing_options.payload_override = None;
215
216 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
217 signing_options,
218 ..::std::default::Default::default()
219 });
220
221 ::std::option::Option::Some(cfg.freeze())
222 }
223
224 fn runtime_components(
225 &self,
226 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
227 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
228 #[allow(unused_mut)]
229 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DescribeInboundIntegrations")
230 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
231 DescribeInboundIntegrationsTelemetryInputCaptureInterceptor,
232 ))
233 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
234 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
235 ))
236 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
237 DescribeInboundIntegrationsEndpointParamsInterceptor,
238 ))
239 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
240 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError,
241 >::new())
242 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
243 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError,
244 >::new())
245 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
246 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError,
247 >::new())
248 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
249 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError,
250 >::new());
251
252 ::std::borrow::Cow::Owned(rcb)
253 }
254}
255
256#[derive(Debug)]
257struct DescribeInboundIntegrationsTelemetryInputCaptureInterceptor;
258
259#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
260impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeInboundIntegrationsTelemetryInputCaptureInterceptor {
261 fn name(&self) -> &'static str {
262 "DescribeInboundIntegrationsTelemetryInputCaptureInterceptor"
263 }
264
265 fn read_before_execution(
266 &self,
267 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
268 '_,
269 ::aws_smithy_runtime_api::client::interceptors::context::Input,
270 ::aws_smithy_runtime_api::client::interceptors::context::Output,
271 ::aws_smithy_runtime_api::client::interceptors::context::Error,
272 >,
273 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
274 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
275 let ::std::option::Option::Some(requested) = cfg
277 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
278 .filter(|r| !r.is_empty())
279 else {
280 return ::std::result::Result::Ok(());
281 };
282
283 let ::std::option::Option::Some(input) = context.input().downcast_ref::<DescribeInboundIntegrationsInput>() else {
284 return ::std::result::Result::Ok(());
286 };
287
288 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
289 if requested.should_capture("IntegrationArn") {
290 if let ::std::option::Option::Some(value) = input.integration_arn.as_deref() {
291 captured.insert("IntegrationArn", value);
292 }
293 }
294 if requested.should_capture("Marker") {
295 if let ::std::option::Option::Some(value) = input.marker.as_deref() {
296 captured.insert("Marker", value);
297 }
298 }
299 if requested.should_capture("TargetArn") {
300 if let ::std::option::Option::Some(value) = input.target_arn.as_deref() {
301 captured.insert("TargetArn", value);
302 }
303 }
304
305 cfg.interceptor_state().store_put(captured);
306 ::std::result::Result::Ok(())
307 }
308}
309#[derive(Debug)]
310struct DescribeInboundIntegrationsResponseDeserializer;
311impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeInboundIntegrationsResponseDeserializer {
312 fn deserialize_nonstreaming_with_config(
313 &self,
314 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
315 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
316 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
317 let (success, status) = (response.status().is_success(), response.status().as_u16());
318 #[allow(unused_variables)]
323 let body = response.body().bytes().expect("body loaded");
324 let headers = response.headers();
325 #[allow(unused_mut)]
326 let mut force_error = false;
327 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
328 if !success && status != 200 || force_error {
329 let protocol = _cfg
330 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
331 .expect("a SharedClientProtocol is required");
332 #[allow(unused_mut)]
333 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
334 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
335 })?;
336 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
337 let generic = generic_builder.build();
338 let error_code = match generic.code() {
339 ::std::option::Option::Some(code) => code,
340 ::std::option::Option::None => {
341 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
342 ::aws_smithy_runtime_api::box_error::BoxError::from(
343 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::unhandled(generic),
344 ),
345 ))
346 }
347 };
348 let _error_message = generic.message().map(|msg| msg.to_owned());
349 let err = match error_code {
350 "AccessDeniedException" => {
351 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::AccessDeniedException({
352 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
353 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
354 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
355 )
356 })?;
357 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
358 tmp.deserialize_members(&mut *deser).map_err(|e| {
359 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
360 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
361 )
362 })?;
363 if tmp.message.is_none() {
364 tmp.message = _error_message;
365 }
366 let tmp = tmp.meta(generic);
367 tmp.build()
368 })
369 }
370 "EntityNotFoundException" => {
371 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::EntityNotFoundException({
372 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
373 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
374 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
375 )
376 })?;
377 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
378 tmp.deserialize_members(&mut *deser).map_err(|e| {
379 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
380 ::aws_smithy_runtime_api::box_error::BoxError::from(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 }
390 "IntegrationNotFoundFault" => {
391 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::IntegrationNotFoundFault({
392 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
393 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
394 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
395 )
396 })?;
397 let mut tmp = <crate::types::error::builders::IntegrationNotFoundFaultBuilder>::default();
398 tmp.deserialize_members(&mut *deser).map_err(|e| {
399 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
400 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
401 )
402 })?;
403 if tmp.message.is_none() {
404 tmp.message = _error_message;
405 }
406 let tmp = tmp.meta(generic);
407 tmp.build()
408 })
409 }
410 "InternalServerException" => {
411 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::InternalServerException({
412 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
413 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
414 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
415 )
416 })?;
417 let mut tmp = <crate::types::error::builders::InternalServerExceptionBuilder>::default();
418 tmp.deserialize_members(&mut *deser).map_err(|e| {
419 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
420 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
421 )
422 })?;
423 if tmp.message.is_none() {
424 tmp.message = _error_message;
425 }
426 let tmp = tmp.meta(generic);
427 tmp.build()
428 })
429 }
430 "InternalServiceException" => {
431 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::InternalServiceException({
432 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
433 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
434 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
435 )
436 })?;
437 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
438 tmp.deserialize_members(&mut *deser).map_err(|e| {
439 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
440 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
441 )
442 })?;
443 if tmp.message.is_none() {
444 tmp.message = _error_message;
445 }
446 let tmp = tmp.meta(generic);
447 tmp.build()
448 })
449 }
450 "InvalidInputException" => {
451 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::InvalidInputException({
452 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
453 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
454 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
455 )
456 })?;
457 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
458 tmp.deserialize_members(&mut *deser).map_err(|e| {
459 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
460 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
461 )
462 })?;
463 if tmp.message.is_none() {
464 tmp.message = _error_message;
465 }
466 let tmp = tmp.meta(generic);
467 tmp.build()
468 })
469 }
470 "OperationNotSupportedException" => {
471 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::OperationNotSupportedException({
472 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
473 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
474 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
475 )
476 })?;
477 let mut tmp = <crate::types::error::builders::OperationNotSupportedExceptionBuilder>::default();
478 tmp.deserialize_members(&mut *deser).map_err(|e| {
479 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
480 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
481 )
482 })?;
483 if tmp.message.is_none() {
484 tmp.message = _error_message;
485 }
486 let tmp = tmp.meta(generic);
487 tmp.build()
488 })
489 }
490 "TargetResourceNotFound" => {
491 crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::TargetResourceNotFound({
492 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
493 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
494 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
495 )
496 })?;
497 let mut tmp = <crate::types::error::builders::TargetResourceNotFoundBuilder>::default();
498 tmp.deserialize_members(&mut *deser).map_err(|e| {
499 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
500 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
501 )
502 })?;
503 if tmp.message.is_none() {
504 tmp.message = _error_message;
505 }
506 let tmp = tmp.meta(generic);
507 tmp.build()
508 })
509 }
510 "ValidationException" => crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::ValidationException({
511 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
512 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
513 e,
514 ))
515 })?;
516 let mut tmp = <crate::types::error::builders::ValidationExceptionBuilder>::default();
517 tmp.deserialize_members(&mut *deser).map_err(|e| {
518 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
519 e,
520 ))
521 })?;
522 if tmp.message.is_none() {
523 tmp.message = _error_message;
524 }
525 let tmp = tmp.meta(generic);
526 tmp.build()
527 }),
528 _ => {
529 match protocol
537 .deserialize_error_response(response, _cfg)
538 .ok()
539 .and_then(|mut deser| {
540 ::aws_smithy_schema::registry::reify_error(
541 crate::operation::describe_inbound_integrations::error_registry::REGISTRY
542 .or(&crate::error_type_registry::REGISTRY),
543 error_code,
544 &mut *deser,
545 )
546 }) {
547 ::std::option::Option::Some(source) => <crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
548 ::std::option::Option::None => crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError::generic(generic),
549 }
550 }
551 };
552 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
553 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
554 ))
555 } else {
556 let protocol = _cfg
557 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
558 .expect("a SharedClientProtocol is required");
559 let mut deser = protocol
560 .deserialize_response(response, DescribeInboundIntegrations::OUTPUT_SCHEMA, _cfg)
561 .map_err(|e| {
562 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
563 })?;
564 let _response_headers = headers;
568 #[allow(unused_mut)]
572 let mut output = <crate::operation::describe_inbound_integrations::builders::DescribeInboundIntegrationsOutputBuilder>::default();
573 output.deserialize_members(&mut *deser).map_err(|e| {
574 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
575 })?;
576 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
577 let output = output.build();
578 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
579 }
580 }
581}
582#[derive(Debug)]
583struct DescribeInboundIntegrationsRequestSerializer;
584impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeInboundIntegrationsRequestSerializer {
585 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
586 fn serialize_input(
587 &self,
588 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
589 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
590 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
591 let input = input
592 .downcast::<crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsInput>()
593 .expect("correct type");
594
595 let protocol = _cfg
596 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
597 .expect("a SharedClientProtocol is required");
598 let mut request = protocol
599 .serialize_request(&input, DescribeInboundIntegrations::INPUT_SCHEMA, "/", _cfg)
600 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
601
602 return ::std::result::Result::Ok(request);
603 }
604}
605#[derive(Debug)]
606struct DescribeInboundIntegrationsEndpointParamsInterceptor;
607
608#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
609impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeInboundIntegrationsEndpointParamsInterceptor {
610 fn name(&self) -> &'static str {
611 "DescribeInboundIntegrationsEndpointParamsInterceptor"
612 }
613
614 fn read_before_execution(
615 &self,
616 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
617 '_,
618 ::aws_smithy_runtime_api::client::interceptors::context::Input,
619 ::aws_smithy_runtime_api::client::interceptors::context::Output,
620 ::aws_smithy_runtime_api::client::interceptors::context::Error,
621 >,
622 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
623 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
624 let _input = context
625 .input()
626 .downcast_ref::<DescribeInboundIntegrationsInput>()
627 .ok_or("failed to downcast to DescribeInboundIntegrationsInput")?;
628
629 let params = crate::config::endpoint::Params::builder()
630 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
631 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
632 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
633 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
634 .build()
635 .map_err(|err| {
636 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
637 })?;
638 cfg.interceptor_state()
639 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
640 ::std::result::Result::Ok(())
641 }
642}
643
644#[non_exhaustive]
649#[derive(::std::fmt::Debug)]
650pub enum DescribeInboundIntegrationsError {
651 AccessDeniedException(crate::types::error::AccessDeniedException),
653 EntityNotFoundException(crate::types::error::EntityNotFoundException),
655 IntegrationNotFoundFault(crate::types::error::IntegrationNotFoundFault),
657 InternalServerException(crate::types::error::InternalServerException),
659 InternalServiceException(crate::types::error::InternalServiceException),
661 InvalidInputException(crate::types::error::InvalidInputException),
663 OperationNotSupportedException(crate::types::error::OperationNotSupportedException),
665 TargetResourceNotFound(crate::types::error::TargetResourceNotFound),
667 ValidationException(crate::types::error::ValidationException),
669 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
671 variable wildcard pattern and check `.code()`:
672 \
673 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
674 \
675 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DescribeInboundIntegrationsError) for what information is available for the error.")]
676 Unhandled(crate::error::sealed_unhandled::Unhandled),
677}
678impl DescribeInboundIntegrationsError {
679 pub fn unhandled(
681 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
682 ) -> Self {
683 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
684 source: err.into(),
685 meta: ::std::default::Default::default(),
686 })
687 }
688
689 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
691 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
692 source: err.clone().into(),
693 meta: err,
694 })
695 }
696 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
701 match self {
702 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
703 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
704 Self::IntegrationNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
705 Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
706 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
707 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
708 Self::OperationNotSupportedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
709 Self::TargetResourceNotFound(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
710 Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
711 Self::Unhandled(e) => &e.meta,
712 }
713 }
714 pub fn is_access_denied_exception(&self) -> bool {
716 matches!(self, Self::AccessDeniedException(_))
717 }
718 pub fn is_entity_not_found_exception(&self) -> bool {
720 matches!(self, Self::EntityNotFoundException(_))
721 }
722 pub fn is_integration_not_found_fault(&self) -> bool {
724 matches!(self, Self::IntegrationNotFoundFault(_))
725 }
726 pub fn is_internal_server_exception(&self) -> bool {
728 matches!(self, Self::InternalServerException(_))
729 }
730 pub fn is_internal_service_exception(&self) -> bool {
732 matches!(self, Self::InternalServiceException(_))
733 }
734 pub fn is_invalid_input_exception(&self) -> bool {
736 matches!(self, Self::InvalidInputException(_))
737 }
738 pub fn is_operation_not_supported_exception(&self) -> bool {
740 matches!(self, Self::OperationNotSupportedException(_))
741 }
742 pub fn is_target_resource_not_found(&self) -> bool {
744 matches!(self, Self::TargetResourceNotFound(_))
745 }
746 pub fn is_validation_exception(&self) -> bool {
748 matches!(self, Self::ValidationException(_))
749 }
750}
751impl ::std::error::Error for DescribeInboundIntegrationsError {
752 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
753 match self {
754 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
755 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
756 Self::IntegrationNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
757 Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
758 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
759 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
760 Self::OperationNotSupportedException(_inner) => ::std::option::Option::Some(_inner),
761 Self::TargetResourceNotFound(_inner) => ::std::option::Option::Some(_inner),
762 Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
763 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
764 }
765 }
766}
767impl ::std::fmt::Display for DescribeInboundIntegrationsError {
768 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
769 match self {
770 Self::AccessDeniedException(_inner) => _inner.fmt(f),
771 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
772 Self::IntegrationNotFoundFault(_inner) => _inner.fmt(f),
773 Self::InternalServerException(_inner) => _inner.fmt(f),
774 Self::InternalServiceException(_inner) => _inner.fmt(f),
775 Self::InvalidInputException(_inner) => _inner.fmt(f),
776 Self::OperationNotSupportedException(_inner) => _inner.fmt(f),
777 Self::TargetResourceNotFound(_inner) => _inner.fmt(f),
778 Self::ValidationException(_inner) => _inner.fmt(f),
779 Self::Unhandled(_inner) => {
780 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
781 write!(f, "unhandled error ({code})")
782 } else {
783 f.write_str("unhandled error")
784 }
785 }
786 }
787 }
788}
789impl ::aws_smithy_types::retry::ProvideErrorKind for DescribeInboundIntegrationsError {
790 fn code(&self) -> ::std::option::Option<&str> {
791 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
792 }
793 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
794 ::std::option::Option::None
795 }
796}
797impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DescribeInboundIntegrationsError {
798 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
799 match self {
800 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
801 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
802 Self::IntegrationNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
803 Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
804 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
805 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
806 Self::OperationNotSupportedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
807 Self::TargetResourceNotFound(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
808 Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
809 Self::Unhandled(_inner) => &_inner.meta,
810 }
811 }
812}
813impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DescribeInboundIntegrationsError {
814 fn create_unhandled_error(
815 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
816 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
817 ) -> Self {
818 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
819 source,
820 meta: meta.unwrap_or_default(),
821 })
822 }
823}
824impl ::aws_types::request_id::RequestId for crate::operation::describe_inbound_integrations::DescribeInboundIntegrationsError {
825 fn request_id(&self) -> Option<&str> {
826 self.meta().request_id()
827 }
828}
829
830pub use crate::operation::describe_inbound_integrations::_describe_inbound_integrations_input::DescribeInboundIntegrationsInput;
831
832pub use crate::operation::describe_inbound_integrations::_describe_inbound_integrations_output::DescribeInboundIntegrationsOutput;
833
834mod _describe_inbound_integrations_input;
835
836mod _describe_inbound_integrations_output;
837
838pub mod builders;