Skip to main content

aws_sdk_kms/operation/
verify.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `Verify`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct Verify;
6impl Verify {
7    /// Creates a new `Verify`
8    pub fn new() -> Self {
9        Self
10    }
11    pub(crate) async fn orchestrate(
12        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
13        input: crate::operation::verify::VerifyInput,
14    ) -> ::std::result::Result<
15        crate::operation::verify::VerifyOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::verify::VerifyError,
18            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19        >,
20    > {
21        let map_err =
22            |err: ::aws_smithy_runtime_api::client::result::SdkError<
23                ::aws_smithy_runtime_api::client::interceptors::context::Error,
24                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
25            >| { err.map_service_error(|err| err.downcast::<crate::operation::verify::VerifyError>().expect("correct error type")) };
26        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
27            .await
28            .map_err(map_err)?;
29        let output = context.finalize().map_err(map_err)?;
30        ::std::result::Result::Ok(output.downcast::<crate::operation::verify::VerifyOutput>().expect("correct output type"))
31    }
32
33    pub(crate) async fn orchestrate_with_stop_point(
34        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
35        input: crate::operation::verify::VerifyInput,
36        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
37    ) -> ::std::result::Result<
38        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
39        ::aws_smithy_runtime_api::client::result::SdkError<
40            ::aws_smithy_runtime_api::client::interceptors::context::Error,
41            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
42        >,
43    > {
44        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
45        use ::tracing::Instrument;
46        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("KMS", "Verify", input, runtime_plugins, stop_point)
47            // Create a parent span for the entire operation. Includes a random, internal-only,
48            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
49            .instrument(::tracing::debug_span!(
50                "KMS.Verify",
51                "rpc.service" = "KMS",
52                "rpc.method" = "Verify",
53                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
54                "rpc.system" = "aws-api",
55            ))
56            .await
57    }
58
59    pub(crate) fn operation_runtime_plugins(
60        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
61        client_config: &crate::config::Config,
62        config_override: ::std::option::Option<crate::config::Builder>,
63    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
64        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
65
66        if let ::std::option::Option::Some(config_override) = config_override {
67            for plugin in config_override.runtime_plugins.iter().cloned() {
68                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
69            }
70            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
71                config_override,
72                client_config.config.clone(),
73                &client_config.runtime_components,
74            ));
75        }
76        runtime_plugins
77    }
78}
79impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for Verify {
80    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
81        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Verify");
82
83        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
84            VerifyRequestSerializer,
85        ));
86        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
87            VerifyResponseDeserializer,
88        ));
89
90        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
91            crate::config::auth::Params::builder()
92                .operation_name("Verify")
93                .build()
94                .expect("required fields set"),
95        ));
96
97        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("Verify", "KMS"));
98        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
99        signing_options.double_uri_encode = true;
100        signing_options.content_sha256_header = false;
101        signing_options.normalize_uri_path = true;
102        signing_options.payload_override = None;
103
104        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
105            signing_options,
106            ..::std::default::Default::default()
107        });
108
109        ::std::option::Option::Some(cfg.freeze())
110    }
111
112    fn runtime_components(
113        &self,
114        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
115    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
116        #[allow(unused_mut)]
117        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("Verify")
118            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
119                VerifyTelemetryInputCaptureInterceptor,
120            ))
121            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
122                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
123            ))
124            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
125                VerifyEndpointParamsInterceptor,
126            ))
127            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
128                crate::operation::verify::VerifyError,
129            >::new())
130            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
131                crate::operation::verify::VerifyError,
132            >::new())
133            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
134                crate::operation::verify::VerifyError,
135            >::new())
136            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
137                crate::operation::verify::VerifyError,
138            >::new());
139
140        ::std::borrow::Cow::Owned(rcb)
141    }
142}
143
144#[derive(Debug)]
145struct VerifyTelemetryInputCaptureInterceptor;
146
147#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
148impl ::aws_smithy_runtime_api::client::interceptors::Intercept for VerifyTelemetryInputCaptureInterceptor {
149    fn name(&self) -> &'static str {
150        "VerifyTelemetryInputCaptureInterceptor"
151    }
152
153    fn read_before_execution(
154        &self,
155        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
156            '_,
157            ::aws_smithy_runtime_api::client::interceptors::context::Input,
158            ::aws_smithy_runtime_api::client::interceptors::context::Output,
159            ::aws_smithy_runtime_api::client::interceptors::context::Error,
160        >,
161        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
162    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
163        // Nothing to do unless the customer opted in by naming members to record.
164        let ::std::option::Option::Some(requested) = cfg
165            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
166            .filter(|r| !r.is_empty())
167        else {
168            return ::std::result::Result::Ok(());
169        };
170
171        let ::std::option::Option::Some(input) = context.input().downcast_ref::<VerifyInput>() else {
172            // A mismatched input is not this interceptor's concern; skip quietly.
173            return ::std::result::Result::Ok(());
174        };
175
176        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
177        if requested.should_capture("KeyId") {
178            if let ::std::option::Option::Some(value) = input.key_id.as_deref() {
179                captured.insert("KeyId", value);
180            }
181        }
182
183        cfg.interceptor_state().store_put(captured);
184        ::std::result::Result::Ok(())
185    }
186}
187#[derive(Debug)]
188struct VerifyResponseDeserializer;
189impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for VerifyResponseDeserializer {
190    fn deserialize_nonstreaming_with_config(
191        &self,
192        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
193        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
194    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
195        let (success, status) = (response.status().is_success(), response.status().as_u16());
196        let headers = response.headers();
197        let body = response.body().bytes().expect("body loaded");
198        #[allow(unused_mut)]
199        let mut force_error = false;
200        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
201        let parse_result = if !success && status != 200 || force_error {
202            crate::protocol_serde::shape_verify::de_verify_http_error(status, headers, body, _cfg)
203        } else {
204            crate::protocol_serde::shape_verify::de_verify_http_response(status, headers, body, _cfg)
205        };
206        crate::protocol_serde::type_erase_result(parse_result)
207    }
208}
209#[derive(Debug)]
210struct VerifyRequestSerializer;
211impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for VerifyRequestSerializer {
212    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
213    fn serialize_input(
214        &self,
215        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
216        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
217    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
218        let input = input.downcast::<crate::operation::verify::VerifyInput>().expect("correct type");
219        let _header_serialization_settings = _cfg
220            .load::<crate::serialization_settings::HeaderSerializationSettings>()
221            .cloned()
222            .unwrap_or_default();
223        let mut request_builder = {
224            #[allow(clippy::uninlined_format_args)]
225            fn uri_base(
226                _input: &crate::operation::verify::VerifyInput,
227                output: &mut ::std::string::String,
228            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
229                use ::std::fmt::Write as _;
230                ::std::write!(output, "/").expect("formatting should succeed");
231                ::std::result::Result::Ok(())
232            }
233            #[allow(clippy::unnecessary_wraps)]
234            fn update_http_builder(
235                input: &crate::operation::verify::VerifyInput,
236                builder: ::http_1x::request::Builder,
237            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
238                let mut uri = ::std::string::String::new();
239                uri_base(input, &mut uri)?;
240                ::std::result::Result::Ok(builder.method("POST").uri(uri))
241            }
242            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
243            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
244            builder = _header_serialization_settings.set_default_header(
245                builder,
246                ::http_1x::header::HeaderName::from_static("x-amz-target"),
247                "TrentService.Verify",
248            );
249            builder
250        };
251        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_verify::ser_verify_input(&input)?);
252        if let Some(content_length) = body.content_length() {
253            let content_length = content_length.to_string();
254            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
255        }
256        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
257    }
258}
259#[derive(Debug)]
260struct VerifyEndpointParamsInterceptor;
261
262#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
263impl ::aws_smithy_runtime_api::client::interceptors::Intercept for VerifyEndpointParamsInterceptor {
264    fn name(&self) -> &'static str {
265        "VerifyEndpointParamsInterceptor"
266    }
267
268    fn read_before_execution(
269        &self,
270        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
271            '_,
272            ::aws_smithy_runtime_api::client::interceptors::context::Input,
273            ::aws_smithy_runtime_api::client::interceptors::context::Output,
274            ::aws_smithy_runtime_api::client::interceptors::context::Error,
275        >,
276        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
277    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
278        let _input = context.input().downcast_ref::<VerifyInput>().ok_or("failed to downcast to VerifyInput")?;
279
280        let params = crate::config::endpoint::Params::builder()
281            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
282            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
283            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
284            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
285            .build()
286            .map_err(|err| {
287                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
288            })?;
289        cfg.interceptor_state()
290            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
291        ::std::result::Result::Ok(())
292    }
293}
294
295// The get_* functions below are generated from JMESPath expressions in the
296// operationContextParams trait. They target the operation's input shape.
297
298/// Error type for the `VerifyError` operation.
299#[non_exhaustive]
300#[derive(::std::fmt::Debug)]
301pub enum VerifyError {
302    /// <p>The system timed out while trying to fulfill the request. You can retry the request.</p>
303    DependencyTimeoutException(crate::types::error::DependencyTimeoutException),
304    /// <p>The request was rejected because the specified KMS key is not enabled.</p>
305    DisabledException(crate::types::error::DisabledException),
306    /// <p>The request was rejected because the DryRun parameter was specified.</p>
307    DryRunOperationException(crate::types::error::DryRunOperationException),
308    /// <p>The request was rejected because the specified grant token is not valid.</p>
309    InvalidGrantTokenException(crate::types::error::InvalidGrantTokenException),
310    /// <p>The request was rejected for one of the following reasons:</p>
311    /// <ul>
312    /// <li>
313    /// <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API operation.</p></li>
314    /// <li>
315    /// <p>The encryption algorithm or signing algorithm specified for the operation is incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p></li>
316    /// </ul>
317    /// <p>For encrypting, decrypting, re-encrypting, and generating data keys, the <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and verifying message authentication codes (MACs), the <code>KeyUsage</code> must be <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the <code>DescribeKey</code> operation.</p>
318    /// <p>To find the encryption or signing algorithms supported for a particular KMS key, use the <code>DescribeKey</code> operation.</p>
319    InvalidKeyUsageException(crate::types::error::InvalidKeyUsageException),
320    /// <p>The request was rejected because the specified KMS key was not available. You can retry the request.</p>
321    KeyUnavailableException(crate::types::error::KeyUnavailableException),
322    /// <p>The request was rejected because an internal exception occurred. The request can be retried.</p>
323    KmsInternalException(crate::types::error::KmsInternalException),
324    /// <p>The request was rejected because the signature verification failed. Signature verification fails when it cannot confirm that signature was produced by signing the specified message with the specified KMS key and signing algorithm.</p>
325    KmsInvalidSignatureException(crate::types::error::KmsInvalidSignatureException),
326    /// <p>The request was rejected because the state of the specified resource is not valid for this request.</p>
327    /// <p>This exceptions means one of the following:</p>
328    /// <ul>
329    /// <li>
330    /// <p>The key state of the KMS key is not compatible with the operation.</p>
331    /// <p>To find the key state, use the <code>DescribeKey</code> operation. For more information about which key states are compatible with each KMS operation, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i> <i>Key Management Service Developer Guide</i> </i>.</p></li>
332    /// <li>
333    /// <p>For cryptographic operations on KMS keys in custom key stores, this exception represents a general failure with many possible causes. To identify the cause, see the error message that accompanies the exception.</p></li>
334    /// </ul>
335    KmsInvalidStateException(crate::types::error::KmsInvalidStateException),
336    /// <p>The request was rejected because the specified entity or resource could not be found.</p>
337    NotFoundException(crate::types::error::NotFoundException),
338    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
339    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
340    variable wildcard pattern and check `.code()`:
341     \
342    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
343     \
344    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-VerifyError) for what information is available for the error.")]
345    Unhandled(crate::error::sealed_unhandled::Unhandled),
346}
347impl VerifyError {
348    /// Creates the `VerifyError::Unhandled` variant from any error type.
349    pub fn unhandled(
350        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
351    ) -> Self {
352        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
353            source: err.into(),
354            meta: ::std::default::Default::default(),
355        })
356    }
357
358    /// Creates the `VerifyError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
359    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
360        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
361            source: err.clone().into(),
362            meta: err,
363        })
364    }
365    ///
366    /// Returns error metadata, which includes the error code, message,
367    /// request ID, and potentially additional information.
368    ///
369    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
370        match self {
371            Self::DependencyTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
372            Self::DisabledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
373            Self::DryRunOperationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
374            Self::InvalidGrantTokenException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
375            Self::InvalidKeyUsageException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
376            Self::KeyUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
377            Self::KmsInternalException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
378            Self::KmsInvalidSignatureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
379            Self::KmsInvalidStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
380            Self::NotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
381            Self::Unhandled(e) => &e.meta,
382        }
383    }
384    /// Returns `true` if the error kind is `VerifyError::DependencyTimeoutException`.
385    pub fn is_dependency_timeout_exception(&self) -> bool {
386        matches!(self, Self::DependencyTimeoutException(_))
387    }
388    /// Returns `true` if the error kind is `VerifyError::DisabledException`.
389    pub fn is_disabled_exception(&self) -> bool {
390        matches!(self, Self::DisabledException(_))
391    }
392    /// Returns `true` if the error kind is `VerifyError::DryRunOperationException`.
393    pub fn is_dry_run_operation_exception(&self) -> bool {
394        matches!(self, Self::DryRunOperationException(_))
395    }
396    /// Returns `true` if the error kind is `VerifyError::InvalidGrantTokenException`.
397    pub fn is_invalid_grant_token_exception(&self) -> bool {
398        matches!(self, Self::InvalidGrantTokenException(_))
399    }
400    /// Returns `true` if the error kind is `VerifyError::InvalidKeyUsageException`.
401    pub fn is_invalid_key_usage_exception(&self) -> bool {
402        matches!(self, Self::InvalidKeyUsageException(_))
403    }
404    /// Returns `true` if the error kind is `VerifyError::KeyUnavailableException`.
405    pub fn is_key_unavailable_exception(&self) -> bool {
406        matches!(self, Self::KeyUnavailableException(_))
407    }
408    /// Returns `true` if the error kind is `VerifyError::KmsInternalException`.
409    pub fn is_kms_internal_exception(&self) -> bool {
410        matches!(self, Self::KmsInternalException(_))
411    }
412    /// Returns `true` if the error kind is `VerifyError::KmsInvalidSignatureException`.
413    pub fn is_kms_invalid_signature_exception(&self) -> bool {
414        matches!(self, Self::KmsInvalidSignatureException(_))
415    }
416    /// Returns `true` if the error kind is `VerifyError::KmsInvalidStateException`.
417    pub fn is_kms_invalid_state_exception(&self) -> bool {
418        matches!(self, Self::KmsInvalidStateException(_))
419    }
420    /// Returns `true` if the error kind is `VerifyError::NotFoundException`.
421    pub fn is_not_found_exception(&self) -> bool {
422        matches!(self, Self::NotFoundException(_))
423    }
424}
425impl ::std::error::Error for VerifyError {
426    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
427        match self {
428            Self::DependencyTimeoutException(_inner) => ::std::option::Option::Some(_inner),
429            Self::DisabledException(_inner) => ::std::option::Option::Some(_inner),
430            Self::DryRunOperationException(_inner) => ::std::option::Option::Some(_inner),
431            Self::InvalidGrantTokenException(_inner) => ::std::option::Option::Some(_inner),
432            Self::InvalidKeyUsageException(_inner) => ::std::option::Option::Some(_inner),
433            Self::KeyUnavailableException(_inner) => ::std::option::Option::Some(_inner),
434            Self::KmsInternalException(_inner) => ::std::option::Option::Some(_inner),
435            Self::KmsInvalidSignatureException(_inner) => ::std::option::Option::Some(_inner),
436            Self::KmsInvalidStateException(_inner) => ::std::option::Option::Some(_inner),
437            Self::NotFoundException(_inner) => ::std::option::Option::Some(_inner),
438            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
439        }
440    }
441}
442impl ::std::fmt::Display for VerifyError {
443    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
444        match self {
445            Self::DependencyTimeoutException(_inner) => _inner.fmt(f),
446            Self::DisabledException(_inner) => _inner.fmt(f),
447            Self::DryRunOperationException(_inner) => _inner.fmt(f),
448            Self::InvalidGrantTokenException(_inner) => _inner.fmt(f),
449            Self::InvalidKeyUsageException(_inner) => _inner.fmt(f),
450            Self::KeyUnavailableException(_inner) => _inner.fmt(f),
451            Self::KmsInternalException(_inner) => _inner.fmt(f),
452            Self::KmsInvalidSignatureException(_inner) => _inner.fmt(f),
453            Self::KmsInvalidStateException(_inner) => _inner.fmt(f),
454            Self::NotFoundException(_inner) => _inner.fmt(f),
455            Self::Unhandled(_inner) => {
456                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
457                    write!(f, "unhandled error ({code})")
458                } else {
459                    f.write_str("unhandled error")
460                }
461            }
462        }
463    }
464}
465impl ::aws_smithy_types::retry::ProvideErrorKind for VerifyError {
466    fn code(&self) -> ::std::option::Option<&str> {
467        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
468    }
469    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
470        ::std::option::Option::None
471    }
472}
473impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for VerifyError {
474    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
475        match self {
476            Self::DependencyTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
477            Self::DisabledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
478            Self::DryRunOperationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
479            Self::InvalidGrantTokenException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
480            Self::InvalidKeyUsageException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
481            Self::KeyUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
482            Self::KmsInternalException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
483            Self::KmsInvalidSignatureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
484            Self::KmsInvalidStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
485            Self::NotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
486            Self::Unhandled(_inner) => &_inner.meta,
487        }
488    }
489}
490impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for VerifyError {
491    fn create_unhandled_error(
492        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
493        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
494    ) -> Self {
495        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
496            source,
497            meta: meta.unwrap_or_default(),
498        })
499    }
500}
501impl ::aws_types::request_id::RequestId for crate::operation::verify::VerifyError {
502    fn request_id(&self) -> Option<&str> {
503        self.meta().request_id()
504    }
505}
506
507pub use crate::operation::verify::_verify_input::VerifyInput;
508
509pub use crate::operation::verify::_verify_output::VerifyOutput;
510
511mod _verify_input;
512
513mod _verify_output;
514
515/// Builders
516pub mod builders;