Skip to main content

aws_sdk_secretsmanager/operation/
update_secret.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `UpdateSecret`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateSecret;
6impl UpdateSecret {
7    /// Creates a new `UpdateSecret`
8    pub fn new() -> Self {
9        Self
10    }
11    /// The schema for this operation's input shape.
12    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::update_secret::UpdateSecretInput::SCHEMA;
13    /// The schema for this operation's output shape.
14    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::update_secret::UpdateSecretOutput::SCHEMA;
15    pub(crate) async fn orchestrate(
16        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17        input: crate::operation::update_secret::UpdateSecretInput,
18    ) -> ::std::result::Result<
19        crate::operation::update_secret::UpdateSecretOutput,
20        ::aws_smithy_runtime_api::client::result::SdkError<
21            crate::operation::update_secret::UpdateSecretError,
22            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
23        >,
24    > {
25        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
26            ::aws_smithy_runtime_api::client::interceptors::context::Error,
27            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
28        >| {
29            err.map_service_error(|err| {
30                err.downcast::<crate::operation::update_secret::UpdateSecretError>()
31                    .expect("correct error type")
32            })
33        };
34        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
35            .await
36            .map_err(map_err)?;
37        let output = context.finalize().map_err(map_err)?;
38        ::std::result::Result::Ok(
39            output
40                .downcast::<crate::operation::update_secret::UpdateSecretOutput>()
41                .expect("correct output type"),
42        )
43    }
44
45    pub(crate) async fn orchestrate_with_stop_point(
46        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
47        input: crate::operation::update_secret::UpdateSecretInput,
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("Secrets Manager", "UpdateSecret", input, runtime_plugins, stop_point)
59            // Create a parent span for the entire operation. Includes a random, internal-only,
60            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
61            .instrument(::tracing::debug_span!(
62                "Secrets Manager.UpdateSecret",
63                "rpc.service" = "Secrets Manager",
64                "rpc.method" = "UpdateSecret",
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        runtime_plugins = runtime_plugins.with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new(
78            |token_provider, input| {
79                let input: &mut crate::operation::update_secret::UpdateSecretInput = input.downcast_mut().expect("correct type");
80                if input.client_request_token.is_none() {
81                    input.client_request_token = ::std::option::Option::Some(token_provider.make_idempotency_token());
82                }
83            },
84        ));
85        if let ::std::option::Option::Some(config_override) = config_override {
86            for plugin in config_override.runtime_plugins.iter().cloned() {
87                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
88            }
89            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
90                config_override,
91                client_config.config.clone(),
92                &client_config.runtime_components,
93            ));
94        }
95        runtime_plugins
96    }
97}
98/// Per-operation error registry. Contains an entry for every modeled
99/// error this operation can throw.
100///
101/// Used by the schema-serde error path as the operation-scoped lookup
102/// for registry-backed error reification: an error code that does not
103/// match one of the operation's modeled errors directly is resolved
104/// against this registry first, then widened to the service-wide error
105/// registry.
106pub(crate) mod error_registry {
107    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
108        ::aws_smithy_schema::registry::TypeRegistry::builder()
109                            .insert_error_shape(
110                        crate::types::error::DecryptionFailure::SCHEMA,
111                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
112                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::DecryptionFailure::deserialize(d)?))
113                        },
114                        |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> {
115                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::DecryptionFailure::deserialize(d)?))
116                        },
117                    )
118.insert_error_shape(
119                        crate::types::error::EncryptionFailure::SCHEMA,
120                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
121                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EncryptionFailure::deserialize(d)?))
122                        },
123                        |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> {
124                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EncryptionFailure::deserialize(d)?))
125                        },
126                    )
127.insert_error_shape(
128                        crate::types::error::InternalServiceError::SCHEMA,
129                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
130                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceError::deserialize(d)?))
131                        },
132                        |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> {
133                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceError::deserialize(d)?))
134                        },
135                    )
136.insert_error_shape(
137                        crate::types::error::InvalidParameterException::SCHEMA,
138                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
139                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidParameterException::deserialize(d)?))
140                        },
141                        |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> {
142                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidParameterException::deserialize(d)?))
143                        },
144                    )
145.insert_error_shape(
146                        crate::types::error::InvalidRequestException::SCHEMA,
147                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
148                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidRequestException::deserialize(d)?))
149                        },
150                        |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> {
151                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidRequestException::deserialize(d)?))
152                        },
153                    )
154.insert_error_shape(
155                        crate::types::error::LimitExceededException::SCHEMA,
156                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
157                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::LimitExceededException::deserialize(d)?))
158                        },
159                        |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> {
160                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::LimitExceededException::deserialize(d)?))
161                        },
162                    )
163.insert_error_shape(
164                        crate::types::error::MalformedPolicyDocumentException::SCHEMA,
165                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
166                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::MalformedPolicyDocumentException::deserialize(d)?))
167                        },
168                        |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> {
169                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::MalformedPolicyDocumentException::deserialize(d)?))
170                        },
171                    )
172.insert_error_shape(
173                        crate::types::error::PreconditionNotMetException::SCHEMA,
174                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
175                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::PreconditionNotMetException::deserialize(d)?))
176                        },
177                        |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> {
178                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::PreconditionNotMetException::deserialize(d)?))
179                        },
180                    )
181.insert_error_shape(
182                        crate::types::error::ResourceExistsException::SCHEMA,
183                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
184                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceExistsException::deserialize(d)?))
185                        },
186                        |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> {
187                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceExistsException::deserialize(d)?))
188                        },
189                    )
190.insert_error_shape(
191                        crate::types::error::ResourceNotFoundException::SCHEMA,
192                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
193                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceNotFoundException::deserialize(d)?))
194                        },
195                        |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> {
196                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceNotFoundException::deserialize(d)?))
197                        },
198                    )
199                            .build()
200    });
201}
202impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateSecret {
203    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
204        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateSecret");
205
206        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
207            UpdateSecretRequestSerializer,
208        ));
209        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
210            UpdateSecretResponseDeserializer,
211        ));
212
213        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
214            crate::config::auth::Params::builder()
215                .operation_name("UpdateSecret")
216                .build()
217                .expect("required fields set"),
218        ));
219
220        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
221            "UpdateSecret",
222            "Secrets Manager",
223        ));
224        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
225        signing_options.double_uri_encode = true;
226        signing_options.content_sha256_header = false;
227        signing_options.normalize_uri_path = true;
228        signing_options.payload_override = None;
229
230        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
231            signing_options,
232            ..::std::default::Default::default()
233        });
234
235        ::std::option::Option::Some(cfg.freeze())
236    }
237
238    fn runtime_components(
239        &self,
240        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
241    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
242        #[allow(unused_mut)]
243        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateSecret")
244            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
245                UpdateSecretTelemetryInputCaptureInterceptor,
246            ))
247            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
248                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
249            ))
250            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
251                UpdateSecretEndpointParamsInterceptor,
252            ))
253            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
254                crate::operation::update_secret::UpdateSecretError,
255            >::new())
256            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
257                crate::operation::update_secret::UpdateSecretError,
258            >::new())
259            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
260                crate::operation::update_secret::UpdateSecretError,
261            >::new())
262            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
263                crate::operation::update_secret::UpdateSecretError,
264            >::new());
265
266        ::std::borrow::Cow::Owned(rcb)
267    }
268}
269
270#[derive(Debug)]
271struct UpdateSecretTelemetryInputCaptureInterceptor;
272
273#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
274impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateSecretTelemetryInputCaptureInterceptor {
275    fn name(&self) -> &'static str {
276        "UpdateSecretTelemetryInputCaptureInterceptor"
277    }
278
279    fn read_before_execution(
280        &self,
281        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
282            '_,
283            ::aws_smithy_runtime_api::client::interceptors::context::Input,
284            ::aws_smithy_runtime_api::client::interceptors::context::Output,
285            ::aws_smithy_runtime_api::client::interceptors::context::Error,
286        >,
287        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
288    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
289        // Nothing to do unless the customer opted in by naming members to record.
290        let ::std::option::Option::Some(requested) = cfg
291            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
292            .filter(|r| !r.is_empty())
293        else {
294            return ::std::result::Result::Ok(());
295        };
296
297        let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateSecretInput>() else {
298            // A mismatched input is not this interceptor's concern; skip quietly.
299            return ::std::result::Result::Ok(());
300        };
301
302        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
303        if requested.should_capture("SecretId") {
304            if let ::std::option::Option::Some(value) = input.secret_id.as_deref() {
305                captured.insert("SecretId", value);
306            }
307        }
308        if requested.should_capture("ClientRequestToken") {
309            if let ::std::option::Option::Some(value) = input.client_request_token.as_deref() {
310                captured.insert("ClientRequestToken", value);
311            }
312        }
313        if requested.should_capture("Description") {
314            if let ::std::option::Option::Some(value) = input.description.as_deref() {
315                captured.insert("Description", value);
316            }
317        }
318        if requested.should_capture("KmsKeyId") {
319            if let ::std::option::Option::Some(value) = input.kms_key_id.as_deref() {
320                captured.insert("KmsKeyId", value);
321            }
322        }
323        if requested.should_capture("Type") {
324            if let ::std::option::Option::Some(value) = input.r#type.as_deref() {
325                captured.insert("Type", value);
326            }
327        }
328
329        cfg.interceptor_state().store_put(captured);
330        ::std::result::Result::Ok(())
331    }
332}
333#[derive(Debug)]
334struct UpdateSecretResponseDeserializer;
335impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateSecretResponseDeserializer {
336    fn deserialize_nonstreaming_with_config(
337        &self,
338        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
339        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
340    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
341        let (success, status) = (response.status().is_success(), response.status().as_u16());
342        // Load body and headers BEFORE BeforeParseResponse so customizations
343        // (e.g., S3's `body_is_error` check that detects errors returned with
344        // HTTP 200) can inspect them. The legacy non-streaming path also
345        // loads `body` before firing this hook.
346        #[allow(unused_variables)]
347        let body = response.body().bytes().expect("body loaded");
348        let headers = response.headers();
349        #[allow(unused_mut)]
350        let mut force_error = false;
351        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
352        if !success && status != 200 || force_error {
353            let protocol = _cfg
354                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
355                .expect("a SharedClientProtocol is required");
356            #[allow(unused_mut)]
357            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
358                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
359            })?;
360            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
361            let generic = generic_builder.build();
362            let error_code = match generic.code() {
363                ::std::option::Option::Some(code) => code,
364                ::std::option::Option::None => {
365                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
366                        ::aws_smithy_runtime_api::box_error::BoxError::from(crate::operation::update_secret::UpdateSecretError::unhandled(generic)),
367                    ))
368                }
369            };
370            let _error_message = generic.message().map(|msg| msg.to_owned());
371            let err = match error_code {
372                "DecryptionFailure" => crate::operation::update_secret::UpdateSecretError::DecryptionFailure({
373                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
374                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
375                            e,
376                        ))
377                    })?;
378                    let mut tmp = <crate::types::error::builders::DecryptionFailureBuilder>::default();
379                    tmp.deserialize_members(&mut *deser).map_err(|e| {
380                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
381                            e,
382                        ))
383                    })?;
384                    if tmp.message.is_none() {
385                        tmp.message = _error_message;
386                    }
387                    let tmp = tmp.meta(generic);
388                    tmp.build()
389                }),
390                "EncryptionFailure" => crate::operation::update_secret::UpdateSecretError::EncryptionFailure({
391                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
392                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
393                            e,
394                        ))
395                    })?;
396                    let mut tmp = <crate::types::error::builders::EncryptionFailureBuilder>::default();
397                    tmp.deserialize_members(&mut *deser).map_err(|e| {
398                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
399                            e,
400                        ))
401                    })?;
402                    if tmp.message.is_none() {
403                        tmp.message = _error_message;
404                    }
405                    let tmp = tmp.meta(generic);
406                    tmp.build()
407                }),
408                "InternalServiceError" => crate::operation::update_secret::UpdateSecretError::InternalServiceError({
409                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
410                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
411                            e,
412                        ))
413                    })?;
414                    let mut tmp = <crate::types::error::builders::InternalServiceErrorBuilder>::default();
415                    tmp.deserialize_members(&mut *deser).map_err(|e| {
416                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
417                            e,
418                        ))
419                    })?;
420                    if tmp.message.is_none() {
421                        tmp.message = _error_message;
422                    }
423                    let tmp = tmp.meta(generic);
424                    tmp.build()
425                }),
426                "InvalidParameterException" => crate::operation::update_secret::UpdateSecretError::InvalidParameterException({
427                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
428                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
429                            e,
430                        ))
431                    })?;
432                    let mut tmp = <crate::types::error::builders::InvalidParameterExceptionBuilder>::default();
433                    tmp.deserialize_members(&mut *deser).map_err(|e| {
434                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
435                            e,
436                        ))
437                    })?;
438                    if tmp.message.is_none() {
439                        tmp.message = _error_message;
440                    }
441                    let tmp = tmp.meta(generic);
442                    tmp.build()
443                }),
444                "InvalidRequestException" => crate::operation::update_secret::UpdateSecretError::InvalidRequestException({
445                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
446                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
447                            e,
448                        ))
449                    })?;
450                    let mut tmp = <crate::types::error::builders::InvalidRequestExceptionBuilder>::default();
451                    tmp.deserialize_members(&mut *deser).map_err(|e| {
452                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
453                            e,
454                        ))
455                    })?;
456                    if tmp.message.is_none() {
457                        tmp.message = _error_message;
458                    }
459                    let tmp = tmp.meta(generic);
460                    tmp.build()
461                }),
462                "LimitExceededException" => crate::operation::update_secret::UpdateSecretError::LimitExceededException({
463                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
464                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
465                            e,
466                        ))
467                    })?;
468                    let mut tmp = <crate::types::error::builders::LimitExceededExceptionBuilder>::default();
469                    tmp.deserialize_members(&mut *deser).map_err(|e| {
470                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
471                            e,
472                        ))
473                    })?;
474                    if tmp.message.is_none() {
475                        tmp.message = _error_message;
476                    }
477                    let tmp = tmp.meta(generic);
478                    tmp.build()
479                }),
480                "MalformedPolicyDocumentException" => crate::operation::update_secret::UpdateSecretError::MalformedPolicyDocumentException({
481                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
482                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
483                            e,
484                        ))
485                    })?;
486                    let mut tmp = <crate::types::error::builders::MalformedPolicyDocumentExceptionBuilder>::default();
487                    tmp.deserialize_members(&mut *deser).map_err(|e| {
488                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
489                            e,
490                        ))
491                    })?;
492                    if tmp.message.is_none() {
493                        tmp.message = _error_message;
494                    }
495                    let tmp = tmp.meta(generic);
496                    tmp.build()
497                }),
498                "PreconditionNotMetException" => crate::operation::update_secret::UpdateSecretError::PreconditionNotMetException({
499                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
500                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
501                            e,
502                        ))
503                    })?;
504                    let mut tmp = <crate::types::error::builders::PreconditionNotMetExceptionBuilder>::default();
505                    tmp.deserialize_members(&mut *deser).map_err(|e| {
506                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
507                            e,
508                        ))
509                    })?;
510                    if tmp.message.is_none() {
511                        tmp.message = _error_message;
512                    }
513                    let tmp = tmp.meta(generic);
514                    tmp.build()
515                }),
516                "ResourceExistsException" => crate::operation::update_secret::UpdateSecretError::ResourceExistsException({
517                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
518                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
519                            e,
520                        ))
521                    })?;
522                    let mut tmp = <crate::types::error::builders::ResourceExistsExceptionBuilder>::default();
523                    tmp.deserialize_members(&mut *deser).map_err(|e| {
524                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
525                            e,
526                        ))
527                    })?;
528                    if tmp.message.is_none() {
529                        tmp.message = _error_message;
530                    }
531                    let tmp = tmp.meta(generic);
532                    tmp.build()
533                }),
534                "ResourceNotFoundException" => crate::operation::update_secret::UpdateSecretError::ResourceNotFoundException({
535                    let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
536                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
537                            e,
538                        ))
539                    })?;
540                    let mut tmp = <crate::types::error::builders::ResourceNotFoundExceptionBuilder>::default();
541                    tmp.deserialize_members(&mut *deser).map_err(|e| {
542                        ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
543                            e,
544                        ))
545                    })?;
546                    if tmp.message.is_none() {
547                        tmp.message = _error_message;
548                    }
549                    let tmp = tmp.meta(generic);
550                    tmp.build()
551                }),
552                _ => {
553                    // Registry-backed, operation-scoped reification of an error whose
554                    // code this operation does not model directly: the operation's own
555                    // error registry is consulted first, then the lookup widens to the
556                    // service-wide error registry. On a hit, the reified error is attached
557                    // as the source of the returned unhandled error while its metadata
558                    // (code, message, request id) is preserved; on a miss the generic
559                    // error is returned unchanged.
560                    match protocol
561                        .deserialize_error_response(response, _cfg)
562                        .ok()
563                        .and_then(|mut deser| {
564                            ::aws_smithy_schema::registry::reify_error(
565                                crate::operation::update_secret::error_registry::REGISTRY
566                                    .or(&crate::error_type_registry::REGISTRY),
567                                error_code,
568                                &mut *deser,
569                            )
570                        }) {
571                        ::std::option::Option::Some(source) => <crate::operation::update_secret::UpdateSecretError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
572                        ::std::option::Option::None => crate::operation::update_secret::UpdateSecretError::generic(generic),
573                    }
574                }
575            };
576            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
577                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
578            ))
579        } else {
580            let protocol = _cfg
581                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
582                .expect("a SharedClientProtocol is required");
583            let mut deser = protocol.deserialize_response(response, UpdateSecret::OUTPUT_SCHEMA, _cfg).map_err(|e| {
584                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
585            })?;
586            // `headers` is already in scope from the top of the function; alias it as
587            // `_response_headers` so MutateOutput customizations have a stable name to
588            // read from.
589            let _response_headers = headers;
590            // `mut` is required because `deserialize_members` and the `MutateOutput`
591            // builder setters take `&mut self`. Marked `allow(unused_mut)` because an
592            // empty output has no members and no customizations to run.
593            #[allow(unused_mut)]
594            let mut output = <crate::operation::update_secret::builders::UpdateSecretOutputBuilder>::default();
595            output.deserialize_members(&mut *deser).map_err(|e| {
596                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
597            })?;
598            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
599            let output = output.build();
600            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
601        }
602    }
603}
604#[derive(Debug)]
605struct UpdateSecretRequestSerializer;
606impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateSecretRequestSerializer {
607    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
608    fn serialize_input(
609        &self,
610        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
611        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
612    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
613        let input = input
614            .downcast::<crate::operation::update_secret::UpdateSecretInput>()
615            .expect("correct type");
616
617        let protocol = _cfg
618            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
619            .expect("a SharedClientProtocol is required");
620        let mut request = protocol
621            .serialize_request(&input, UpdateSecret::INPUT_SCHEMA, "/", _cfg)
622            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
623
624        return ::std::result::Result::Ok(request);
625    }
626}
627#[derive(Debug)]
628struct UpdateSecretEndpointParamsInterceptor;
629
630#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
631impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateSecretEndpointParamsInterceptor {
632    fn name(&self) -> &'static str {
633        "UpdateSecretEndpointParamsInterceptor"
634    }
635
636    fn read_before_execution(
637        &self,
638        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
639            '_,
640            ::aws_smithy_runtime_api::client::interceptors::context::Input,
641            ::aws_smithy_runtime_api::client::interceptors::context::Output,
642            ::aws_smithy_runtime_api::client::interceptors::context::Error,
643        >,
644        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
645    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
646        let _input = context
647            .input()
648            .downcast_ref::<UpdateSecretInput>()
649            .ok_or("failed to downcast to UpdateSecretInput")?;
650
651        let params = crate::config::endpoint::Params::builder()
652            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
653            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
654            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
655            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
656            .build()
657            .map_err(|err| {
658                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
659            })?;
660        cfg.interceptor_state()
661            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
662        ::std::result::Result::Ok(())
663    }
664}
665
666// The get_* functions below are generated from JMESPath expressions in the
667// operationContextParams trait. They target the operation's input shape.
668
669/// Error type for the `UpdateSecretError` operation.
670#[non_exhaustive]
671#[derive(::std::fmt::Debug)]
672pub enum UpdateSecretError {
673    /// <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key.</p>
674    DecryptionFailure(crate::types::error::DecryptionFailure),
675    /// <p>Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the KMS key is available, enabled, and not in an invalid state. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a>.</p>
676    EncryptionFailure(crate::types::error::EncryptionFailure),
677    /// <p>An error occurred on the server side.</p>
678    InternalServiceError(crate::types::error::InternalServiceError),
679    /// <p>The parameter name or value is invalid.</p>
680    InvalidParameterException(crate::types::error::InvalidParameterException),
681    /// <p>A parameter value is not valid for the current state of the resource.</p>
682    /// <p>Possible causes:</p>
683    /// <ul>
684    /// <li>
685    /// <p>The secret is scheduled for deletion.</p></li>
686    /// <li>
687    /// <p>You tried to enable rotation on a secret that doesn't already have a Lambda function ARN configured and you didn't include such an ARN as a parameter in this call.</p></li>
688    /// <li>
689    /// <p>The secret is managed by another service, and you must use that service to update it. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p></li>
690    /// </ul>
691    InvalidRequestException(crate::types::error::InvalidRequestException),
692    /// <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
693    LimitExceededException(crate::types::error::LimitExceededException),
694    /// <p>The resource policy has syntax errors.</p>
695    MalformedPolicyDocumentException(crate::types::error::MalformedPolicyDocumentException),
696    /// <p>The request failed because you did not complete all the prerequisite steps.</p>
697    PreconditionNotMetException(crate::types::error::PreconditionNotMetException),
698    /// <p>A resource with the ID you requested already exists.</p>
699    ResourceExistsException(crate::types::error::ResourceExistsException),
700    /// <p>Secrets Manager can't find the resource that you asked for.</p>
701    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
702    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
703    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
704    variable wildcard pattern and check `.code()`:
705     \
706    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
707     \
708    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateSecretError) for what information is available for the error.")]
709    Unhandled(crate::error::sealed_unhandled::Unhandled),
710}
711impl UpdateSecretError {
712    /// Creates the `UpdateSecretError::Unhandled` variant from any error type.
713    pub fn unhandled(
714        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
715    ) -> Self {
716        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
717            source: err.into(),
718            meta: ::std::default::Default::default(),
719        })
720    }
721
722    /// Creates the `UpdateSecretError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
723    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
724        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
725            source: err.clone().into(),
726            meta: err,
727        })
728    }
729    ///
730    /// Returns error metadata, which includes the error code, message,
731    /// request ID, and potentially additional information.
732    ///
733    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
734        match self {
735            Self::DecryptionFailure(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
736            Self::EncryptionFailure(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
737            Self::InternalServiceError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
738            Self::InvalidParameterException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
739            Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
740            Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
741            Self::MalformedPolicyDocumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
742            Self::PreconditionNotMetException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
743            Self::ResourceExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
744            Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
745            Self::Unhandled(e) => &e.meta,
746        }
747    }
748    /// Returns `true` if the error kind is `UpdateSecretError::DecryptionFailure`.
749    pub fn is_decryption_failure(&self) -> bool {
750        matches!(self, Self::DecryptionFailure(_))
751    }
752    /// Returns `true` if the error kind is `UpdateSecretError::EncryptionFailure`.
753    pub fn is_encryption_failure(&self) -> bool {
754        matches!(self, Self::EncryptionFailure(_))
755    }
756    /// Returns `true` if the error kind is `UpdateSecretError::InternalServiceError`.
757    pub fn is_internal_service_error(&self) -> bool {
758        matches!(self, Self::InternalServiceError(_))
759    }
760    /// Returns `true` if the error kind is `UpdateSecretError::InvalidParameterException`.
761    pub fn is_invalid_parameter_exception(&self) -> bool {
762        matches!(self, Self::InvalidParameterException(_))
763    }
764    /// Returns `true` if the error kind is `UpdateSecretError::InvalidRequestException`.
765    pub fn is_invalid_request_exception(&self) -> bool {
766        matches!(self, Self::InvalidRequestException(_))
767    }
768    /// Returns `true` if the error kind is `UpdateSecretError::LimitExceededException`.
769    pub fn is_limit_exceeded_exception(&self) -> bool {
770        matches!(self, Self::LimitExceededException(_))
771    }
772    /// Returns `true` if the error kind is `UpdateSecretError::MalformedPolicyDocumentException`.
773    pub fn is_malformed_policy_document_exception(&self) -> bool {
774        matches!(self, Self::MalformedPolicyDocumentException(_))
775    }
776    /// Returns `true` if the error kind is `UpdateSecretError::PreconditionNotMetException`.
777    pub fn is_precondition_not_met_exception(&self) -> bool {
778        matches!(self, Self::PreconditionNotMetException(_))
779    }
780    /// Returns `true` if the error kind is `UpdateSecretError::ResourceExistsException`.
781    pub fn is_resource_exists_exception(&self) -> bool {
782        matches!(self, Self::ResourceExistsException(_))
783    }
784    /// Returns `true` if the error kind is `UpdateSecretError::ResourceNotFoundException`.
785    pub fn is_resource_not_found_exception(&self) -> bool {
786        matches!(self, Self::ResourceNotFoundException(_))
787    }
788}
789impl ::std::error::Error for UpdateSecretError {
790    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
791        match self {
792            Self::DecryptionFailure(_inner) => ::std::option::Option::Some(_inner),
793            Self::EncryptionFailure(_inner) => ::std::option::Option::Some(_inner),
794            Self::InternalServiceError(_inner) => ::std::option::Option::Some(_inner),
795            Self::InvalidParameterException(_inner) => ::std::option::Option::Some(_inner),
796            Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner),
797            Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner),
798            Self::MalformedPolicyDocumentException(_inner) => ::std::option::Option::Some(_inner),
799            Self::PreconditionNotMetException(_inner) => ::std::option::Option::Some(_inner),
800            Self::ResourceExistsException(_inner) => ::std::option::Option::Some(_inner),
801            Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
802            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
803        }
804    }
805}
806impl ::std::fmt::Display for UpdateSecretError {
807    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
808        match self {
809            Self::DecryptionFailure(_inner) => _inner.fmt(f),
810            Self::EncryptionFailure(_inner) => _inner.fmt(f),
811            Self::InternalServiceError(_inner) => _inner.fmt(f),
812            Self::InvalidParameterException(_inner) => _inner.fmt(f),
813            Self::InvalidRequestException(_inner) => _inner.fmt(f),
814            Self::LimitExceededException(_inner) => _inner.fmt(f),
815            Self::MalformedPolicyDocumentException(_inner) => _inner.fmt(f),
816            Self::PreconditionNotMetException(_inner) => _inner.fmt(f),
817            Self::ResourceExistsException(_inner) => _inner.fmt(f),
818            Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
819            Self::Unhandled(_inner) => {
820                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
821                    write!(f, "unhandled error ({code})")
822                } else {
823                    f.write_str("unhandled error")
824                }
825            }
826        }
827    }
828}
829impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateSecretError {
830    fn code(&self) -> ::std::option::Option<&str> {
831        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
832    }
833    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
834        ::std::option::Option::None
835    }
836}
837impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateSecretError {
838    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
839        match self {
840            Self::DecryptionFailure(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
841            Self::EncryptionFailure(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
842            Self::InternalServiceError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
843            Self::InvalidParameterException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
844            Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
845            Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
846            Self::MalformedPolicyDocumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
847            Self::PreconditionNotMetException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
848            Self::ResourceExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
849            Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
850            Self::Unhandled(_inner) => &_inner.meta,
851        }
852    }
853}
854impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateSecretError {
855    fn create_unhandled_error(
856        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
857        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
858    ) -> Self {
859        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
860            source,
861            meta: meta.unwrap_or_default(),
862        })
863    }
864}
865impl ::aws_types::request_id::RequestId for crate::operation::update_secret::UpdateSecretError {
866    fn request_id(&self) -> Option<&str> {
867        self.meta().request_id()
868    }
869}
870
871pub use crate::operation::update_secret::_update_secret_input::UpdateSecretInput;
872
873pub use crate::operation::update_secret::_update_secret_output::UpdateSecretOutput;
874
875mod _update_secret_input;
876
877mod _update_secret_output;
878
879/// Builders
880pub mod builders;