1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct DescribeEntity;
6impl DescribeEntity {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::describe_entity::DescribeEntityInput::SCHEMA;
13 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::describe_entity::DescribeEntityOutput::SCHEMA;
15 pub(crate) async fn orchestrate(
16 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17 input: crate::operation::describe_entity::DescribeEntityInput,
18 ) -> ::std::result::Result<
19 crate::operation::describe_entity::DescribeEntityOutput,
20 ::aws_smithy_runtime_api::client::result::SdkError<
21 crate::operation::describe_entity::DescribeEntityError,
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::describe_entity::DescribeEntityError>()
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::describe_entity::DescribeEntityOutput>()
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::describe_entity::DescribeEntityInput,
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", "DescribeEntity", input, runtime_plugins, stop_point)
59 .instrument(::tracing::debug_span!(
62 "Glue.DescribeEntity",
63 "rpc.service" = "Glue",
64 "rpc.method" = "DescribeEntity",
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::EntityNotFoundException::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::EntityNotFoundException::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::EntityNotFoundException::deserialize(d)?))
118 },
119 )
120.insert_error_shape(
121 crate::types::error::FederationSourceException::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::FederationSourceException::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::FederationSourceException::deserialize(d)?))
127 },
128 )
129.insert_error_shape(
130 crate::types::error::GlueEncryptionException::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::GlueEncryptionException::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::GlueEncryptionException::deserialize(d)?))
136 },
137 )
138.insert_error_shape(
139 crate::types::error::InvalidInputException::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::InvalidInputException::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::InvalidInputException::deserialize(d)?))
145 },
146 )
147.insert_error_shape(
148 crate::types::error::OperationTimeoutException::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::OperationTimeoutException::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::OperationTimeoutException::deserialize(d)?))
154 },
155 )
156.insert_error_shape(
157 crate::types::error::ValidationException::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::ValidationException::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::ValidationException::deserialize(d)?))
163 },
164 )
165 .build()
166 });
167}
168impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DescribeEntity {
169 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
170 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DescribeEntity");
171
172 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
173 DescribeEntityRequestSerializer,
174 ));
175 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
176 DescribeEntityResponseDeserializer,
177 ));
178
179 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
180 crate::config::auth::Params::builder()
181 .operation_name("DescribeEntity")
182 .build()
183 .expect("required fields set"),
184 ));
185
186 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("DescribeEntity", "Glue"));
187 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
188 signing_options.double_uri_encode = true;
189 signing_options.content_sha256_header = false;
190 signing_options.normalize_uri_path = true;
191 signing_options.payload_override = None;
192
193 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
194 signing_options,
195 ..::std::default::Default::default()
196 });
197
198 ::std::option::Option::Some(cfg.freeze())
199 }
200
201 fn runtime_components(
202 &self,
203 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
204 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
205 #[allow(unused_mut)]
206 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DescribeEntity")
207 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
208 DescribeEntityTelemetryInputCaptureInterceptor,
209 ))
210 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
211 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
212 ))
213 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
214 DescribeEntityEndpointParamsInterceptor,
215 ))
216 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
217 crate::operation::describe_entity::DescribeEntityError,
218 >::new())
219 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
220 crate::operation::describe_entity::DescribeEntityError,
221 >::new())
222 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
223 crate::operation::describe_entity::DescribeEntityError,
224 >::new())
225 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
226 crate::operation::describe_entity::DescribeEntityError,
227 >::new());
228
229 ::std::borrow::Cow::Owned(rcb)
230 }
231}
232
233#[derive(Debug)]
234struct DescribeEntityTelemetryInputCaptureInterceptor;
235
236#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
237impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeEntityTelemetryInputCaptureInterceptor {
238 fn name(&self) -> &'static str {
239 "DescribeEntityTelemetryInputCaptureInterceptor"
240 }
241
242 fn read_before_execution(
243 &self,
244 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
245 '_,
246 ::aws_smithy_runtime_api::client::interceptors::context::Input,
247 ::aws_smithy_runtime_api::client::interceptors::context::Output,
248 ::aws_smithy_runtime_api::client::interceptors::context::Error,
249 >,
250 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
251 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
252 let ::std::option::Option::Some(requested) = cfg
254 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
255 .filter(|r| !r.is_empty())
256 else {
257 return ::std::result::Result::Ok(());
258 };
259
260 let ::std::option::Option::Some(input) = context.input().downcast_ref::<DescribeEntityInput>() else {
261 return ::std::result::Result::Ok(());
263 };
264
265 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
266 if requested.should_capture("ConnectionName") {
267 if let ::std::option::Option::Some(value) = input.connection_name.as_deref() {
268 captured.insert("ConnectionName", value);
269 }
270 }
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("EntityName") {
277 if let ::std::option::Option::Some(value) = input.entity_name.as_deref() {
278 captured.insert("EntityName", value);
279 }
280 }
281 if requested.should_capture("NextToken") {
282 if let ::std::option::Option::Some(value) = input.next_token.as_deref() {
283 captured.insert("NextToken", value);
284 }
285 }
286 if requested.should_capture("DataStoreApiVersion") {
287 if let ::std::option::Option::Some(value) = input.data_store_api_version.as_deref() {
288 captured.insert("DataStoreApiVersion", value);
289 }
290 }
291
292 cfg.interceptor_state().store_put(captured);
293 ::std::result::Result::Ok(())
294 }
295}
296#[derive(Debug)]
297struct DescribeEntityResponseDeserializer;
298impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeEntityResponseDeserializer {
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::describe_entity::DescribeEntityError::unhandled(
330 generic,
331 )),
332 ))
333 }
334 };
335 let _error_message = generic.message().map(|msg| msg.to_owned());
336 let err = match error_code {
337 "AccessDeniedException" => crate::operation::describe_entity::DescribeEntityError::AccessDeniedException({
338 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
339 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
340 e,
341 ))
342 })?;
343 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
344 tmp.deserialize_members(&mut *deser).map_err(|e| {
345 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
346 e,
347 ))
348 })?;
349 if tmp.message.is_none() {
350 tmp.message = _error_message;
351 }
352 let tmp = tmp.meta(generic);
353 tmp.build()
354 }),
355 "EntityNotFoundException" => crate::operation::describe_entity::DescribeEntityError::EntityNotFoundException({
356 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
357 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
358 e,
359 ))
360 })?;
361 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
362 tmp.deserialize_members(&mut *deser).map_err(|e| {
363 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
364 e,
365 ))
366 })?;
367 if tmp.message.is_none() {
368 tmp.message = _error_message;
369 }
370 let tmp = tmp.meta(generic);
371 tmp.build()
372 }),
373 "FederationSourceException" => crate::operation::describe_entity::DescribeEntityError::FederationSourceException({
374 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
375 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
376 e,
377 ))
378 })?;
379 let mut tmp = <crate::types::error::builders::FederationSourceExceptionBuilder>::default();
380 tmp.deserialize_members(&mut *deser).map_err(|e| {
381 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
382 e,
383 ))
384 })?;
385 if tmp.message.is_none() {
386 tmp.message = _error_message;
387 }
388 let tmp = tmp.meta(generic);
389 tmp.build()
390 }),
391 "GlueEncryptionException" => crate::operation::describe_entity::DescribeEntityError::GlueEncryptionException({
392 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
393 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
394 e,
395 ))
396 })?;
397 let mut tmp = <crate::types::error::builders::GlueEncryptionExceptionBuilder>::default();
398 tmp.deserialize_members(&mut *deser).map_err(|e| {
399 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
400 e,
401 ))
402 })?;
403 if tmp.message.is_none() {
404 tmp.message = _error_message;
405 }
406 let tmp = tmp.meta(generic);
407 tmp.build()
408 }),
409 "InvalidInputException" => crate::operation::describe_entity::DescribeEntityError::InvalidInputException({
410 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
411 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
412 e,
413 ))
414 })?;
415 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
416 tmp.deserialize_members(&mut *deser).map_err(|e| {
417 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
418 e,
419 ))
420 })?;
421 if tmp.message.is_none() {
422 tmp.message = _error_message;
423 }
424 let tmp = tmp.meta(generic);
425 tmp.build()
426 }),
427 "OperationTimeoutException" => crate::operation::describe_entity::DescribeEntityError::OperationTimeoutException({
428 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
429 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
430 e,
431 ))
432 })?;
433 let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
434 tmp.deserialize_members(&mut *deser).map_err(|e| {
435 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
436 e,
437 ))
438 })?;
439 if tmp.message.is_none() {
440 tmp.message = _error_message;
441 }
442 let tmp = tmp.meta(generic);
443 tmp.build()
444 }),
445 "ValidationException" => crate::operation::describe_entity::DescribeEntityError::ValidationException({
446 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
447 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
448 e,
449 ))
450 })?;
451 let mut tmp = <crate::types::error::builders::ValidationExceptionBuilder>::default();
452 tmp.deserialize_members(&mut *deser).map_err(|e| {
453 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
454 e,
455 ))
456 })?;
457 if tmp.message.is_none() {
458 tmp.message = _error_message;
459 }
460 let tmp = tmp.meta(generic);
461 tmp.build()
462 }),
463 _ => {
464 match protocol
472 .deserialize_error_response(response, _cfg)
473 .ok()
474 .and_then(|mut deser| {
475 ::aws_smithy_schema::registry::reify_error(
476 crate::operation::describe_entity::error_registry::REGISTRY
477 .or(&crate::error_type_registry::REGISTRY),
478 error_code,
479 &mut *deser,
480 )
481 }) {
482 ::std::option::Option::Some(source) => <crate::operation::describe_entity::DescribeEntityError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
483 ::std::option::Option::None => crate::operation::describe_entity::DescribeEntityError::generic(generic),
484 }
485 }
486 };
487 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
488 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
489 ))
490 } else {
491 let protocol = _cfg
492 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
493 .expect("a SharedClientProtocol is required");
494 let mut deser = protocol
495 .deserialize_response(response, DescribeEntity::OUTPUT_SCHEMA, _cfg)
496 .map_err(|e| {
497 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
498 })?;
499 let _response_headers = headers;
503 #[allow(unused_mut)]
507 let mut output = <crate::operation::describe_entity::builders::DescribeEntityOutputBuilder>::default();
508 output.deserialize_members(&mut *deser).map_err(|e| {
509 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
510 })?;
511 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
512 let output = output.build();
513 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
514 }
515 }
516}
517#[derive(Debug)]
518struct DescribeEntityRequestSerializer;
519impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeEntityRequestSerializer {
520 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
521 fn serialize_input(
522 &self,
523 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
524 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
525 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
526 let input = input
527 .downcast::<crate::operation::describe_entity::DescribeEntityInput>()
528 .expect("correct type");
529
530 let protocol = _cfg
531 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
532 .expect("a SharedClientProtocol is required");
533 let mut request = protocol
534 .serialize_request(&input, DescribeEntity::INPUT_SCHEMA, "/", _cfg)
535 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
536
537 return ::std::result::Result::Ok(request);
538 }
539}
540#[derive(Debug)]
541struct DescribeEntityEndpointParamsInterceptor;
542
543#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
544impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeEntityEndpointParamsInterceptor {
545 fn name(&self) -> &'static str {
546 "DescribeEntityEndpointParamsInterceptor"
547 }
548
549 fn read_before_execution(
550 &self,
551 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
552 '_,
553 ::aws_smithy_runtime_api::client::interceptors::context::Input,
554 ::aws_smithy_runtime_api::client::interceptors::context::Output,
555 ::aws_smithy_runtime_api::client::interceptors::context::Error,
556 >,
557 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
558 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
559 let _input = context
560 .input()
561 .downcast_ref::<DescribeEntityInput>()
562 .ok_or("failed to downcast to DescribeEntityInput")?;
563
564 let params = crate::config::endpoint::Params::builder()
565 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
566 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
567 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
568 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
569 .build()
570 .map_err(|err| {
571 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
572 })?;
573 cfg.interceptor_state()
574 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
575 ::std::result::Result::Ok(())
576 }
577}
578
579#[non_exhaustive]
584#[derive(::std::fmt::Debug)]
585pub enum DescribeEntityError {
586 AccessDeniedException(crate::types::error::AccessDeniedException),
588 EntityNotFoundException(crate::types::error::EntityNotFoundException),
590 FederationSourceException(crate::types::error::FederationSourceException),
592 GlueEncryptionException(crate::types::error::GlueEncryptionException),
594 InvalidInputException(crate::types::error::InvalidInputException),
596 OperationTimeoutException(crate::types::error::OperationTimeoutException),
598 ValidationException(crate::types::error::ValidationException),
600 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
602 variable wildcard pattern and check `.code()`:
603 \
604 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
605 \
606 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DescribeEntityError) for what information is available for the error.")]
607 Unhandled(crate::error::sealed_unhandled::Unhandled),
608}
609impl DescribeEntityError {
610 pub fn unhandled(
612 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
613 ) -> Self {
614 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
615 source: err.into(),
616 meta: ::std::default::Default::default(),
617 })
618 }
619
620 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
622 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
623 source: err.clone().into(),
624 meta: err,
625 })
626 }
627 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
632 match self {
633 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
634 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
635 Self::FederationSourceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
636 Self::GlueEncryptionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
637 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
638 Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
639 Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
640 Self::Unhandled(e) => &e.meta,
641 }
642 }
643 pub fn is_access_denied_exception(&self) -> bool {
645 matches!(self, Self::AccessDeniedException(_))
646 }
647 pub fn is_entity_not_found_exception(&self) -> bool {
649 matches!(self, Self::EntityNotFoundException(_))
650 }
651 pub fn is_federation_source_exception(&self) -> bool {
653 matches!(self, Self::FederationSourceException(_))
654 }
655 pub fn is_glue_encryption_exception(&self) -> bool {
657 matches!(self, Self::GlueEncryptionException(_))
658 }
659 pub fn is_invalid_input_exception(&self) -> bool {
661 matches!(self, Self::InvalidInputException(_))
662 }
663 pub fn is_operation_timeout_exception(&self) -> bool {
665 matches!(self, Self::OperationTimeoutException(_))
666 }
667 pub fn is_validation_exception(&self) -> bool {
669 matches!(self, Self::ValidationException(_))
670 }
671}
672impl ::std::error::Error for DescribeEntityError {
673 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
674 match self {
675 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
676 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
677 Self::FederationSourceException(_inner) => ::std::option::Option::Some(_inner),
678 Self::GlueEncryptionException(_inner) => ::std::option::Option::Some(_inner),
679 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
680 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
681 Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
682 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
683 }
684 }
685}
686impl ::std::fmt::Display for DescribeEntityError {
687 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
688 match self {
689 Self::AccessDeniedException(_inner) => _inner.fmt(f),
690 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
691 Self::FederationSourceException(_inner) => _inner.fmt(f),
692 Self::GlueEncryptionException(_inner) => _inner.fmt(f),
693 Self::InvalidInputException(_inner) => _inner.fmt(f),
694 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
695 Self::ValidationException(_inner) => _inner.fmt(f),
696 Self::Unhandled(_inner) => {
697 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
698 write!(f, "unhandled error ({code})")
699 } else {
700 f.write_str("unhandled error")
701 }
702 }
703 }
704 }
705}
706impl ::aws_smithy_types::retry::ProvideErrorKind for DescribeEntityError {
707 fn code(&self) -> ::std::option::Option<&str> {
708 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
709 }
710 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
711 ::std::option::Option::None
712 }
713}
714impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DescribeEntityError {
715 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
716 match self {
717 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
718 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
719 Self::FederationSourceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
720 Self::GlueEncryptionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
721 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
722 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
723 Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
724 Self::Unhandled(_inner) => &_inner.meta,
725 }
726 }
727}
728impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DescribeEntityError {
729 fn create_unhandled_error(
730 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
731 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
732 ) -> Self {
733 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
734 source,
735 meta: meta.unwrap_or_default(),
736 })
737 }
738}
739impl ::aws_types::request_id::RequestId for crate::operation::describe_entity::DescribeEntityError {
740 fn request_id(&self) -> Option<&str> {
741 self.meta().request_id()
742 }
743}
744
745pub use crate::operation::describe_entity::_describe_entity_input::DescribeEntityInput;
746
747pub use crate::operation::describe_entity::_describe_entity_output::DescribeEntityOutput;
748
749mod _describe_entity_input;
750
751mod _describe_entity_output;
752
753pub mod builders;
755
756pub mod paginator;