1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct ModifyIntegration;
6impl ModifyIntegration {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::modify_integration::ModifyIntegrationInput::SCHEMA;
13 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::modify_integration::ModifyIntegrationOutput::SCHEMA;
15 pub(crate) async fn orchestrate(
16 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17 input: crate::operation::modify_integration::ModifyIntegrationInput,
18 ) -> ::std::result::Result<
19 crate::operation::modify_integration::ModifyIntegrationOutput,
20 ::aws_smithy_runtime_api::client::result::SdkError<
21 crate::operation::modify_integration::ModifyIntegrationError,
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::modify_integration::ModifyIntegrationError>()
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::modify_integration::ModifyIntegrationOutput>()
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::modify_integration::ModifyIntegrationInput,
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", "ModifyIntegration", input, runtime_plugins, stop_point)
59 .instrument(::tracing::debug_span!(
62 "Glue.ModifyIntegration",
63 "rpc.service" = "Glue",
64 "rpc.method" = "ModifyIntegration",
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 ModifyIntegration {
205 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
206 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ModifyIntegration");
207
208 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
209 ModifyIntegrationRequestSerializer,
210 ));
211 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
212 ModifyIntegrationResponseDeserializer,
213 ));
214
215 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
216 crate::config::auth::Params::builder()
217 .operation_name("ModifyIntegration")
218 .build()
219 .expect("required fields set"),
220 ));
221
222 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("ModifyIntegration", "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("ModifyIntegration")
243 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
244 ModifyIntegrationTelemetryInputCaptureInterceptor,
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 ModifyIntegrationEndpointParamsInterceptor,
251 ))
252 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
253 crate::operation::modify_integration::ModifyIntegrationError,
254 >::new())
255 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
256 crate::operation::modify_integration::ModifyIntegrationError,
257 >::new())
258 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
259 crate::operation::modify_integration::ModifyIntegrationError,
260 >::new())
261 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
262 crate::operation::modify_integration::ModifyIntegrationError,
263 >::new());
264
265 ::std::borrow::Cow::Owned(rcb)
266 }
267}
268
269#[derive(Debug)]
270struct ModifyIntegrationTelemetryInputCaptureInterceptor;
271
272#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
273impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ModifyIntegrationTelemetryInputCaptureInterceptor {
274 fn name(&self) -> &'static str {
275 "ModifyIntegrationTelemetryInputCaptureInterceptor"
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::<ModifyIntegrationInput>() 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 if requested.should_capture("Description") {
308 if let ::std::option::Option::Some(value) = input.description.as_deref() {
309 captured.insert("Description", value);
310 }
311 }
312 if requested.should_capture("DataFilter") {
313 if let ::std::option::Option::Some(value) = input.data_filter.as_deref() {
314 captured.insert("DataFilter", value);
315 }
316 }
317 if requested.should_capture("IntegrationName") {
318 if let ::std::option::Option::Some(value) = input.integration_name.as_deref() {
319 captured.insert("IntegrationName", value);
320 }
321 }
322
323 cfg.interceptor_state().store_put(captured);
324 ::std::result::Result::Ok(())
325 }
326}
327#[derive(Debug)]
328struct ModifyIntegrationResponseDeserializer;
329impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ModifyIntegrationResponseDeserializer {
330 fn deserialize_nonstreaming_with_config(
331 &self,
332 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
333 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
334 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
335 let (success, status) = (response.status().is_success(), response.status().as_u16());
336 #[allow(unused_variables)]
341 let body = response.body().bytes().expect("body loaded");
342 let headers = response.headers();
343 #[allow(unused_mut)]
344 let mut force_error = false;
345 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
346 if !success && status != 200 || force_error {
347 let protocol = _cfg
348 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
349 .expect("a SharedClientProtocol is required");
350 #[allow(unused_mut)]
351 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
352 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
353 })?;
354 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
355 let generic = generic_builder.build();
356 let error_code = match generic.code() {
357 ::std::option::Option::Some(code) => code,
358 ::std::option::Option::None => {
359 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
360 ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::modify_integration::ModifyIntegrationError::unhandled(
361 generic,
362 )),
363 ))
364 }
365 };
366 let _error_message = generic.message().map(|msg| msg.to_owned());
367 let err = match error_code {
368 "AccessDeniedException" => crate::operation::modify_integration::ModifyIntegrationError::AccessDeniedException({
369 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
370 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
371 e,
372 ))
373 })?;
374 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
375 tmp.deserialize_members(&mut *deser).map_err(|e| {
376 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
377 e,
378 ))
379 })?;
380 if tmp.message.is_none() {
381 tmp.message = _error_message;
382 }
383 let tmp = tmp.meta(generic);
384 tmp.build()
385 }),
386 "ConflictException" => crate::operation::modify_integration::ModifyIntegrationError::ConflictException({
387 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
388 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
389 e,
390 ))
391 })?;
392 let mut tmp = <crate::types::error::builders::ConflictExceptionBuilder>::default();
393 tmp.deserialize_members(&mut *deser).map_err(|e| {
394 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
395 e,
396 ))
397 })?;
398 if tmp.message.is_none() {
399 tmp.message = _error_message;
400 }
401 let tmp = tmp.meta(generic);
402 tmp.build()
403 }),
404 "EntityNotFoundException" => crate::operation::modify_integration::ModifyIntegrationError::EntityNotFoundException({
405 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
406 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
407 e,
408 ))
409 })?;
410 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
411 tmp.deserialize_members(&mut *deser).map_err(|e| {
412 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
413 e,
414 ))
415 })?;
416 if tmp.message.is_none() {
417 tmp.message = _error_message;
418 }
419 let tmp = tmp.meta(generic);
420 tmp.build()
421 }),
422 "IntegrationConflictOperationFault" => {
423 crate::operation::modify_integration::ModifyIntegrationError::IntegrationConflictOperationFault({
424 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
425 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
426 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
427 )
428 })?;
429 let mut tmp = <crate::types::error::builders::IntegrationConflictOperationFaultBuilder>::default();
430 tmp.deserialize_members(&mut *deser).map_err(|e| {
431 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
432 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
433 )
434 })?;
435 if tmp.message.is_none() {
436 tmp.message = _error_message;
437 }
438 let tmp = tmp.meta(generic);
439 tmp.build()
440 })
441 }
442 "IntegrationNotFoundFault" => crate::operation::modify_integration::ModifyIntegrationError::IntegrationNotFoundFault({
443 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
444 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
445 e,
446 ))
447 })?;
448 let mut tmp = <crate::types::error::builders::IntegrationNotFoundFaultBuilder>::default();
449 tmp.deserialize_members(&mut *deser).map_err(|e| {
450 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
451 e,
452 ))
453 })?;
454 if tmp.message.is_none() {
455 tmp.message = _error_message;
456 }
457 let tmp = tmp.meta(generic);
458 tmp.build()
459 }),
460 "InternalServerException" => crate::operation::modify_integration::ModifyIntegrationError::InternalServerException({
461 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
462 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
463 e,
464 ))
465 })?;
466 let mut tmp = <crate::types::error::builders::InternalServerExceptionBuilder>::default();
467 tmp.deserialize_members(&mut *deser).map_err(|e| {
468 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
469 e,
470 ))
471 })?;
472 if tmp.message.is_none() {
473 tmp.message = _error_message;
474 }
475 let tmp = tmp.meta(generic);
476 tmp.build()
477 }),
478 "InternalServiceException" => crate::operation::modify_integration::ModifyIntegrationError::InternalServiceException({
479 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
480 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
481 e,
482 ))
483 })?;
484 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
485 tmp.deserialize_members(&mut *deser).map_err(|e| {
486 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
487 e,
488 ))
489 })?;
490 if tmp.message.is_none() {
491 tmp.message = _error_message;
492 }
493 let tmp = tmp.meta(generic);
494 tmp.build()
495 }),
496 "InvalidInputException" => crate::operation::modify_integration::ModifyIntegrationError::InvalidInputException({
497 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
498 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
499 e,
500 ))
501 })?;
502 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
503 tmp.deserialize_members(&mut *deser).map_err(|e| {
504 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
505 e,
506 ))
507 })?;
508 if tmp.message.is_none() {
509 tmp.message = _error_message;
510 }
511 let tmp = tmp.meta(generic);
512 tmp.build()
513 }),
514 "InvalidIntegrationStateFault" => crate::operation::modify_integration::ModifyIntegrationError::InvalidIntegrationStateFault({
515 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
516 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
517 e,
518 ))
519 })?;
520 let mut tmp = <crate::types::error::builders::InvalidIntegrationStateFaultBuilder>::default();
521 tmp.deserialize_members(&mut *deser).map_err(|e| {
522 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
523 e,
524 ))
525 })?;
526 if tmp.message.is_none() {
527 tmp.message = _error_message;
528 }
529 let tmp = tmp.meta(generic);
530 tmp.build()
531 }),
532 "InvalidStateException" => crate::operation::modify_integration::ModifyIntegrationError::InvalidStateException({
533 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
534 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
535 e,
536 ))
537 })?;
538 let mut tmp = <crate::types::error::builders::InvalidStateExceptionBuilder>::default();
539 tmp.deserialize_members(&mut *deser).map_err(|e| {
540 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
541 e,
542 ))
543 })?;
544 if tmp.message.is_none() {
545 tmp.message = _error_message;
546 }
547 let tmp = tmp.meta(generic);
548 tmp.build()
549 }),
550 "ValidationException" => crate::operation::modify_integration::ModifyIntegrationError::ValidationException({
551 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
552 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
553 e,
554 ))
555 })?;
556 let mut tmp = <crate::types::error::builders::ValidationExceptionBuilder>::default();
557 tmp.deserialize_members(&mut *deser).map_err(|e| {
558 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
559 e,
560 ))
561 })?;
562 if tmp.message.is_none() {
563 tmp.message = _error_message;
564 }
565 let tmp = tmp.meta(generic);
566 tmp.build()
567 }),
568 _ => {
569 match protocol
577 .deserialize_error_response(response, _cfg)
578 .ok()
579 .and_then(|mut deser| {
580 ::aws_smithy_schema::registry::reify_error(
581 crate::operation::modify_integration::error_registry::REGISTRY
582 .or(&crate::error_type_registry::REGISTRY),
583 error_code,
584 &mut *deser,
585 )
586 }) {
587 ::std::option::Option::Some(source) => <crate::operation::modify_integration::ModifyIntegrationError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
588 ::std::option::Option::None => crate::operation::modify_integration::ModifyIntegrationError::generic(generic),
589 }
590 }
591 };
592 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
593 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
594 ))
595 } else {
596 let protocol = _cfg
597 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
598 .expect("a SharedClientProtocol is required");
599 let mut deser = protocol
600 .deserialize_response(response, ModifyIntegration::OUTPUT_SCHEMA, _cfg)
601 .map_err(|e| {
602 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
603 })?;
604 let _response_headers = headers;
608 #[allow(unused_mut)]
612 let mut output = <crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder>::default();
613 output.deserialize_members(&mut *deser).map_err(|e| {
614 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
615 })?;
616 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
617 let output = crate::serde_util::modify_integration_output_output_correct_errors(output)
618 .build()
619 .map_err(|e| {
620 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
621 })?;
622 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
623 }
624 }
625}
626#[derive(Debug)]
627struct ModifyIntegrationRequestSerializer;
628impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ModifyIntegrationRequestSerializer {
629 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
630 fn serialize_input(
631 &self,
632 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
633 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
634 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
635 let input = input
636 .downcast::<crate::operation::modify_integration::ModifyIntegrationInput>()
637 .expect("correct type");
638
639 let protocol = _cfg
640 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
641 .expect("a SharedClientProtocol is required");
642 let mut request = protocol
643 .serialize_request(&input, ModifyIntegration::INPUT_SCHEMA, "/", _cfg)
644 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
645
646 return ::std::result::Result::Ok(request);
647 }
648}
649#[derive(Debug)]
650struct ModifyIntegrationEndpointParamsInterceptor;
651
652#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
653impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ModifyIntegrationEndpointParamsInterceptor {
654 fn name(&self) -> &'static str {
655 "ModifyIntegrationEndpointParamsInterceptor"
656 }
657
658 fn read_before_execution(
659 &self,
660 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
661 '_,
662 ::aws_smithy_runtime_api::client::interceptors::context::Input,
663 ::aws_smithy_runtime_api::client::interceptors::context::Output,
664 ::aws_smithy_runtime_api::client::interceptors::context::Error,
665 >,
666 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
667 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
668 let _input = context
669 .input()
670 .downcast_ref::<ModifyIntegrationInput>()
671 .ok_or("failed to downcast to ModifyIntegrationInput")?;
672
673 let params = crate::config::endpoint::Params::builder()
674 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
675 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
676 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
677 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
678 .build()
679 .map_err(|err| {
680 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
681 })?;
682 cfg.interceptor_state()
683 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
684 ::std::result::Result::Ok(())
685 }
686}
687
688#[non_exhaustive]
693#[derive(::std::fmt::Debug)]
694pub enum ModifyIntegrationError {
695 AccessDeniedException(crate::types::error::AccessDeniedException),
697 ConflictException(crate::types::error::ConflictException),
699 EntityNotFoundException(crate::types::error::EntityNotFoundException),
701 IntegrationConflictOperationFault(crate::types::error::IntegrationConflictOperationFault),
703 IntegrationNotFoundFault(crate::types::error::IntegrationNotFoundFault),
705 InternalServerException(crate::types::error::InternalServerException),
707 InternalServiceException(crate::types::error::InternalServiceException),
709 InvalidInputException(crate::types::error::InvalidInputException),
711 InvalidIntegrationStateFault(crate::types::error::InvalidIntegrationStateFault),
713 InvalidStateException(crate::types::error::InvalidStateException),
715 ValidationException(crate::types::error::ValidationException),
717 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
719 variable wildcard pattern and check `.code()`:
720 \
721 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
722 \
723 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ModifyIntegrationError) for what information is available for the error.")]
724 Unhandled(crate::error::sealed_unhandled::Unhandled),
725}
726impl ModifyIntegrationError {
727 pub fn unhandled(
729 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
730 ) -> Self {
731 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
732 source: err.into(),
733 meta: ::std::default::Default::default(),
734 })
735 }
736
737 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
739 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
740 source: err.clone().into(),
741 meta: err,
742 })
743 }
744 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
749 match self {
750 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
751 Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
752 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
753 Self::IntegrationConflictOperationFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
754 Self::IntegrationNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
755 Self::InternalServerException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
756 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
757 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
758 Self::InvalidIntegrationStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
759 Self::InvalidStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
760 Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
761 Self::Unhandled(e) => &e.meta,
762 }
763 }
764 pub fn is_access_denied_exception(&self) -> bool {
766 matches!(self, Self::AccessDeniedException(_))
767 }
768 pub fn is_conflict_exception(&self) -> bool {
770 matches!(self, Self::ConflictException(_))
771 }
772 pub fn is_entity_not_found_exception(&self) -> bool {
774 matches!(self, Self::EntityNotFoundException(_))
775 }
776 pub fn is_integration_conflict_operation_fault(&self) -> bool {
778 matches!(self, Self::IntegrationConflictOperationFault(_))
779 }
780 pub fn is_integration_not_found_fault(&self) -> bool {
782 matches!(self, Self::IntegrationNotFoundFault(_))
783 }
784 pub fn is_internal_server_exception(&self) -> bool {
786 matches!(self, Self::InternalServerException(_))
787 }
788 pub fn is_internal_service_exception(&self) -> bool {
790 matches!(self, Self::InternalServiceException(_))
791 }
792 pub fn is_invalid_input_exception(&self) -> bool {
794 matches!(self, Self::InvalidInputException(_))
795 }
796 pub fn is_invalid_integration_state_fault(&self) -> bool {
798 matches!(self, Self::InvalidIntegrationStateFault(_))
799 }
800 pub fn is_invalid_state_exception(&self) -> bool {
802 matches!(self, Self::InvalidStateException(_))
803 }
804 pub fn is_validation_exception(&self) -> bool {
806 matches!(self, Self::ValidationException(_))
807 }
808}
809impl ::std::error::Error for ModifyIntegrationError {
810 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
811 match self {
812 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
813 Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
814 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
815 Self::IntegrationConflictOperationFault(_inner) => ::std::option::Option::Some(_inner),
816 Self::IntegrationNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
817 Self::InternalServerException(_inner) => ::std::option::Option::Some(_inner),
818 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
819 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
820 Self::InvalidIntegrationStateFault(_inner) => ::std::option::Option::Some(_inner),
821 Self::InvalidStateException(_inner) => ::std::option::Option::Some(_inner),
822 Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
823 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
824 }
825 }
826}
827impl ::std::fmt::Display for ModifyIntegrationError {
828 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
829 match self {
830 Self::AccessDeniedException(_inner) => _inner.fmt(f),
831 Self::ConflictException(_inner) => _inner.fmt(f),
832 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
833 Self::IntegrationConflictOperationFault(_inner) => _inner.fmt(f),
834 Self::IntegrationNotFoundFault(_inner) => _inner.fmt(f),
835 Self::InternalServerException(_inner) => _inner.fmt(f),
836 Self::InternalServiceException(_inner) => _inner.fmt(f),
837 Self::InvalidInputException(_inner) => _inner.fmt(f),
838 Self::InvalidIntegrationStateFault(_inner) => _inner.fmt(f),
839 Self::InvalidStateException(_inner) => _inner.fmt(f),
840 Self::ValidationException(_inner) => _inner.fmt(f),
841 Self::Unhandled(_inner) => {
842 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
843 write!(f, "unhandled error ({code})")
844 } else {
845 f.write_str("unhandled error")
846 }
847 }
848 }
849 }
850}
851impl ::aws_smithy_types::retry::ProvideErrorKind for ModifyIntegrationError {
852 fn code(&self) -> ::std::option::Option<&str> {
853 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
854 }
855 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
856 ::std::option::Option::None
857 }
858}
859impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ModifyIntegrationError {
860 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
861 match self {
862 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
863 Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
864 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
865 Self::IntegrationConflictOperationFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
866 Self::IntegrationNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
867 Self::InternalServerException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
868 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
869 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
870 Self::InvalidIntegrationStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
871 Self::InvalidStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
872 Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
873 Self::Unhandled(_inner) => &_inner.meta,
874 }
875 }
876}
877impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ModifyIntegrationError {
878 fn create_unhandled_error(
879 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
880 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
881 ) -> Self {
882 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
883 source,
884 meta: meta.unwrap_or_default(),
885 })
886 }
887}
888impl ::aws_types::request_id::RequestId for crate::operation::modify_integration::ModifyIntegrationError {
889 fn request_id(&self) -> Option<&str> {
890 self.meta().request_id()
891 }
892}
893
894pub use crate::operation::modify_integration::_modify_integration_input::ModifyIntegrationInput;
895
896pub use crate::operation::modify_integration::_modify_integration_output::ModifyIntegrationOutput;
897
898mod _modify_integration_input;
899
900mod _modify_integration_output;
901
902pub mod builders;