1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateTable;
6impl UpdateTable {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::update_table::UpdateTableInput::SCHEMA;
13 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::update_table::UpdateTableOutput::SCHEMA;
15 pub(crate) async fn orchestrate(
16 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17 input: crate::operation::update_table::UpdateTableInput,
18 ) -> ::std::result::Result<
19 crate::operation::update_table::UpdateTableOutput,
20 ::aws_smithy_runtime_api::client::result::SdkError<
21 crate::operation::update_table::UpdateTableError,
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::update_table::UpdateTableError>()
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::update_table::UpdateTableOutput>()
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::update_table::UpdateTableInput,
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", "UpdateTable", input, runtime_plugins, stop_point)
59 .instrument(::tracing::debug_span!(
62 "Glue.UpdateTable",
63 "rpc.service" = "Glue",
64 "rpc.method" = "UpdateTable",
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::AlreadyExistsException::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::AlreadyExistsException::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::AlreadyExistsException::deserialize(d)?))
109 },
110 )
111.insert_error_shape(
112 crate::types::error::ConcurrentModificationException::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::ConcurrentModificationException::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::ConcurrentModificationException::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::FederationSourceException::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::FederationSourceException::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::FederationSourceException::deserialize(d)?))
136 },
137 )
138.insert_error_shape(
139 crate::types::error::FederationSourceRetryableException::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::FederationSourceRetryableException::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::FederationSourceRetryableException::deserialize(d)?))
145 },
146 )
147.insert_error_shape(
148 crate::types::error::GlueEncryptionException::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::GlueEncryptionException::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::GlueEncryptionException::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::OperationTimeoutException::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::OperationTimeoutException::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::OperationTimeoutException::deserialize(d)?))
181 },
182 )
183.insert_error_shape(
184 crate::types::error::ResourceNotReadyException::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::ResourceNotReadyException::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::ResourceNotReadyException::deserialize(d)?))
190 },
191 )
192.insert_error_shape(
193 crate::types::error::ResourceNumberLimitExceededException::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::ResourceNumberLimitExceededException::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::ResourceNumberLimitExceededException::deserialize(d)?))
199 },
200 )
201 .build()
202 });
203}
204impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateTable {
205 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
206 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateTable");
207
208 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
209 UpdateTableRequestSerializer,
210 ));
211 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
212 UpdateTableResponseDeserializer,
213 ));
214
215 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
216 crate::config::auth::Params::builder()
217 .operation_name("UpdateTable")
218 .build()
219 .expect("required fields set"),
220 ));
221
222 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("UpdateTable", "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("UpdateTable")
243 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
244 UpdateTableTelemetryInputCaptureInterceptor,
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 UpdateTableEndpointParamsInterceptor,
251 ))
252 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
253 crate::operation::update_table::UpdateTableError,
254 >::new())
255 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
256 crate::operation::update_table::UpdateTableError,
257 >::new())
258 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
259 crate::operation::update_table::UpdateTableError,
260 >::new())
261 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
262 crate::operation::update_table::UpdateTableError,
263 >::new());
264
265 ::std::borrow::Cow::Owned(rcb)
266 }
267}
268
269#[derive(Debug)]
270struct UpdateTableTelemetryInputCaptureInterceptor;
271
272#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
273impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateTableTelemetryInputCaptureInterceptor {
274 fn name(&self) -> &'static str {
275 "UpdateTableTelemetryInputCaptureInterceptor"
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::<UpdateTableInput>() else {
297 return ::std::result::Result::Ok(());
299 };
300
301 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
302 if requested.should_capture("CatalogId") {
303 if let ::std::option::Option::Some(value) = input.catalog_id.as_deref() {
304 captured.insert("CatalogId", value);
305 }
306 }
307 if requested.should_capture("DatabaseName") {
308 if let ::std::option::Option::Some(value) = input.database_name.as_deref() {
309 captured.insert("DatabaseName", value);
310 }
311 }
312 if requested.should_capture("Name") {
313 if let ::std::option::Option::Some(value) = input.name.as_deref() {
314 captured.insert("Name", value);
315 }
316 }
317 if requested.should_capture("TransactionId") {
318 if let ::std::option::Option::Some(value) = input.transaction_id.as_deref() {
319 captured.insert("TransactionId", value);
320 }
321 }
322 if requested.should_capture("VersionId") {
323 if let ::std::option::Option::Some(value) = input.version_id.as_deref() {
324 captured.insert("VersionId", value);
325 }
326 }
327
328 cfg.interceptor_state().store_put(captured);
329 ::std::result::Result::Ok(())
330 }
331}
332#[derive(Debug)]
333struct UpdateTableResponseDeserializer;
334impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateTableResponseDeserializer {
335 fn deserialize_nonstreaming_with_config(
336 &self,
337 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
338 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
339 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
340 let (success, status) = (response.status().is_success(), response.status().as_u16());
341 #[allow(unused_variables)]
346 let body = response.body().bytes().expect("body loaded");
347 let headers = response.headers();
348 #[allow(unused_mut)]
349 let mut force_error = false;
350 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
351 if !success && status != 200 || force_error {
352 let protocol = _cfg
353 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
354 .expect("a SharedClientProtocol is required");
355 #[allow(unused_mut)]
356 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
357 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
358 })?;
359 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
360 let generic = generic_builder.build();
361 let error_code = match generic.code() {
362 ::std::option::Option::Some(code) => code,
363 ::std::option::Option::None => {
364 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
365 ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::update_table::UpdateTableError::unhandled(generic)),
366 ))
367 }
368 };
369 let _error_message = generic.message().map(|msg| msg.to_owned());
370 let err = match error_code {
371 "AlreadyExistsException" => crate::operation::update_table::UpdateTableError::AlreadyExistsException({
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::AlreadyExistsExceptionBuilder>::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 "ConcurrentModificationException" => crate::operation::update_table::UpdateTableError::ConcurrentModificationException({
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::ConcurrentModificationExceptionBuilder>::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 "EntityNotFoundException" => crate::operation::update_table::UpdateTableError::EntityNotFoundException({
408 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
409 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
410 e,
411 ))
412 })?;
413 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
414 tmp.deserialize_members(&mut *deser).map_err(|e| {
415 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
416 e,
417 ))
418 })?;
419 if tmp.message.is_none() {
420 tmp.message = _error_message;
421 }
422 let tmp = tmp.meta(generic);
423 tmp.build()
424 }),
425 "FederationSourceException" => crate::operation::update_table::UpdateTableError::FederationSourceException({
426 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
427 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
428 e,
429 ))
430 })?;
431 let mut tmp = <crate::types::error::builders::FederationSourceExceptionBuilder>::default();
432 tmp.deserialize_members(&mut *deser).map_err(|e| {
433 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
434 e,
435 ))
436 })?;
437 if tmp.message.is_none() {
438 tmp.message = _error_message;
439 }
440 let tmp = tmp.meta(generic);
441 tmp.build()
442 }),
443 "FederationSourceRetryableException" => crate::operation::update_table::UpdateTableError::FederationSourceRetryableException({
444 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
445 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
446 e,
447 ))
448 })?;
449 let mut tmp = <crate::types::error::builders::FederationSourceRetryableExceptionBuilder>::default();
450 tmp.deserialize_members(&mut *deser).map_err(|e| {
451 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
452 e,
453 ))
454 })?;
455 if tmp.message.is_none() {
456 tmp.message = _error_message;
457 }
458 let tmp = tmp.meta(generic);
459 tmp.build()
460 }),
461 "GlueEncryptionException" => crate::operation::update_table::UpdateTableError::GlueEncryptionException({
462 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
463 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
464 e,
465 ))
466 })?;
467 let mut tmp = <crate::types::error::builders::GlueEncryptionExceptionBuilder>::default();
468 tmp.deserialize_members(&mut *deser).map_err(|e| {
469 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
470 e,
471 ))
472 })?;
473 if tmp.message.is_none() {
474 tmp.message = _error_message;
475 }
476 let tmp = tmp.meta(generic);
477 tmp.build()
478 }),
479 "InternalServiceException" => crate::operation::update_table::UpdateTableError::InternalServiceException({
480 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
481 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
482 e,
483 ))
484 })?;
485 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
486 tmp.deserialize_members(&mut *deser).map_err(|e| {
487 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
488 e,
489 ))
490 })?;
491 if tmp.message.is_none() {
492 tmp.message = _error_message;
493 }
494 let tmp = tmp.meta(generic);
495 tmp.build()
496 }),
497 "InvalidInputException" => crate::operation::update_table::UpdateTableError::InvalidInputException({
498 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
499 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
500 e,
501 ))
502 })?;
503 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
504 tmp.deserialize_members(&mut *deser).map_err(|e| {
505 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
506 e,
507 ))
508 })?;
509 if tmp.message.is_none() {
510 tmp.message = _error_message;
511 }
512 let tmp = tmp.meta(generic);
513 tmp.build()
514 }),
515 "OperationTimeoutException" => crate::operation::update_table::UpdateTableError::OperationTimeoutException({
516 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
517 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
518 e,
519 ))
520 })?;
521 let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
522 tmp.deserialize_members(&mut *deser).map_err(|e| {
523 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
524 e,
525 ))
526 })?;
527 if tmp.message.is_none() {
528 tmp.message = _error_message;
529 }
530 let tmp = tmp.meta(generic);
531 tmp.build()
532 }),
533 "ResourceNotReadyException" => crate::operation::update_table::UpdateTableError::ResourceNotReadyException({
534 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
535 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
536 e,
537 ))
538 })?;
539 let mut tmp = <crate::types::error::builders::ResourceNotReadyExceptionBuilder>::default();
540 tmp.deserialize_members(&mut *deser).map_err(|e| {
541 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
542 e,
543 ))
544 })?;
545 if tmp.message.is_none() {
546 tmp.message = _error_message;
547 }
548 let tmp = tmp.meta(generic);
549 tmp.build()
550 }),
551 "ResourceNumberLimitExceededException" => crate::operation::update_table::UpdateTableError::ResourceNumberLimitExceededException({
552 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
553 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
554 e,
555 ))
556 })?;
557 let mut tmp = <crate::types::error::builders::ResourceNumberLimitExceededExceptionBuilder>::default();
558 tmp.deserialize_members(&mut *deser).map_err(|e| {
559 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
560 e,
561 ))
562 })?;
563 if tmp.message.is_none() {
564 tmp.message = _error_message;
565 }
566 let tmp = tmp.meta(generic);
567 tmp.build()
568 }),
569 _ => {
570 match protocol
578 .deserialize_error_response(response, _cfg)
579 .ok()
580 .and_then(|mut deser| {
581 ::aws_smithy_schema::registry::reify_error(
582 crate::operation::update_table::error_registry::REGISTRY
583 .or(&crate::error_type_registry::REGISTRY),
584 error_code,
585 &mut *deser,
586 )
587 }) {
588 ::std::option::Option::Some(source) => <crate::operation::update_table::UpdateTableError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
589 ::std::option::Option::None => crate::operation::update_table::UpdateTableError::generic(generic),
590 }
591 }
592 };
593 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
594 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
595 ))
596 } else {
597 let protocol = _cfg
598 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
599 .expect("a SharedClientProtocol is required");
600 let mut deser = protocol.deserialize_response(response, UpdateTable::OUTPUT_SCHEMA, _cfg).map_err(|e| {
601 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
602 })?;
603 let _response_headers = headers;
607 #[allow(unused_mut)]
611 let mut output = <crate::operation::update_table::builders::UpdateTableOutputBuilder>::default();
612 output.deserialize_members(&mut *deser).map_err(|e| {
613 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
614 })?;
615 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
616 let output = output.build();
617 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
618 }
619 }
620}
621#[derive(Debug)]
622struct UpdateTableRequestSerializer;
623impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateTableRequestSerializer {
624 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
625 fn serialize_input(
626 &self,
627 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
628 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
629 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
630 let input = input
631 .downcast::<crate::operation::update_table::UpdateTableInput>()
632 .expect("correct type");
633
634 let protocol = _cfg
635 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
636 .expect("a SharedClientProtocol is required");
637 let mut request = protocol
638 .serialize_request(&input, UpdateTable::INPUT_SCHEMA, "/", _cfg)
639 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
640
641 return ::std::result::Result::Ok(request);
642 }
643}
644#[derive(Debug)]
645struct UpdateTableEndpointParamsInterceptor;
646
647#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
648impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateTableEndpointParamsInterceptor {
649 fn name(&self) -> &'static str {
650 "UpdateTableEndpointParamsInterceptor"
651 }
652
653 fn read_before_execution(
654 &self,
655 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
656 '_,
657 ::aws_smithy_runtime_api::client::interceptors::context::Input,
658 ::aws_smithy_runtime_api::client::interceptors::context::Output,
659 ::aws_smithy_runtime_api::client::interceptors::context::Error,
660 >,
661 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
662 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
663 let _input = context
664 .input()
665 .downcast_ref::<UpdateTableInput>()
666 .ok_or("failed to downcast to UpdateTableInput")?;
667
668 let params = crate::config::endpoint::Params::builder()
669 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
670 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
671 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
672 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
673 .build()
674 .map_err(|err| {
675 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
676 })?;
677 cfg.interceptor_state()
678 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
679 ::std::result::Result::Ok(())
680 }
681}
682
683#[non_exhaustive]
688#[derive(::std::fmt::Debug)]
689pub enum UpdateTableError {
690 AlreadyExistsException(crate::types::error::AlreadyExistsException),
692 ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
694 EntityNotFoundException(crate::types::error::EntityNotFoundException),
696 FederationSourceException(crate::types::error::FederationSourceException),
698 FederationSourceRetryableException(crate::types::error::FederationSourceRetryableException),
700 GlueEncryptionException(crate::types::error::GlueEncryptionException),
702 InternalServiceException(crate::types::error::InternalServiceException),
704 InvalidInputException(crate::types::error::InvalidInputException),
706 OperationTimeoutException(crate::types::error::OperationTimeoutException),
708 ResourceNotReadyException(crate::types::error::ResourceNotReadyException),
710 ResourceNumberLimitExceededException(crate::types::error::ResourceNumberLimitExceededException),
712 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
714 variable wildcard pattern and check `.code()`:
715 \
716 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
717 \
718 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateTableError) for what information is available for the error.")]
719 Unhandled(crate::error::sealed_unhandled::Unhandled),
720}
721impl UpdateTableError {
722 pub fn unhandled(
724 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
725 ) -> Self {
726 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
727 source: err.into(),
728 meta: ::std::default::Default::default(),
729 })
730 }
731
732 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
734 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
735 source: err.clone().into(),
736 meta: err,
737 })
738 }
739 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
744 match self {
745 Self::AlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
746 Self::ConcurrentModificationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
747 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
748 Self::FederationSourceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
749 Self::FederationSourceRetryableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
750 Self::GlueEncryptionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
751 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
752 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
753 Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
754 Self::ResourceNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
755 Self::ResourceNumberLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
756 Self::Unhandled(e) => &e.meta,
757 }
758 }
759 pub fn is_already_exists_exception(&self) -> bool {
761 matches!(self, Self::AlreadyExistsException(_))
762 }
763 pub fn is_concurrent_modification_exception(&self) -> bool {
765 matches!(self, Self::ConcurrentModificationException(_))
766 }
767 pub fn is_entity_not_found_exception(&self) -> bool {
769 matches!(self, Self::EntityNotFoundException(_))
770 }
771 pub fn is_federation_source_exception(&self) -> bool {
773 matches!(self, Self::FederationSourceException(_))
774 }
775 pub fn is_federation_source_retryable_exception(&self) -> bool {
777 matches!(self, Self::FederationSourceRetryableException(_))
778 }
779 pub fn is_glue_encryption_exception(&self) -> bool {
781 matches!(self, Self::GlueEncryptionException(_))
782 }
783 pub fn is_internal_service_exception(&self) -> bool {
785 matches!(self, Self::InternalServiceException(_))
786 }
787 pub fn is_invalid_input_exception(&self) -> bool {
789 matches!(self, Self::InvalidInputException(_))
790 }
791 pub fn is_operation_timeout_exception(&self) -> bool {
793 matches!(self, Self::OperationTimeoutException(_))
794 }
795 pub fn is_resource_not_ready_exception(&self) -> bool {
797 matches!(self, Self::ResourceNotReadyException(_))
798 }
799 pub fn is_resource_number_limit_exceeded_exception(&self) -> bool {
801 matches!(self, Self::ResourceNumberLimitExceededException(_))
802 }
803}
804impl ::std::error::Error for UpdateTableError {
805 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
806 match self {
807 Self::AlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
808 Self::ConcurrentModificationException(_inner) => ::std::option::Option::Some(_inner),
809 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
810 Self::FederationSourceException(_inner) => ::std::option::Option::Some(_inner),
811 Self::FederationSourceRetryableException(_inner) => ::std::option::Option::Some(_inner),
812 Self::GlueEncryptionException(_inner) => ::std::option::Option::Some(_inner),
813 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
814 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
815 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
816 Self::ResourceNotReadyException(_inner) => ::std::option::Option::Some(_inner),
817 Self::ResourceNumberLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
818 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
819 }
820 }
821}
822impl ::std::fmt::Display for UpdateTableError {
823 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
824 match self {
825 Self::AlreadyExistsException(_inner) => _inner.fmt(f),
826 Self::ConcurrentModificationException(_inner) => _inner.fmt(f),
827 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
828 Self::FederationSourceException(_inner) => _inner.fmt(f),
829 Self::FederationSourceRetryableException(_inner) => _inner.fmt(f),
830 Self::GlueEncryptionException(_inner) => _inner.fmt(f),
831 Self::InternalServiceException(_inner) => _inner.fmt(f),
832 Self::InvalidInputException(_inner) => _inner.fmt(f),
833 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
834 Self::ResourceNotReadyException(_inner) => _inner.fmt(f),
835 Self::ResourceNumberLimitExceededException(_inner) => _inner.fmt(f),
836 Self::Unhandled(_inner) => {
837 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
838 write!(f, "unhandled error ({code})")
839 } else {
840 f.write_str("unhandled error")
841 }
842 }
843 }
844 }
845}
846impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateTableError {
847 fn code(&self) -> ::std::option::Option<&str> {
848 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
849 }
850 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
851 ::std::option::Option::None
852 }
853}
854impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateTableError {
855 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
856 match self {
857 Self::AlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
858 Self::ConcurrentModificationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
859 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
860 Self::FederationSourceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
861 Self::FederationSourceRetryableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
862 Self::GlueEncryptionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
863 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
864 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
865 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
866 Self::ResourceNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
867 Self::ResourceNumberLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
868 Self::Unhandled(_inner) => &_inner.meta,
869 }
870 }
871}
872impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateTableError {
873 fn create_unhandled_error(
874 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
875 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
876 ) -> Self {
877 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
878 source,
879 meta: meta.unwrap_or_default(),
880 })
881 }
882}
883impl ::aws_types::request_id::RequestId for crate::operation::update_table::UpdateTableError {
884 fn request_id(&self) -> Option<&str> {
885 self.meta().request_id()
886 }
887}
888
889pub use crate::operation::update_table::_update_table_input::UpdateTableInput;
890
891pub use crate::operation::update_table::_update_table_output::UpdateTableOutput;
892
893mod _update_table_input;
894
895mod _update_table_output;
896
897pub mod builders;