1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct GetTable;
6impl GetTable {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::get_table::GetTableInput::SCHEMA;
13 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::get_table::GetTableOutput::SCHEMA;
15 pub(crate) async fn orchestrate(
16 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17 input: crate::operation::get_table::GetTableInput,
18 ) -> ::std::result::Result<
19 crate::operation::get_table::GetTableOutput,
20 ::aws_smithy_runtime_api::client::result::SdkError<
21 crate::operation::get_table::GetTableError,
22 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
23 >,
24 > {
25 let map_err =
26 |err: ::aws_smithy_runtime_api::client::result::SdkError<
27 ::aws_smithy_runtime_api::client::interceptors::context::Error,
28 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
29 >| { err.map_service_error(|err| err.downcast::<crate::operation::get_table::GetTableError>().expect("correct error type")) };
30 let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31 .await
32 .map_err(map_err)?;
33 let output = context.finalize().map_err(map_err)?;
34 ::std::result::Result::Ok(
35 output
36 .downcast::<crate::operation::get_table::GetTableOutput>()
37 .expect("correct output type"),
38 )
39 }
40
41 pub(crate) async fn orchestrate_with_stop_point(
42 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43 input: crate::operation::get_table::GetTableInput,
44 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45 ) -> ::std::result::Result<
46 ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47 ::aws_smithy_runtime_api::client::result::SdkError<
48 ::aws_smithy_runtime_api::client::interceptors::context::Error,
49 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50 >,
51 > {
52 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53 use ::tracing::Instrument;
54 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Glue", "GetTable", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "Glue.GetTable",
59 "rpc.service" = "Glue",
60 "rpc.method" = "GetTable",
61 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62 "rpc.system" = "aws-api",
63 ))
64 .await
65 }
66
67 pub(crate) fn operation_runtime_plugins(
68 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69 client_config: &crate::config::Config,
70 config_override: ::std::option::Option<crate::config::Builder>,
71 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73
74 if let ::std::option::Option::Some(config_override) = config_override {
75 for plugin in config_override.runtime_plugins.iter().cloned() {
76 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77 }
78 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79 config_override,
80 client_config.config.clone(),
81 &client_config.runtime_components,
82 ));
83 }
84 runtime_plugins
85 }
86}
87pub(crate) mod error_registry {
96 pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
97 ::aws_smithy_schema::registry::TypeRegistry::builder()
98 .insert_error_shape(
99 crate::types::error::EntityNotFoundException::SCHEMA,
100 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
101 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
102 },
103 |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> {
104 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
105 },
106 )
107.insert_error_shape(
108 crate::types::error::FederationSourceException::SCHEMA,
109 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
110 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::FederationSourceException::deserialize(d)?))
111 },
112 |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> {
113 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::FederationSourceException::deserialize(d)?))
114 },
115 )
116.insert_error_shape(
117 crate::types::error::FederationSourceRetryableException::SCHEMA,
118 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
119 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::FederationSourceRetryableException::deserialize(d)?))
120 },
121 |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> {
122 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::FederationSourceRetryableException::deserialize(d)?))
123 },
124 )
125.insert_error_shape(
126 crate::types::error::GlueEncryptionException::SCHEMA,
127 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
128 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::GlueEncryptionException::deserialize(d)?))
129 },
130 |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> {
131 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::GlueEncryptionException::deserialize(d)?))
132 },
133 )
134.insert_error_shape(
135 crate::types::error::InternalServiceException::SCHEMA,
136 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
137 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
138 },
139 |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> {
140 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
141 },
142 )
143.insert_error_shape(
144 crate::types::error::InvalidInputException::SCHEMA,
145 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
146 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
147 },
148 |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> {
149 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
150 },
151 )
152.insert_error_shape(
153 crate::types::error::OperationTimeoutException::SCHEMA,
154 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
155 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
156 },
157 |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> {
158 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
159 },
160 )
161.insert_error_shape(
162 crate::types::error::ResourceNotReadyException::SCHEMA,
163 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
164 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceNotReadyException::deserialize(d)?))
165 },
166 |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> {
167 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceNotReadyException::deserialize(d)?))
168 },
169 )
170 .build()
171 });
172}
173impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetTable {
174 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
175 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetTable");
176
177 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
178 GetTableRequestSerializer,
179 ));
180 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
181 GetTableResponseDeserializer,
182 ));
183
184 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
185 crate::config::auth::Params::builder()
186 .operation_name("GetTable")
187 .build()
188 .expect("required fields set"),
189 ));
190
191 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("GetTable", "Glue"));
192 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
193 signing_options.double_uri_encode = true;
194 signing_options.content_sha256_header = false;
195 signing_options.normalize_uri_path = true;
196 signing_options.payload_override = None;
197
198 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
199 signing_options,
200 ..::std::default::Default::default()
201 });
202
203 ::std::option::Option::Some(cfg.freeze())
204 }
205
206 fn runtime_components(
207 &self,
208 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
209 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
210 #[allow(unused_mut)]
211 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetTable")
212 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
213 GetTableTelemetryInputCaptureInterceptor,
214 ))
215 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
216 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
217 ))
218 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
219 GetTableEndpointParamsInterceptor,
220 ))
221 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
222 crate::operation::get_table::GetTableError,
223 >::new())
224 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
225 crate::operation::get_table::GetTableError,
226 >::new())
227 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
228 crate::operation::get_table::GetTableError,
229 >::new())
230 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
231 crate::operation::get_table::GetTableError,
232 >::new());
233
234 ::std::borrow::Cow::Owned(rcb)
235 }
236}
237
238#[derive(Debug)]
239struct GetTableTelemetryInputCaptureInterceptor;
240
241#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
242impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetTableTelemetryInputCaptureInterceptor {
243 fn name(&self) -> &'static str {
244 "GetTableTelemetryInputCaptureInterceptor"
245 }
246
247 fn read_before_execution(
248 &self,
249 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
250 '_,
251 ::aws_smithy_runtime_api::client::interceptors::context::Input,
252 ::aws_smithy_runtime_api::client::interceptors::context::Output,
253 ::aws_smithy_runtime_api::client::interceptors::context::Error,
254 >,
255 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
256 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
257 let ::std::option::Option::Some(requested) = cfg
259 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
260 .filter(|r| !r.is_empty())
261 else {
262 return ::std::result::Result::Ok(());
263 };
264
265 let ::std::option::Option::Some(input) = context.input().downcast_ref::<GetTableInput>() else {
266 return ::std::result::Result::Ok(());
268 };
269
270 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
271 if requested.should_capture("CatalogId") {
272 if let ::std::option::Option::Some(value) = input.catalog_id.as_deref() {
273 captured.insert("CatalogId", value);
274 }
275 }
276 if requested.should_capture("DatabaseName") {
277 if let ::std::option::Option::Some(value) = input.database_name.as_deref() {
278 captured.insert("DatabaseName", value);
279 }
280 }
281 if requested.should_capture("Name") {
282 if let ::std::option::Option::Some(value) = input.name.as_deref() {
283 captured.insert("Name", value);
284 }
285 }
286 if requested.should_capture("TransactionId") {
287 if let ::std::option::Option::Some(value) = input.transaction_id.as_deref() {
288 captured.insert("TransactionId", value);
289 }
290 }
291
292 cfg.interceptor_state().store_put(captured);
293 ::std::result::Result::Ok(())
294 }
295}
296#[derive(Debug)]
297struct GetTableResponseDeserializer;
298impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetTableResponseDeserializer {
299 fn deserialize_nonstreaming_with_config(
300 &self,
301 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
302 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
303 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
304 let (success, status) = (response.status().is_success(), response.status().as_u16());
305 #[allow(unused_variables)]
310 let body = response.body().bytes().expect("body loaded");
311 let headers = response.headers();
312 #[allow(unused_mut)]
313 let mut force_error = false;
314 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
315 if !success && status != 200 || force_error {
316 let protocol = _cfg
317 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
318 .expect("a SharedClientProtocol is required");
319 #[allow(unused_mut)]
320 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
321 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
322 })?;
323 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
324 let generic = generic_builder.build();
325 let error_code = match generic.code() {
326 ::std::option::Option::Some(code) => code,
327 ::std::option::Option::None => {
328 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
329 ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::get_table::GetTableError::unhandled(generic)),
330 ))
331 }
332 };
333 let _error_message = generic.message().map(|msg| msg.to_owned());
334 let err = match error_code {
335 "EntityNotFoundException" => crate::operation::get_table::GetTableError::EntityNotFoundException({
336 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
337 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
338 e,
339 ))
340 })?;
341 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
342 tmp.deserialize_members(&mut *deser).map_err(|e| {
343 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
344 e,
345 ))
346 })?;
347 if tmp.message.is_none() {
348 tmp.message = _error_message;
349 }
350 let tmp = tmp.meta(generic);
351 tmp.build()
352 }),
353 "FederationSourceException" => crate::operation::get_table::GetTableError::FederationSourceException({
354 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
355 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
356 e,
357 ))
358 })?;
359 let mut tmp = <crate::types::error::builders::FederationSourceExceptionBuilder>::default();
360 tmp.deserialize_members(&mut *deser).map_err(|e| {
361 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
362 e,
363 ))
364 })?;
365 if tmp.message.is_none() {
366 tmp.message = _error_message;
367 }
368 let tmp = tmp.meta(generic);
369 tmp.build()
370 }),
371 "FederationSourceRetryableException" => crate::operation::get_table::GetTableError::FederationSourceRetryableException({
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::FederationSourceRetryableExceptionBuilder>::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 "GlueEncryptionException" => crate::operation::get_table::GetTableError::GlueEncryptionException({
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::GlueEncryptionExceptionBuilder>::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 "InternalServiceException" => crate::operation::get_table::GetTableError::InternalServiceException({
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::InternalServiceExceptionBuilder>::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 "InvalidInputException" => crate::operation::get_table::GetTableError::InvalidInputException({
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::InvalidInputExceptionBuilder>::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 "OperationTimeoutException" => crate::operation::get_table::GetTableError::OperationTimeoutException({
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::OperationTimeoutExceptionBuilder>::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 "ResourceNotReadyException" => crate::operation::get_table::GetTableError::ResourceNotReadyException({
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::ResourceNotReadyExceptionBuilder>::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 _ => {
480 match protocol
488 .deserialize_error_response(response, _cfg)
489 .ok()
490 .and_then(|mut deser| {
491 ::aws_smithy_schema::registry::reify_error(
492 crate::operation::get_table::error_registry::REGISTRY
493 .or(&crate::error_type_registry::REGISTRY),
494 error_code,
495 &mut *deser,
496 )
497 }) {
498 ::std::option::Option::Some(source) => <crate::operation::get_table::GetTableError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
499 ::std::option::Option::None => crate::operation::get_table::GetTableError::generic(generic),
500 }
501 }
502 };
503 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
504 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
505 ))
506 } else {
507 let protocol = _cfg
508 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
509 .expect("a SharedClientProtocol is required");
510 let mut deser = protocol.deserialize_response(response, GetTable::OUTPUT_SCHEMA, _cfg).map_err(|e| {
511 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
512 })?;
513 let _response_headers = headers;
517 #[allow(unused_mut)]
521 let mut output = <crate::operation::get_table::builders::GetTableOutputBuilder>::default();
522 output.deserialize_members(&mut *deser).map_err(|e| {
523 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
524 })?;
525 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
526 let output = output.build();
527 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
528 }
529 }
530}
531#[derive(Debug)]
532struct GetTableRequestSerializer;
533impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetTableRequestSerializer {
534 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
535 fn serialize_input(
536 &self,
537 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
538 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
539 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
540 let input = input.downcast::<crate::operation::get_table::GetTableInput>().expect("correct type");
541
542 let protocol = _cfg
543 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
544 .expect("a SharedClientProtocol is required");
545 let mut request = protocol
546 .serialize_request(&input, GetTable::INPUT_SCHEMA, "/", _cfg)
547 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
548
549 return ::std::result::Result::Ok(request);
550 }
551}
552#[derive(Debug)]
553struct GetTableEndpointParamsInterceptor;
554
555#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
556impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetTableEndpointParamsInterceptor {
557 fn name(&self) -> &'static str {
558 "GetTableEndpointParamsInterceptor"
559 }
560
561 fn read_before_execution(
562 &self,
563 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
564 '_,
565 ::aws_smithy_runtime_api::client::interceptors::context::Input,
566 ::aws_smithy_runtime_api::client::interceptors::context::Output,
567 ::aws_smithy_runtime_api::client::interceptors::context::Error,
568 >,
569 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
570 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
571 let _input = context
572 .input()
573 .downcast_ref::<GetTableInput>()
574 .ok_or("failed to downcast to GetTableInput")?;
575
576 let params = crate::config::endpoint::Params::builder()
577 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
578 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
579 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
580 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
581 .build()
582 .map_err(|err| {
583 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
584 })?;
585 cfg.interceptor_state()
586 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
587 ::std::result::Result::Ok(())
588 }
589}
590
591#[non_exhaustive]
596#[derive(::std::fmt::Debug)]
597pub enum GetTableError {
598 EntityNotFoundException(crate::types::error::EntityNotFoundException),
600 FederationSourceException(crate::types::error::FederationSourceException),
602 FederationSourceRetryableException(crate::types::error::FederationSourceRetryableException),
604 GlueEncryptionException(crate::types::error::GlueEncryptionException),
606 InternalServiceException(crate::types::error::InternalServiceException),
608 InvalidInputException(crate::types::error::InvalidInputException),
610 OperationTimeoutException(crate::types::error::OperationTimeoutException),
612 ResourceNotReadyException(crate::types::error::ResourceNotReadyException),
614 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
616 variable wildcard pattern and check `.code()`:
617 \
618 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
619 \
620 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetTableError) for what information is available for the error.")]
621 Unhandled(crate::error::sealed_unhandled::Unhandled),
622}
623impl GetTableError {
624 pub fn unhandled(
626 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
627 ) -> Self {
628 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
629 source: err.into(),
630 meta: ::std::default::Default::default(),
631 })
632 }
633
634 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
636 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
637 source: err.clone().into(),
638 meta: err,
639 })
640 }
641 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
646 match self {
647 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
648 Self::FederationSourceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
649 Self::FederationSourceRetryableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
650 Self::GlueEncryptionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
651 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
652 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
653 Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
654 Self::ResourceNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
655 Self::Unhandled(e) => &e.meta,
656 }
657 }
658 pub fn is_entity_not_found_exception(&self) -> bool {
660 matches!(self, Self::EntityNotFoundException(_))
661 }
662 pub fn is_federation_source_exception(&self) -> bool {
664 matches!(self, Self::FederationSourceException(_))
665 }
666 pub fn is_federation_source_retryable_exception(&self) -> bool {
668 matches!(self, Self::FederationSourceRetryableException(_))
669 }
670 pub fn is_glue_encryption_exception(&self) -> bool {
672 matches!(self, Self::GlueEncryptionException(_))
673 }
674 pub fn is_internal_service_exception(&self) -> bool {
676 matches!(self, Self::InternalServiceException(_))
677 }
678 pub fn is_invalid_input_exception(&self) -> bool {
680 matches!(self, Self::InvalidInputException(_))
681 }
682 pub fn is_operation_timeout_exception(&self) -> bool {
684 matches!(self, Self::OperationTimeoutException(_))
685 }
686 pub fn is_resource_not_ready_exception(&self) -> bool {
688 matches!(self, Self::ResourceNotReadyException(_))
689 }
690}
691impl ::std::error::Error for GetTableError {
692 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
693 match self {
694 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
695 Self::FederationSourceException(_inner) => ::std::option::Option::Some(_inner),
696 Self::FederationSourceRetryableException(_inner) => ::std::option::Option::Some(_inner),
697 Self::GlueEncryptionException(_inner) => ::std::option::Option::Some(_inner),
698 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
699 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
700 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
701 Self::ResourceNotReadyException(_inner) => ::std::option::Option::Some(_inner),
702 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
703 }
704 }
705}
706impl ::std::fmt::Display for GetTableError {
707 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
708 match self {
709 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
710 Self::FederationSourceException(_inner) => _inner.fmt(f),
711 Self::FederationSourceRetryableException(_inner) => _inner.fmt(f),
712 Self::GlueEncryptionException(_inner) => _inner.fmt(f),
713 Self::InternalServiceException(_inner) => _inner.fmt(f),
714 Self::InvalidInputException(_inner) => _inner.fmt(f),
715 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
716 Self::ResourceNotReadyException(_inner) => _inner.fmt(f),
717 Self::Unhandled(_inner) => {
718 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
719 write!(f, "unhandled error ({code})")
720 } else {
721 f.write_str("unhandled error")
722 }
723 }
724 }
725 }
726}
727impl ::aws_smithy_types::retry::ProvideErrorKind for GetTableError {
728 fn code(&self) -> ::std::option::Option<&str> {
729 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
730 }
731 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
732 ::std::option::Option::None
733 }
734}
735impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetTableError {
736 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
737 match self {
738 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
739 Self::FederationSourceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
740 Self::FederationSourceRetryableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
741 Self::GlueEncryptionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
742 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
743 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
744 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
745 Self::ResourceNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
746 Self::Unhandled(_inner) => &_inner.meta,
747 }
748 }
749}
750impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetTableError {
751 fn create_unhandled_error(
752 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
753 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
754 ) -> Self {
755 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
756 source,
757 meta: meta.unwrap_or_default(),
758 })
759 }
760}
761impl ::aws_types::request_id::RequestId for crate::operation::get_table::GetTableError {
762 fn request_id(&self) -> Option<&str> {
763 self.meta().request_id()
764 }
765}
766
767pub use crate::operation::get_table::_get_table_input::GetTableInput;
768
769pub use crate::operation::get_table::_get_table_output::GetTableOutput;
770
771mod _get_table_input;
772
773mod _get_table_output;
774
775pub mod builders;