1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct ExecuteTransaction;
6impl ExecuteTransaction {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::execute_transaction::ExecuteTransactionInput::SCHEMA;
13 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::execute_transaction::ExecuteTransactionOutput::SCHEMA;
15 pub(crate) async fn orchestrate(
16 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17 input: crate::operation::execute_transaction::ExecuteTransactionInput,
18 ) -> ::std::result::Result<crate::operation::execute_transaction::ExecuteTransactionOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::execute_transaction::ExecuteTransactionError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
19 let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<::aws_smithy_runtime_api::client::interceptors::context::Error, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>| {
20 err.map_service_error(|err| {
21 err.downcast::<crate::operation::execute_transaction::ExecuteTransactionError>().expect("correct error type")
22 })
23 };
24 let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
25 .await
26 .map_err(map_err)?;
27 let output = context.finalize().map_err(map_err)?;
28 ::std::result::Result::Ok(output.downcast::<crate::operation::execute_transaction::ExecuteTransactionOutput>().expect("correct output type"))
29 }
30
31 pub(crate) async fn orchestrate_with_stop_point(
32 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
33 input: crate::operation::execute_transaction::ExecuteTransactionInput,
34 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
35 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext, ::aws_smithy_runtime_api::client::result::SdkError<::aws_smithy_runtime_api::client::interceptors::context::Error, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
36 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
37 use ::tracing::Instrument;
38 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
39 "DynamoDB",
40 "ExecuteTransaction",
41 input,
42 runtime_plugins,
43 stop_point
44 )
45 .instrument(::tracing::debug_span!(
48 "DynamoDB.ExecuteTransaction",
49 "rpc.service" = "DynamoDB",
50 "rpc.method" = "ExecuteTransaction",
51 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
52 "rpc.system" = "aws-api",
53 ))
54 .await
55 }
56
57 pub(crate) fn operation_runtime_plugins(
58 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
59 client_config: &crate::config::Config,
60 config_override: ::std::option::Option<crate::config::Builder>,
61 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
62 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
63 runtime_plugins = runtime_plugins
64 .with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new(|token_provider, input| {
65 let input: &mut crate::operation::execute_transaction::ExecuteTransactionInput = input.downcast_mut().expect("correct type");
66 if input.client_request_token.is_none() {
67 input.client_request_token = ::std::option::Option::Some(token_provider.make_idempotency_token());
68 }
69 }));
70 if let ::std::option::Option::Some(config_override) = config_override {
71 for plugin in config_override.runtime_plugins.iter().cloned() {
72 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
73 }
74 runtime_plugins = runtime_plugins.with_operation_plugin(
75 crate::config::ConfigOverrideRuntimePlugin::new(config_override, client_config.config.clone(), &client_config.runtime_components)
76 );
77 }
78 runtime_plugins
79 }
80}
81impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ExecuteTransaction {
82 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
83 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ExecuteTransaction");
84
85 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(ExecuteTransactionRequestSerializer));
86 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(ExecuteTransactionResponseDeserializer));
87
88 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
89 crate::config::auth::Params::builder()
90 .operation_name("ExecuteTransaction")
91 .build()
92 .expect("required fields set")
93 ));
94
95 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
96 "ExecuteTransaction",
97 "DynamoDB",
98 ));
99let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
100 signing_options.double_uri_encode = true;
101 signing_options.content_sha256_header = false;
102 signing_options.normalize_uri_path = true;
103 signing_options.payload_override = None;
104
105 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
106 signing_options,
107 ..::std::default::Default::default()
108 });
109
110 ::std::option::Option::Some(cfg.freeze())
111 }
112
113 fn runtime_components(&self, _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
114 #[allow(unused_mut)]
115 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ExecuteTransaction")
116 .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
117.with_interceptor(ExecuteTransactionEndpointParamsInterceptor)
118 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<crate::operation::execute_transaction::ExecuteTransactionError>::new())
119.with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<crate::operation::execute_transaction::ExecuteTransactionError>::new())
120.with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<crate::operation::execute_transaction::ExecuteTransactionError>::new());
121
122 ::std::borrow::Cow::Owned(rcb)
123 }
124 }
125
126
127#[derive(Debug)]
128 struct ExecuteTransactionResponseDeserializer;
129 impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ExecuteTransactionResponseDeserializer {
130
131
132 fn deserialize_nonstreaming_with_config(&self, response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse, _cfg: &::aws_smithy_types::config_bag::ConfigBag) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
133 let (success, status) = (response.status().is_success(), response.status().as_u16());
134 #[allow(unused_mut)]
135 let mut force_error = false;
136 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
137 if !success && status != 200 || force_error {
138 let headers = response.headers();
139 let body = response.body().bytes().expect("body loaded");
140#[allow(unused_mut)]
141 let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body)
142 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
143 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
144 let generic = generic_builder.build();
145let error_code = match generic.code() {
146 ::std::option::Option::Some(code) => code,
147 ::std::option::Option::None => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::execute_transaction::ExecuteTransactionError::unhandled(generic)))),
148 };
149 let _error_message = generic.message().map(|msg| msg.to_owned());
150 let protocol = _cfg.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
151 .expect("a SharedClientProtocol is required");
152let err = match error_code {
153"IdempotentParameterMismatchException" => crate::operation::execute_transaction::ExecuteTransactionError::IdempotentParameterMismatchException({
154let mut tmp = match protocol.deserialize_response(response, crate::types::error::IdempotentParameterMismatchException::SCHEMA, _cfg)
155 .and_then(|mut deser| crate::types::error::IdempotentParameterMismatchException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
156 {
157 ::std::result::Result::Ok(val) => val,
158 ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
159 };
160 tmp.meta = generic;
161if tmp.message.is_none() {
162 tmp.message = _error_message;
163 }
164tmp
165}),
166"InternalServerError" => crate::operation::execute_transaction::ExecuteTransactionError::InternalServerError({
167let mut tmp = match protocol.deserialize_response(response, crate::types::error::InternalServerError::SCHEMA, _cfg)
168 .and_then(|mut deser| crate::types::error::InternalServerError::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
169 {
170 ::std::result::Result::Ok(val) => val,
171 ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
172 };
173 tmp.meta = generic;
174if tmp.message.is_none() {
175 tmp.message = _error_message;
176 }
177tmp
178}),
179"ProvisionedThroughputExceededException" => crate::operation::execute_transaction::ExecuteTransactionError::ProvisionedThroughputExceededException({
180let mut tmp = match protocol.deserialize_response(response, crate::types::error::ProvisionedThroughputExceededException::SCHEMA, _cfg)
181 .and_then(|mut deser| crate::types::error::ProvisionedThroughputExceededException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
182 {
183 ::std::result::Result::Ok(val) => val,
184 ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
185 };
186 tmp.meta = generic;
187if tmp.message.is_none() {
188 tmp.message = _error_message;
189 }
190tmp
191}),
192"RequestLimitExceeded" => crate::operation::execute_transaction::ExecuteTransactionError::RequestLimitExceeded({
193let mut tmp = match protocol.deserialize_response(response, crate::types::error::RequestLimitExceeded::SCHEMA, _cfg)
194 .and_then(|mut deser| crate::types::error::RequestLimitExceeded::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
195 {
196 ::std::result::Result::Ok(val) => val,
197 ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
198 };
199 tmp.meta = generic;
200if tmp.message.is_none() {
201 tmp.message = _error_message;
202 }
203tmp
204}),
205"ResourceNotFoundException" => crate::operation::execute_transaction::ExecuteTransactionError::ResourceNotFoundException({
206let mut tmp = match protocol.deserialize_response(response, crate::types::error::ResourceNotFoundException::SCHEMA, _cfg)
207 .and_then(|mut deser| crate::types::error::ResourceNotFoundException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
208 {
209 ::std::result::Result::Ok(val) => val,
210 ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
211 };
212 tmp.meta = generic;
213if tmp.message.is_none() {
214 tmp.message = _error_message;
215 }
216tmp
217}),
218"ThrottlingException" => crate::operation::execute_transaction::ExecuteTransactionError::ThrottlingException({
219let mut tmp = match protocol.deserialize_response(response, crate::types::error::ThrottlingException::SCHEMA, _cfg)
220 .and_then(|mut deser| crate::types::error::ThrottlingException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
221 {
222 ::std::result::Result::Ok(val) => val,
223 ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
224 };
225 tmp.meta = generic;
226if tmp.message.is_none() {
227 tmp.message = _error_message;
228 }
229tmp
230}),
231"TransactionCanceledException" => crate::operation::execute_transaction::ExecuteTransactionError::TransactionCanceledException({
232let mut tmp = match protocol.deserialize_response(response, crate::types::error::TransactionCanceledException::SCHEMA, _cfg)
233 .and_then(|mut deser| crate::types::error::TransactionCanceledException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
234 {
235 ::std::result::Result::Ok(val) => val,
236 ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
237 };
238 tmp.meta = generic;
239if tmp.message.is_none() {
240 tmp.message = _error_message;
241 }
242tmp
243}),
244"TransactionInProgressException" => crate::operation::execute_transaction::ExecuteTransactionError::TransactionInProgressException({
245let mut tmp = match protocol.deserialize_response(response, crate::types::error::TransactionInProgressException::SCHEMA, _cfg)
246 .and_then(|mut deser| crate::types::error::TransactionInProgressException::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body))
247 {
248 ::std::result::Result::Ok(val) => val,
249 ::std::result::Result::Err(e) => return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))),
250 };
251 tmp.meta = generic;
252if tmp.message.is_none() {
253 tmp.message = _error_message;
254 }
255tmp
256}),
257_ => crate::operation::execute_transaction::ExecuteTransactionError::generic(generic)
258};
259 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err)))
260} else {
261 let protocol = _cfg.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
262 .expect("a SharedClientProtocol is required");
263 let mut deser = protocol.deserialize_response(response, ExecuteTransaction::OUTPUT_SCHEMA, _cfg)
264 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
265 let body = response.body().bytes().expect("body loaded");
266 let output = crate::operation::execute_transaction::ExecuteTransactionOutput::deserialize_with_response(
267 &mut *deser,
268 response.headers(),
269 response.status().into(),
270 body,
271 ).map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
272 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
273 }
274 }
275 }
276#[derive(Debug)]
277 struct ExecuteTransactionRequestSerializer;
278 impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ExecuteTransactionRequestSerializer {
279 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
280 fn serialize_input(&self, input: ::aws_smithy_runtime_api::client::interceptors::context::Input, _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
281 let input = input.downcast::<crate::operation::execute_transaction::ExecuteTransactionInput>().expect("correct type");
282 let protocol = _cfg.load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
283 .expect("a SharedClientProtocol is required");
284 let mut request = protocol.serialize_request(
285 &input, ExecuteTransaction::INPUT_SCHEMA, "", _cfg,
286 ).map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
287
288 return ::std::result::Result::Ok(request);
289 }
290 }
291#[derive(Debug)]
292 struct ExecuteTransactionEndpointParamsInterceptor;
293
294 impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ExecuteTransactionEndpointParamsInterceptor {
295 fn name(&self) -> &'static str {
296 "ExecuteTransactionEndpointParamsInterceptor"
297 }
298
299 fn read_before_execution(
300 &self,
301 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<'_, ::aws_smithy_runtime_api::client::interceptors::context::Input, ::aws_smithy_runtime_api::client::interceptors::context::Output, ::aws_smithy_runtime_api::client::interceptors::context::Error>,
302 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
303 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
304 let _input = context.input()
305 .downcast_ref::<ExecuteTransactionInput>()
306 .ok_or("failed to downcast to ExecuteTransactionInput")?;
307
308
309
310 let params = crate::config::endpoint::Params::builder()
311 .set_region(cfg.load::<::aws_types::region::Region>().map(|r|r.as_ref().to_owned()))
312.set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
313.set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
314.set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
315.set_account_id_endpoint_mode(::std::option::Option::Some(cfg.load::<::aws_types::endpoint_config::AccountIdEndpointMode>().cloned().unwrap_or_default().to_string()))
316 .build()
317 .map_err(|err| ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err))?;
318 cfg.interceptor_state().store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
319 ::std::result::Result::Ok(())
320 }
321 }
322
323 #[non_exhaustive]
330#[derive(::std::fmt::Debug)]
331pub enum ExecuteTransactionError {
332 IdempotentParameterMismatchException(crate::types::error::IdempotentParameterMismatchException),
334 InternalServerError(crate::types::error::InternalServerError),
336 ProvisionedThroughputExceededException(crate::types::error::ProvisionedThroughputExceededException),
338 RequestLimitExceeded(crate::types::error::RequestLimitExceeded),
340 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
342 ThrottlingException(crate::types::error::ThrottlingException),
344 TransactionCanceledException(crate::types::error::TransactionCanceledException),
477 TransactionInProgressException(crate::types::error::TransactionInProgressException),
510 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
512 variable wildcard pattern and check `.code()`:
513 \
514 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
515 \
516 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ExecuteTransactionError) for what information is available for the error.")]
517 Unhandled(crate::error::sealed_unhandled::Unhandled),
518}
519impl ExecuteTransactionError {
520 pub fn unhandled(err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>) -> Self {
522 Self::Unhandled(crate::error::sealed_unhandled::Unhandled { source: err.into(), meta: ::std::default::Default::default() })
523 }
524
525 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
527 Self::Unhandled(crate::error::sealed_unhandled::Unhandled { source: err.clone().into(), meta: err })
528 }
529 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
534 match self {
535 Self::IdempotentParameterMismatchException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
536 Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
537 Self::ProvisionedThroughputExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
538 Self::RequestLimitExceeded(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
539 Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
540 Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
541 Self::TransactionCanceledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
542 Self::TransactionInProgressException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
543 Self::Unhandled(e) => &e.meta,
544 }
545 }
546 pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
548 matches!(self, Self::IdempotentParameterMismatchException(_))
549 }
550 pub fn is_internal_server_error(&self) -> bool {
552 matches!(self, Self::InternalServerError(_))
553 }
554 pub fn is_provisioned_throughput_exceeded_exception(&self) -> bool {
556 matches!(self, Self::ProvisionedThroughputExceededException(_))
557 }
558 pub fn is_request_limit_exceeded(&self) -> bool {
560 matches!(self, Self::RequestLimitExceeded(_))
561 }
562 pub fn is_resource_not_found_exception(&self) -> bool {
564 matches!(self, Self::ResourceNotFoundException(_))
565 }
566 pub fn is_throttling_exception(&self) -> bool {
568 matches!(self, Self::ThrottlingException(_))
569 }
570 pub fn is_transaction_canceled_exception(&self) -> bool {
572 matches!(self, Self::TransactionCanceledException(_))
573 }
574 pub fn is_transaction_in_progress_exception(&self) -> bool {
576 matches!(self, Self::TransactionInProgressException(_))
577 }
578}
579impl ::std::error::Error for ExecuteTransactionError {
580 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
581 match self {
582 Self::IdempotentParameterMismatchException(_inner) =>
583 ::std::option::Option::Some(_inner)
584 ,
585 Self::InternalServerError(_inner) =>
586 ::std::option::Option::Some(_inner)
587 ,
588 Self::ProvisionedThroughputExceededException(_inner) =>
589 ::std::option::Option::Some(_inner)
590 ,
591 Self::RequestLimitExceeded(_inner) =>
592 ::std::option::Option::Some(_inner)
593 ,
594 Self::ResourceNotFoundException(_inner) =>
595 ::std::option::Option::Some(_inner)
596 ,
597 Self::ThrottlingException(_inner) =>
598 ::std::option::Option::Some(_inner)
599 ,
600 Self::TransactionCanceledException(_inner) =>
601 ::std::option::Option::Some(_inner)
602 ,
603 Self::TransactionInProgressException(_inner) =>
604 ::std::option::Option::Some(_inner)
605 ,
606 Self::Unhandled(_inner) => {
607 ::std::option::Option::Some(&*_inner.source)
608 }
609 }
610 }
611}
612impl ::std::fmt::Display for ExecuteTransactionError {
613 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
614 match self {
615 Self::IdempotentParameterMismatchException(_inner) =>
616 _inner.fmt(f)
617 ,
618 Self::InternalServerError(_inner) =>
619 _inner.fmt(f)
620 ,
621 Self::ProvisionedThroughputExceededException(_inner) =>
622 _inner.fmt(f)
623 ,
624 Self::RequestLimitExceeded(_inner) =>
625 _inner.fmt(f)
626 ,
627 Self::ResourceNotFoundException(_inner) =>
628 _inner.fmt(f)
629 ,
630 Self::ThrottlingException(_inner) =>
631 _inner.fmt(f)
632 ,
633 Self::TransactionCanceledException(_inner) =>
634 _inner.fmt(f)
635 ,
636 Self::TransactionInProgressException(_inner) =>
637 _inner.fmt(f)
638 ,
639 Self::Unhandled(_inner) => {
640 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
641 write!(f, "unhandled error ({code})")
642 } else {
643 f.write_str("unhandled error")
644 }
645 }
646 }
647 }
648}
649impl ::aws_smithy_types::retry::ProvideErrorKind for ExecuteTransactionError {
650 fn code(&self) -> ::std::option::Option<&str> {
651 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
652 }
653 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
654 ::std::option::Option::None
655 }
656}
657impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ExecuteTransactionError {
658 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
659 match self {
660 Self::IdempotentParameterMismatchException(_inner) =>
661 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
662 ,
663 Self::InternalServerError(_inner) =>
664 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
665 ,
666 Self::ProvisionedThroughputExceededException(_inner) =>
667 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
668 ,
669 Self::RequestLimitExceeded(_inner) =>
670 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
671 ,
672 Self::ResourceNotFoundException(_inner) =>
673 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
674 ,
675 Self::ThrottlingException(_inner) =>
676 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
677 ,
678 Self::TransactionCanceledException(_inner) =>
679 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
680 ,
681 Self::TransactionInProgressException(_inner) =>
682 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
683 ,
684 Self::Unhandled(_inner) => {
685 &_inner.meta
686 }
687 }
688 }
689}
690impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ExecuteTransactionError {
691 fn create_unhandled_error(
692 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
693 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>
694 ) -> Self {
695 Self::Unhandled(crate::error::sealed_unhandled::Unhandled { source, meta: meta.unwrap_or_default() })
696 }
697}
698impl ::aws_types::request_id::RequestId for crate::operation::execute_transaction::ExecuteTransactionError {
699 fn request_id(&self) -> Option<&str> {
700 self.meta().request_id()
701 }
702 }
703
704pub use crate::operation::execute_transaction::_execute_transaction_input::ExecuteTransactionInput;
705
706pub use crate::operation::execute_transaction::_execute_transaction_output::ExecuteTransactionOutput;
707
708mod _execute_transaction_input;
709
710mod _execute_transaction_output;
711
712pub mod builders;
714