Skip to main content

aws_sdk_redshift/operation/
restore_from_cluster_snapshot.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `RestoreFromClusterSnapshot`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct RestoreFromClusterSnapshot;
6impl RestoreFromClusterSnapshot {
7    /// Creates a new `RestoreFromClusterSnapshot`
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::restore_from_cluster_snapshot::RestoreFromClusterSnapshotInput,
14    ) -> ::std::result::Result<
15        crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotError,
18            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19        >,
20    > {
21        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22            ::aws_smithy_runtime_api::client::interceptors::context::Error,
23            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24        >| {
25            err.map_service_error(|err| {
26                err.downcast::<crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotError>()
27                    .expect("correct error type")
28            })
29        };
30        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31            .await
32            .map_err(map_err)?;
33        let output = context.finalize().map_err(map_err)?;
34        ::std::result::Result::Ok(
35            output
36                .downcast::<crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotOutput>()
37                .expect("correct output type"),
38        )
39    }
40
41    pub(crate) async fn orchestrate_with_stop_point(
42        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43        input: crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotInput,
44        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45    ) -> ::std::result::Result<
46        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47        ::aws_smithy_runtime_api::client::result::SdkError<
48            ::aws_smithy_runtime_api::client::interceptors::context::Error,
49            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50        >,
51    > {
52        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53        use ::tracing::Instrument;
54        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
55            "Redshift",
56            "RestoreFromClusterSnapshot",
57            input,
58            runtime_plugins,
59            stop_point,
60        )
61        // Create a parent span for the entire operation. Includes a random, internal-only,
62        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
63        .instrument(::tracing::debug_span!(
64            "Redshift.RestoreFromClusterSnapshot",
65            "rpc.service" = "Redshift",
66            "rpc.method" = "RestoreFromClusterSnapshot",
67            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
68            "rpc.system" = "aws-api",
69        ))
70        .await
71    }
72
73    pub(crate) fn operation_runtime_plugins(
74        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
75        client_config: &crate::config::Config,
76        config_override: ::std::option::Option<crate::config::Builder>,
77    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
78        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
79
80        if let ::std::option::Option::Some(config_override) = config_override {
81            for plugin in config_override.runtime_plugins.iter().cloned() {
82                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
83            }
84            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
85                config_override,
86                client_config.config.clone(),
87                &client_config.runtime_components,
88            ));
89        }
90        runtime_plugins
91    }
92}
93impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for RestoreFromClusterSnapshot {
94    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
95        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("RestoreFromClusterSnapshot");
96
97        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
98            RestoreFromClusterSnapshotRequestSerializer,
99        ));
100        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
101            RestoreFromClusterSnapshotResponseDeserializer,
102        ));
103
104        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
105            crate::config::auth::Params::builder()
106                .operation_name("RestoreFromClusterSnapshot")
107                .build()
108                .expect("required fields set"),
109        ));
110
111        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
112        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
113            "RestoreFromClusterSnapshot",
114            "Redshift",
115        ));
116        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
117        signing_options.double_uri_encode = true;
118        signing_options.content_sha256_header = false;
119        signing_options.normalize_uri_path = true;
120        signing_options.payload_override = None;
121
122        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
123            signing_options,
124            ..::std::default::Default::default()
125        });
126
127        ::std::option::Option::Some(cfg.freeze())
128    }
129
130    fn runtime_components(
131        &self,
132        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
133    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
134        #[allow(unused_mut)]
135        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("RestoreFromClusterSnapshot")
136            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
137                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
138            ))
139            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
140                RestoreFromClusterSnapshotEndpointParamsInterceptor,
141            ))
142            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
143                crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotError,
144            >::new())
145            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
146                crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotError,
147            >::new())
148            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
149                crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotError,
150            >::new());
151
152        ::std::borrow::Cow::Owned(rcb)
153    }
154}
155
156#[derive(Debug)]
157struct RestoreFromClusterSnapshotResponseDeserializer;
158impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RestoreFromClusterSnapshotResponseDeserializer {
159    fn deserialize_nonstreaming_with_config(
160        &self,
161        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
162        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
163    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
164        let (success, status) = (response.status().is_success(), response.status().as_u16());
165        let headers = response.headers();
166        let body = response.body().bytes().expect("body loaded");
167        #[allow(unused_mut)]
168        let mut force_error = false;
169        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
170        let parse_result = if !success && status != 200 || force_error {
171            crate::protocol_serde::shape_restore_from_cluster_snapshot::de_restore_from_cluster_snapshot_http_error(status, headers, body)
172        } else {
173            crate::protocol_serde::shape_restore_from_cluster_snapshot::de_restore_from_cluster_snapshot_http_response(status, headers, body)
174        };
175        crate::protocol_serde::type_erase_result(parse_result)
176    }
177}
178#[derive(Debug)]
179struct RestoreFromClusterSnapshotRequestSerializer;
180impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RestoreFromClusterSnapshotRequestSerializer {
181    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
182    fn serialize_input(
183        &self,
184        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
185        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
186    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
187        let input = input
188            .downcast::<crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotInput>()
189            .expect("correct type");
190        let _header_serialization_settings = _cfg
191            .load::<crate::serialization_settings::HeaderSerializationSettings>()
192            .cloned()
193            .unwrap_or_default();
194        let mut request_builder = {
195            #[allow(clippy::uninlined_format_args)]
196            fn uri_base(
197                _input: &crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotInput,
198                output: &mut ::std::string::String,
199            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
200                use ::std::fmt::Write as _;
201                ::std::write!(output, "/").expect("formatting should succeed");
202                ::std::result::Result::Ok(())
203            }
204            #[allow(clippy::unnecessary_wraps)]
205            fn update_http_builder(
206                input: &crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotInput,
207                builder: ::http_1x::request::Builder,
208            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
209                let mut uri = ::std::string::String::new();
210                uri_base(input, &mut uri)?;
211                ::std::result::Result::Ok(builder.method("POST").uri(uri))
212            }
213            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
214            builder =
215                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
216            builder
217        };
218        let body = ::aws_smithy_types::body::SdkBody::from(
219            crate::protocol_serde::shape_restore_from_cluster_snapshot_input::ser_restore_from_cluster_snapshot_input_input_input(&input)?,
220        );
221        if let Some(content_length) = body.content_length() {
222            let content_length = content_length.to_string();
223            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
224        }
225        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
226    }
227}
228#[derive(Debug)]
229struct RestoreFromClusterSnapshotEndpointParamsInterceptor;
230
231#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
232impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RestoreFromClusterSnapshotEndpointParamsInterceptor {
233    fn name(&self) -> &'static str {
234        "RestoreFromClusterSnapshotEndpointParamsInterceptor"
235    }
236
237    fn read_before_execution(
238        &self,
239        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
240            '_,
241            ::aws_smithy_runtime_api::client::interceptors::context::Input,
242            ::aws_smithy_runtime_api::client::interceptors::context::Output,
243            ::aws_smithy_runtime_api::client::interceptors::context::Error,
244        >,
245        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
246    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
247        let _input = context
248            .input()
249            .downcast_ref::<RestoreFromClusterSnapshotInput>()
250            .ok_or("failed to downcast to RestoreFromClusterSnapshotInput")?;
251
252        let params = crate::config::endpoint::Params::builder()
253            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
254            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
255            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
256            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
257            .build()
258            .map_err(|err| {
259                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
260            })?;
261        cfg.interceptor_state()
262            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
263        ::std::result::Result::Ok(())
264    }
265}
266
267// The get_* functions below are generated from JMESPath expressions in the
268// operationContextParams trait. They target the operation's input shape.
269
270/// Error type for the `RestoreFromClusterSnapshotError` operation.
271#[non_exhaustive]
272#[derive(::std::fmt::Debug)]
273pub enum RestoreFromClusterSnapshotError {
274    /// <p>The owner of the specified snapshot has not authorized your account to access the snapshot.</p>
275    AccessToSnapshotDeniedFault(crate::types::error::AccessToSnapshotDeniedFault),
276    /// <p>The account already has a cluster with the given identifier.</p>
277    ClusterAlreadyExistsFault(crate::types::error::ClusterAlreadyExistsFault),
278    /// <p>The parameter group name does not refer to an existing parameter group.</p>
279    ClusterParameterGroupNotFoundFault(crate::types::error::ClusterParameterGroupNotFoundFault),
280    /// <p>The request would exceed the allowed number of cluster instances for this account. For information about increasing your quota, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html">Limits in Amazon Redshift</a> in the <i>Amazon Redshift Cluster Management Guide</i>.</p>
281    ClusterQuotaExceededFault(crate::types::error::ClusterQuotaExceededFault),
282    /// <p>The cluster security group name does not refer to an existing cluster security group.</p>
283    ClusterSecurityGroupNotFoundFault(crate::types::error::ClusterSecurityGroupNotFoundFault),
284    /// <p>The snapshot identifier does not refer to an existing cluster snapshot.</p>
285    ClusterSnapshotNotFoundFault(crate::types::error::ClusterSnapshotNotFoundFault),
286    /// <p>The cluster subnet group name does not refer to an existing cluster subnet group.</p>
287    ClusterSubnetGroupNotFoundFault(crate::types::error::ClusterSubnetGroupNotFoundFault),
288    /// <p>A dependent service denied access for the integration.</p>
289    DependentServiceAccessDeniedFault(crate::types::error::DependentServiceAccessDeniedFault),
290    /// <p>The request cannot be completed because a dependent service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.</p>
291    DependentServiceRequestThrottlingFault(crate::types::error::DependentServiceRequestThrottlingFault),
292    /// <p>Your request cannot be completed because a dependent internal service is temporarily unavailable. Wait 30 to 60 seconds and try again.</p>
293    DependentServiceUnavailableFault(crate::types::error::DependentServiceUnavailableFault),
294    /// <p>There is no Amazon Redshift HSM client certificate with the specified identifier.</p>
295    HsmClientCertificateNotFoundFault(crate::types::error::HsmClientCertificateNotFoundFault),
296    /// <p>There is no Amazon Redshift HSM configuration with the specified identifier.</p>
297    HsmConfigurationNotFoundFault(crate::types::error::HsmConfigurationNotFoundFault),
298    /// <p>The number of nodes specified exceeds the allotted capacity of the cluster.</p>
299    InsufficientClusterCapacityFault(crate::types::error::InsufficientClusterCapacityFault),
300    /// <p>The specified cluster snapshot is not in the <code>available</code> state, or other accounts are authorized to access the snapshot.</p>
301    InvalidClusterSnapshotStateFault(crate::types::error::InvalidClusterSnapshotStateFault),
302    /// <p>The cluster subnet group cannot be deleted because it is in use.</p>
303    InvalidClusterSubnetGroupStateFault(crate::types::error::InvalidClusterSubnetGroupStateFault),
304    /// <p>The provided cluster track name is not valid.</p>
305    InvalidClusterTrackFault(crate::types::error::InvalidClusterTrackFault),
306    /// <p>The Elastic IP (EIP) is invalid or cannot be found.</p>
307    InvalidElasticIpFault(crate::types::error::InvalidElasticIpFault),
308    /// <p>Indicates that the Reserved Node being exchanged is not in an active state.</p>
309    InvalidReservedNodeStateFault(crate::types::error::InvalidReservedNodeStateFault),
310    /// <p>The restore is invalid.</p>
311    InvalidRestoreFault(crate::types::error::InvalidRestoreFault),
312    /// <p>The requested subnet is not valid, or not all of the subnets are in the same VPC.</p>
313    InvalidSubnet(crate::types::error::InvalidSubnet),
314    /// <p>The tag is invalid.</p>
315    InvalidTagFault(crate::types::error::InvalidTagFault),
316    /// <p>The cluster subnet group does not cover all Availability Zones.</p>
317    InvalidVpcNetworkStateFault(crate::types::error::InvalidVpcNetworkStateFault),
318    /// <p>There are no subnets in your VPC with associated IPv6 CIDR blocks. To use dual-stack mode, associate an IPv6 CIDR block with each subnet in your VPC.</p>
319    Ipv6CidrBlockNotFoundFault(crate::types::error::Ipv6CidrBlockNotFoundFault),
320    /// <p>The encryption key has exceeded its grant limit in Amazon Web Services KMS.</p>
321    LimitExceededFault(crate::types::error::LimitExceededFault),
322    /// <p>The operation would exceed the number of nodes allowed for a cluster.</p>
323    NumberOfNodesPerClusterLimitExceededFault(crate::types::error::NumberOfNodesPerClusterLimitExceededFault),
324    /// <p>The operation would exceed the number of nodes allotted to the account. For information about increasing your quota, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html">Limits in Amazon Redshift</a> in the <i>Amazon Redshift Cluster Management Guide</i>.</p>
325    NumberOfNodesQuotaExceededFault(crate::types::error::NumberOfNodesQuotaExceededFault),
326    /// <p>The application you attempted to find doesn't exist.</p>
327    RedshiftIdcApplicationNotExistsFault(crate::types::error::RedshiftIdcApplicationNotExistsFault),
328    /// <p>User already has a reservation with the given identifier.</p>
329    ReservedNodeAlreadyExistsFault(crate::types::error::ReservedNodeAlreadyExistsFault),
330    /// <p>Indicates that the reserved node has already been exchanged.</p>
331    ReservedNodeAlreadyMigratedFault(crate::types::error::ReservedNodeAlreadyMigratedFault),
332    /// <p>The specified reserved compute node not found.</p>
333    ReservedNodeNotFoundFault(crate::types::error::ReservedNodeNotFoundFault),
334    /// <p>Specified offering does not exist.</p>
335    ReservedNodeOfferingNotFoundFault(crate::types::error::ReservedNodeOfferingNotFoundFault),
336    /// <p>We could not find the specified snapshot schedule.</p>
337    SnapshotScheduleNotFoundFault(crate::types::error::SnapshotScheduleNotFoundFault),
338    /// <p>You have exceeded the number of tags allowed.</p>
339    TagLimitExceededFault(crate::types::error::TagLimitExceededFault),
340    /// <p>Your account is not authorized to perform the requested operation.</p>
341    UnauthorizedOperation(crate::types::error::UnauthorizedOperation),
342    /// <p>The requested operation isn't supported.</p>
343    UnsupportedOperationFault(crate::types::error::UnsupportedOperationFault),
344    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
345    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
346    variable wildcard pattern and check `.code()`:
347     \
348    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
349     \
350    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-RestoreFromClusterSnapshotError) for what information is available for the error.")]
351    Unhandled(crate::error::sealed_unhandled::Unhandled),
352}
353impl RestoreFromClusterSnapshotError {
354    /// Creates the `RestoreFromClusterSnapshotError::Unhandled` variant from any error type.
355    pub fn unhandled(
356        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
357    ) -> Self {
358        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
359            source: err.into(),
360            meta: ::std::default::Default::default(),
361        })
362    }
363
364    /// Creates the `RestoreFromClusterSnapshotError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
365    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
366        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
367            source: err.clone().into(),
368            meta: err,
369        })
370    }
371    ///
372    /// Returns error metadata, which includes the error code, message,
373    /// request ID, and potentially additional information.
374    ///
375    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
376        match self {
377            Self::AccessToSnapshotDeniedFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
378            Self::ClusterAlreadyExistsFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
379            Self::ClusterParameterGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
380            Self::ClusterQuotaExceededFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
381            Self::ClusterSecurityGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
382            Self::ClusterSnapshotNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
383            Self::ClusterSubnetGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
384            Self::DependentServiceAccessDeniedFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
385            Self::DependentServiceRequestThrottlingFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
386            Self::DependentServiceUnavailableFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
387            Self::HsmClientCertificateNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
388            Self::HsmConfigurationNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
389            Self::InsufficientClusterCapacityFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
390            Self::InvalidClusterSnapshotStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
391            Self::InvalidClusterSubnetGroupStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
392            Self::InvalidClusterTrackFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
393            Self::InvalidElasticIpFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
394            Self::InvalidReservedNodeStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
395            Self::InvalidRestoreFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
396            Self::InvalidSubnet(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
397            Self::InvalidTagFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
398            Self::InvalidVpcNetworkStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
399            Self::Ipv6CidrBlockNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
400            Self::LimitExceededFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
401            Self::NumberOfNodesPerClusterLimitExceededFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
402            Self::NumberOfNodesQuotaExceededFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
403            Self::RedshiftIdcApplicationNotExistsFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
404            Self::ReservedNodeAlreadyExistsFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
405            Self::ReservedNodeAlreadyMigratedFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
406            Self::ReservedNodeNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
407            Self::ReservedNodeOfferingNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
408            Self::SnapshotScheduleNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
409            Self::TagLimitExceededFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
410            Self::UnauthorizedOperation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
411            Self::UnsupportedOperationFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
412            Self::Unhandled(e) => &e.meta,
413        }
414    }
415    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::AccessToSnapshotDeniedFault`.
416    pub fn is_access_to_snapshot_denied_fault(&self) -> bool {
417        matches!(self, Self::AccessToSnapshotDeniedFault(_))
418    }
419    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ClusterAlreadyExistsFault`.
420    pub fn is_cluster_already_exists_fault(&self) -> bool {
421        matches!(self, Self::ClusterAlreadyExistsFault(_))
422    }
423    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ClusterParameterGroupNotFoundFault`.
424    pub fn is_cluster_parameter_group_not_found_fault(&self) -> bool {
425        matches!(self, Self::ClusterParameterGroupNotFoundFault(_))
426    }
427    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ClusterQuotaExceededFault`.
428    pub fn is_cluster_quota_exceeded_fault(&self) -> bool {
429        matches!(self, Self::ClusterQuotaExceededFault(_))
430    }
431    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ClusterSecurityGroupNotFoundFault`.
432    pub fn is_cluster_security_group_not_found_fault(&self) -> bool {
433        matches!(self, Self::ClusterSecurityGroupNotFoundFault(_))
434    }
435    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ClusterSnapshotNotFoundFault`.
436    pub fn is_cluster_snapshot_not_found_fault(&self) -> bool {
437        matches!(self, Self::ClusterSnapshotNotFoundFault(_))
438    }
439    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ClusterSubnetGroupNotFoundFault`.
440    pub fn is_cluster_subnet_group_not_found_fault(&self) -> bool {
441        matches!(self, Self::ClusterSubnetGroupNotFoundFault(_))
442    }
443    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::DependentServiceAccessDeniedFault`.
444    pub fn is_dependent_service_access_denied_fault(&self) -> bool {
445        matches!(self, Self::DependentServiceAccessDeniedFault(_))
446    }
447    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::DependentServiceRequestThrottlingFault`.
448    pub fn is_dependent_service_request_throttling_fault(&self) -> bool {
449        matches!(self, Self::DependentServiceRequestThrottlingFault(_))
450    }
451    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::DependentServiceUnavailableFault`.
452    pub fn is_dependent_service_unavailable_fault(&self) -> bool {
453        matches!(self, Self::DependentServiceUnavailableFault(_))
454    }
455    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::HsmClientCertificateNotFoundFault`.
456    pub fn is_hsm_client_certificate_not_found_fault(&self) -> bool {
457        matches!(self, Self::HsmClientCertificateNotFoundFault(_))
458    }
459    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::HsmConfigurationNotFoundFault`.
460    pub fn is_hsm_configuration_not_found_fault(&self) -> bool {
461        matches!(self, Self::HsmConfigurationNotFoundFault(_))
462    }
463    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InsufficientClusterCapacityFault`.
464    pub fn is_insufficient_cluster_capacity_fault(&self) -> bool {
465        matches!(self, Self::InsufficientClusterCapacityFault(_))
466    }
467    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InvalidClusterSnapshotStateFault`.
468    pub fn is_invalid_cluster_snapshot_state_fault(&self) -> bool {
469        matches!(self, Self::InvalidClusterSnapshotStateFault(_))
470    }
471    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InvalidClusterSubnetGroupStateFault`.
472    pub fn is_invalid_cluster_subnet_group_state_fault(&self) -> bool {
473        matches!(self, Self::InvalidClusterSubnetGroupStateFault(_))
474    }
475    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InvalidClusterTrackFault`.
476    pub fn is_invalid_cluster_track_fault(&self) -> bool {
477        matches!(self, Self::InvalidClusterTrackFault(_))
478    }
479    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InvalidElasticIpFault`.
480    pub fn is_invalid_elastic_ip_fault(&self) -> bool {
481        matches!(self, Self::InvalidElasticIpFault(_))
482    }
483    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InvalidReservedNodeStateFault`.
484    pub fn is_invalid_reserved_node_state_fault(&self) -> bool {
485        matches!(self, Self::InvalidReservedNodeStateFault(_))
486    }
487    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InvalidRestoreFault`.
488    pub fn is_invalid_restore_fault(&self) -> bool {
489        matches!(self, Self::InvalidRestoreFault(_))
490    }
491    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InvalidSubnet`.
492    pub fn is_invalid_subnet(&self) -> bool {
493        matches!(self, Self::InvalidSubnet(_))
494    }
495    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InvalidTagFault`.
496    pub fn is_invalid_tag_fault(&self) -> bool {
497        matches!(self, Self::InvalidTagFault(_))
498    }
499    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::InvalidVpcNetworkStateFault`.
500    pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
501        matches!(self, Self::InvalidVpcNetworkStateFault(_))
502    }
503    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::Ipv6CidrBlockNotFoundFault`.
504    pub fn is_ipv6_cidr_block_not_found_fault(&self) -> bool {
505        matches!(self, Self::Ipv6CidrBlockNotFoundFault(_))
506    }
507    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::LimitExceededFault`.
508    pub fn is_limit_exceeded_fault(&self) -> bool {
509        matches!(self, Self::LimitExceededFault(_))
510    }
511    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::NumberOfNodesPerClusterLimitExceededFault`.
512    pub fn is_number_of_nodes_per_cluster_limit_exceeded_fault(&self) -> bool {
513        matches!(self, Self::NumberOfNodesPerClusterLimitExceededFault(_))
514    }
515    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::NumberOfNodesQuotaExceededFault`.
516    pub fn is_number_of_nodes_quota_exceeded_fault(&self) -> bool {
517        matches!(self, Self::NumberOfNodesQuotaExceededFault(_))
518    }
519    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::RedshiftIdcApplicationNotExistsFault`.
520    pub fn is_redshift_idc_application_not_exists_fault(&self) -> bool {
521        matches!(self, Self::RedshiftIdcApplicationNotExistsFault(_))
522    }
523    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ReservedNodeAlreadyExistsFault`.
524    pub fn is_reserved_node_already_exists_fault(&self) -> bool {
525        matches!(self, Self::ReservedNodeAlreadyExistsFault(_))
526    }
527    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ReservedNodeAlreadyMigratedFault`.
528    pub fn is_reserved_node_already_migrated_fault(&self) -> bool {
529        matches!(self, Self::ReservedNodeAlreadyMigratedFault(_))
530    }
531    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ReservedNodeNotFoundFault`.
532    pub fn is_reserved_node_not_found_fault(&self) -> bool {
533        matches!(self, Self::ReservedNodeNotFoundFault(_))
534    }
535    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::ReservedNodeOfferingNotFoundFault`.
536    pub fn is_reserved_node_offering_not_found_fault(&self) -> bool {
537        matches!(self, Self::ReservedNodeOfferingNotFoundFault(_))
538    }
539    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::SnapshotScheduleNotFoundFault`.
540    pub fn is_snapshot_schedule_not_found_fault(&self) -> bool {
541        matches!(self, Self::SnapshotScheduleNotFoundFault(_))
542    }
543    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::TagLimitExceededFault`.
544    pub fn is_tag_limit_exceeded_fault(&self) -> bool {
545        matches!(self, Self::TagLimitExceededFault(_))
546    }
547    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::UnauthorizedOperation`.
548    pub fn is_unauthorized_operation(&self) -> bool {
549        matches!(self, Self::UnauthorizedOperation(_))
550    }
551    /// Returns `true` if the error kind is `RestoreFromClusterSnapshotError::UnsupportedOperationFault`.
552    pub fn is_unsupported_operation_fault(&self) -> bool {
553        matches!(self, Self::UnsupportedOperationFault(_))
554    }
555}
556impl ::std::error::Error for RestoreFromClusterSnapshotError {
557    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
558        match self {
559            Self::AccessToSnapshotDeniedFault(_inner) => ::std::option::Option::Some(_inner),
560            Self::ClusterAlreadyExistsFault(_inner) => ::std::option::Option::Some(_inner),
561            Self::ClusterParameterGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
562            Self::ClusterQuotaExceededFault(_inner) => ::std::option::Option::Some(_inner),
563            Self::ClusterSecurityGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
564            Self::ClusterSnapshotNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
565            Self::ClusterSubnetGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
566            Self::DependentServiceAccessDeniedFault(_inner) => ::std::option::Option::Some(_inner),
567            Self::DependentServiceRequestThrottlingFault(_inner) => ::std::option::Option::Some(_inner),
568            Self::DependentServiceUnavailableFault(_inner) => ::std::option::Option::Some(_inner),
569            Self::HsmClientCertificateNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
570            Self::HsmConfigurationNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
571            Self::InsufficientClusterCapacityFault(_inner) => ::std::option::Option::Some(_inner),
572            Self::InvalidClusterSnapshotStateFault(_inner) => ::std::option::Option::Some(_inner),
573            Self::InvalidClusterSubnetGroupStateFault(_inner) => ::std::option::Option::Some(_inner),
574            Self::InvalidClusterTrackFault(_inner) => ::std::option::Option::Some(_inner),
575            Self::InvalidElasticIpFault(_inner) => ::std::option::Option::Some(_inner),
576            Self::InvalidReservedNodeStateFault(_inner) => ::std::option::Option::Some(_inner),
577            Self::InvalidRestoreFault(_inner) => ::std::option::Option::Some(_inner),
578            Self::InvalidSubnet(_inner) => ::std::option::Option::Some(_inner),
579            Self::InvalidTagFault(_inner) => ::std::option::Option::Some(_inner),
580            Self::InvalidVpcNetworkStateFault(_inner) => ::std::option::Option::Some(_inner),
581            Self::Ipv6CidrBlockNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
582            Self::LimitExceededFault(_inner) => ::std::option::Option::Some(_inner),
583            Self::NumberOfNodesPerClusterLimitExceededFault(_inner) => ::std::option::Option::Some(_inner),
584            Self::NumberOfNodesQuotaExceededFault(_inner) => ::std::option::Option::Some(_inner),
585            Self::RedshiftIdcApplicationNotExistsFault(_inner) => ::std::option::Option::Some(_inner),
586            Self::ReservedNodeAlreadyExistsFault(_inner) => ::std::option::Option::Some(_inner),
587            Self::ReservedNodeAlreadyMigratedFault(_inner) => ::std::option::Option::Some(_inner),
588            Self::ReservedNodeNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
589            Self::ReservedNodeOfferingNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
590            Self::SnapshotScheduleNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
591            Self::TagLimitExceededFault(_inner) => ::std::option::Option::Some(_inner),
592            Self::UnauthorizedOperation(_inner) => ::std::option::Option::Some(_inner),
593            Self::UnsupportedOperationFault(_inner) => ::std::option::Option::Some(_inner),
594            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
595        }
596    }
597}
598impl ::std::fmt::Display for RestoreFromClusterSnapshotError {
599    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
600        match self {
601            Self::AccessToSnapshotDeniedFault(_inner) => _inner.fmt(f),
602            Self::ClusterAlreadyExistsFault(_inner) => _inner.fmt(f),
603            Self::ClusterParameterGroupNotFoundFault(_inner) => _inner.fmt(f),
604            Self::ClusterQuotaExceededFault(_inner) => _inner.fmt(f),
605            Self::ClusterSecurityGroupNotFoundFault(_inner) => _inner.fmt(f),
606            Self::ClusterSnapshotNotFoundFault(_inner) => _inner.fmt(f),
607            Self::ClusterSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
608            Self::DependentServiceAccessDeniedFault(_inner) => _inner.fmt(f),
609            Self::DependentServiceRequestThrottlingFault(_inner) => _inner.fmt(f),
610            Self::DependentServiceUnavailableFault(_inner) => _inner.fmt(f),
611            Self::HsmClientCertificateNotFoundFault(_inner) => _inner.fmt(f),
612            Self::HsmConfigurationNotFoundFault(_inner) => _inner.fmt(f),
613            Self::InsufficientClusterCapacityFault(_inner) => _inner.fmt(f),
614            Self::InvalidClusterSnapshotStateFault(_inner) => _inner.fmt(f),
615            Self::InvalidClusterSubnetGroupStateFault(_inner) => _inner.fmt(f),
616            Self::InvalidClusterTrackFault(_inner) => _inner.fmt(f),
617            Self::InvalidElasticIpFault(_inner) => _inner.fmt(f),
618            Self::InvalidReservedNodeStateFault(_inner) => _inner.fmt(f),
619            Self::InvalidRestoreFault(_inner) => _inner.fmt(f),
620            Self::InvalidSubnet(_inner) => _inner.fmt(f),
621            Self::InvalidTagFault(_inner) => _inner.fmt(f),
622            Self::InvalidVpcNetworkStateFault(_inner) => _inner.fmt(f),
623            Self::Ipv6CidrBlockNotFoundFault(_inner) => _inner.fmt(f),
624            Self::LimitExceededFault(_inner) => _inner.fmt(f),
625            Self::NumberOfNodesPerClusterLimitExceededFault(_inner) => _inner.fmt(f),
626            Self::NumberOfNodesQuotaExceededFault(_inner) => _inner.fmt(f),
627            Self::RedshiftIdcApplicationNotExistsFault(_inner) => _inner.fmt(f),
628            Self::ReservedNodeAlreadyExistsFault(_inner) => _inner.fmt(f),
629            Self::ReservedNodeAlreadyMigratedFault(_inner) => _inner.fmt(f),
630            Self::ReservedNodeNotFoundFault(_inner) => _inner.fmt(f),
631            Self::ReservedNodeOfferingNotFoundFault(_inner) => _inner.fmt(f),
632            Self::SnapshotScheduleNotFoundFault(_inner) => _inner.fmt(f),
633            Self::TagLimitExceededFault(_inner) => _inner.fmt(f),
634            Self::UnauthorizedOperation(_inner) => _inner.fmt(f),
635            Self::UnsupportedOperationFault(_inner) => _inner.fmt(f),
636            Self::Unhandled(_inner) => {
637                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
638                    write!(f, "unhandled error ({code})")
639                } else {
640                    f.write_str("unhandled error")
641                }
642            }
643        }
644    }
645}
646impl ::aws_smithy_types::retry::ProvideErrorKind for RestoreFromClusterSnapshotError {
647    fn code(&self) -> ::std::option::Option<&str> {
648        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
649    }
650    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
651        ::std::option::Option::None
652    }
653}
654impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for RestoreFromClusterSnapshotError {
655    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
656        match self {
657            Self::AccessToSnapshotDeniedFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
658            Self::ClusterAlreadyExistsFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
659            Self::ClusterParameterGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
660            Self::ClusterQuotaExceededFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
661            Self::ClusterSecurityGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
662            Self::ClusterSnapshotNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
663            Self::ClusterSubnetGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
664            Self::DependentServiceAccessDeniedFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
665            Self::DependentServiceRequestThrottlingFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
666            Self::DependentServiceUnavailableFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
667            Self::HsmClientCertificateNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
668            Self::HsmConfigurationNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
669            Self::InsufficientClusterCapacityFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
670            Self::InvalidClusterSnapshotStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
671            Self::InvalidClusterSubnetGroupStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
672            Self::InvalidClusterTrackFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
673            Self::InvalidElasticIpFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
674            Self::InvalidReservedNodeStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
675            Self::InvalidRestoreFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
676            Self::InvalidSubnet(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
677            Self::InvalidTagFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
678            Self::InvalidVpcNetworkStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
679            Self::Ipv6CidrBlockNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
680            Self::LimitExceededFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
681            Self::NumberOfNodesPerClusterLimitExceededFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
682            Self::NumberOfNodesQuotaExceededFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
683            Self::RedshiftIdcApplicationNotExistsFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
684            Self::ReservedNodeAlreadyExistsFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
685            Self::ReservedNodeAlreadyMigratedFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
686            Self::ReservedNodeNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
687            Self::ReservedNodeOfferingNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
688            Self::SnapshotScheduleNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
689            Self::TagLimitExceededFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
690            Self::UnauthorizedOperation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
691            Self::UnsupportedOperationFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
692            Self::Unhandled(_inner) => &_inner.meta,
693        }
694    }
695}
696impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for RestoreFromClusterSnapshotError {
697    fn create_unhandled_error(
698        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
699        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
700    ) -> Self {
701        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
702            source,
703            meta: meta.unwrap_or_default(),
704        })
705    }
706}
707impl ::aws_types::request_id::RequestId for crate::operation::restore_from_cluster_snapshot::RestoreFromClusterSnapshotError {
708    fn request_id(&self) -> Option<&str> {
709        self.meta().request_id()
710    }
711}
712
713pub use crate::operation::restore_from_cluster_snapshot::_restore_from_cluster_snapshot_input::RestoreFromClusterSnapshotInput;
714
715pub use crate::operation::restore_from_cluster_snapshot::_restore_from_cluster_snapshot_output::RestoreFromClusterSnapshotOutput;
716
717mod _restore_from_cluster_snapshot_input;
718
719mod _restore_from_cluster_snapshot_output;
720
721/// Builders
722pub mod builders;