Skip to main content

aws_sdk_cloudfront/operation/
copy_distribution.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `CopyDistribution`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CopyDistribution;
6impl CopyDistribution {
7    /// Creates a new `CopyDistribution`
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::copy_distribution::CopyDistributionInput,
14    ) -> ::std::result::Result<
15        crate::operation::copy_distribution::CopyDistributionOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::copy_distribution::CopyDistributionError,
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::copy_distribution::CopyDistributionError>()
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::copy_distribution::CopyDistributionOutput>()
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::copy_distribution::CopyDistributionInput,
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("CloudFront", "CopyDistribution", input, runtime_plugins, stop_point)
55            // Create a parent span for the entire operation. Includes a random, internal-only,
56            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
57            .instrument(::tracing::debug_span!(
58                "CloudFront.CopyDistribution",
59                "rpc.service" = "CloudFront",
60                "rpc.method" = "CopyDistribution",
61                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62                "rpc.system" = "aws-api",
63            ))
64            .await
65    }
66
67    pub(crate) fn operation_runtime_plugins(
68        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69        client_config: &crate::config::Config,
70        config_override: ::std::option::Option<crate::config::Builder>,
71    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73
74        if let ::std::option::Option::Some(config_override) = config_override {
75            for plugin in config_override.runtime_plugins.iter().cloned() {
76                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77            }
78            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79                config_override,
80                client_config.config.clone(),
81                &client_config.runtime_components,
82            ));
83        }
84        runtime_plugins
85    }
86}
87impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CopyDistribution {
88    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CopyDistribution");
90
91        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92            CopyDistributionRequestSerializer,
93        ));
94        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95            CopyDistributionResponseDeserializer,
96        ));
97
98        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99            crate::config::auth::Params::builder()
100                .operation_name("CopyDistribution")
101                .build()
102                .expect("required fields set"),
103        ));
104
105        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
106        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
107            "CopyDistribution",
108            "CloudFront",
109        ));
110        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
111        signing_options.double_uri_encode = true;
112        signing_options.content_sha256_header = false;
113        signing_options.normalize_uri_path = true;
114        signing_options.payload_override = None;
115
116        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
117            signing_options,
118            ..::std::default::Default::default()
119        });
120
121        ::std::option::Option::Some(cfg.freeze())
122    }
123
124    fn runtime_components(
125        &self,
126        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
127    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
128        #[allow(unused_mut)]
129        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CopyDistribution")
130            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
131                CopyDistributionTelemetryInputCaptureInterceptor,
132            ))
133            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
134                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
135            ))
136            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
137                CopyDistributionEndpointParamsInterceptor,
138            ))
139            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
140                crate::operation::copy_distribution::CopyDistributionError,
141            >::new())
142            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
143                crate::operation::copy_distribution::CopyDistributionError,
144            >::new())
145            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
146                crate::operation::copy_distribution::CopyDistributionError,
147            >::new());
148
149        ::std::borrow::Cow::Owned(rcb)
150    }
151}
152
153#[derive(Debug)]
154struct CopyDistributionTelemetryInputCaptureInterceptor;
155
156#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
157impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CopyDistributionTelemetryInputCaptureInterceptor {
158    fn name(&self) -> &'static str {
159        "CopyDistributionTelemetryInputCaptureInterceptor"
160    }
161
162    fn read_before_execution(
163        &self,
164        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
165            '_,
166            ::aws_smithy_runtime_api::client::interceptors::context::Input,
167            ::aws_smithy_runtime_api::client::interceptors::context::Output,
168            ::aws_smithy_runtime_api::client::interceptors::context::Error,
169        >,
170        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
171    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
172        // Nothing to do unless the customer opted in by naming members to record.
173        let ::std::option::Option::Some(requested) = cfg
174            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
175            .filter(|r| !r.is_empty())
176        else {
177            return ::std::result::Result::Ok(());
178        };
179
180        let ::std::option::Option::Some(input) = context.input().downcast_ref::<CopyDistributionInput>() else {
181            // A mismatched input is not this interceptor's concern; skip quietly.
182            return ::std::result::Result::Ok(());
183        };
184
185        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
186        if requested.should_capture("PrimaryDistributionId") {
187            if let ::std::option::Option::Some(value) = input.primary_distribution_id.as_deref() {
188                captured.insert("PrimaryDistributionId", value);
189            }
190        }
191        if requested.should_capture("IfMatch") {
192            if let ::std::option::Option::Some(value) = input.if_match.as_deref() {
193                captured.insert("IfMatch", value);
194            }
195        }
196        if requested.should_capture("CallerReference") {
197            if let ::std::option::Option::Some(value) = input.caller_reference.as_deref() {
198                captured.insert("CallerReference", value);
199            }
200        }
201
202        cfg.interceptor_state().store_put(captured);
203        ::std::result::Result::Ok(())
204    }
205}
206#[derive(Debug)]
207struct CopyDistributionResponseDeserializer;
208impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CopyDistributionResponseDeserializer {
209    fn deserialize_nonstreaming_with_config(
210        &self,
211        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
212        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
213    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
214        let (success, status) = (response.status().is_success(), response.status().as_u16());
215        let headers = response.headers();
216        let body = response.body().bytes().expect("body loaded");
217        #[allow(unused_mut)]
218        let mut force_error = false;
219        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
220        let parse_result = if !success && status != 201 || force_error {
221            crate::protocol_serde::shape_copy_distribution::de_copy_distribution_http_error(status, headers, body)
222        } else {
223            crate::protocol_serde::shape_copy_distribution::de_copy_distribution_http_response(status, headers, body)
224        };
225        crate::protocol_serde::type_erase_result(parse_result)
226    }
227}
228#[derive(Debug)]
229struct CopyDistributionRequestSerializer;
230impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CopyDistributionRequestSerializer {
231    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
232    fn serialize_input(
233        &self,
234        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
235        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
236    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
237        let input = input
238            .downcast::<crate::operation::copy_distribution::CopyDistributionInput>()
239            .expect("correct type");
240        let _header_serialization_settings = _cfg
241            .load::<crate::serialization_settings::HeaderSerializationSettings>()
242            .cloned()
243            .unwrap_or_default();
244        let mut request_builder = {
245            #[allow(clippy::uninlined_format_args)]
246            fn uri_base(
247                _input: &crate::operation::copy_distribution::CopyDistributionInput,
248                output: &mut ::std::string::String,
249            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
250                use ::std::fmt::Write as _;
251                let input_1 = &_input.primary_distribution_id;
252                let input_1 = input_1.as_ref().ok_or_else(|| {
253                    ::aws_smithy_types::error::operation::BuildError::missing_field("primary_distribution_id", "cannot be empty or unset")
254                })?;
255                let primary_distribution_id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
256                if primary_distribution_id.is_empty() {
257                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
258                        "primary_distribution_id",
259                        "cannot be empty or unset",
260                    ));
261                }
262                ::std::write!(
263                    output,
264                    "/2020-05-31/distribution/{PrimaryDistributionId}/copy",
265                    PrimaryDistributionId = primary_distribution_id
266                )
267                .expect("formatting should succeed");
268                ::std::result::Result::Ok(())
269            }
270            #[allow(clippy::unnecessary_wraps)]
271            fn update_http_builder(
272                input: &crate::operation::copy_distribution::CopyDistributionInput,
273                builder: ::http_1x::request::Builder,
274            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
275                let mut uri = ::std::string::String::new();
276                uri_base(input, &mut uri)?;
277                let builder = crate::protocol_serde::shape_copy_distribution::ser_copy_distribution_headers(input, builder)?;
278                ::std::result::Result::Ok(builder.method("POST").uri(uri))
279            }
280            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
281            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/xml");
282            builder
283        };
284        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_copy_distribution::ser_copy_distribution_op_input(&input)?);
285        if let Some(content_length) = body.content_length() {
286            let content_length = content_length.to_string();
287            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
288        }
289        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
290    }
291}
292#[derive(Debug)]
293struct CopyDistributionEndpointParamsInterceptor;
294
295#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
296impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CopyDistributionEndpointParamsInterceptor {
297    fn name(&self) -> &'static str {
298        "CopyDistributionEndpointParamsInterceptor"
299    }
300
301    fn read_before_execution(
302        &self,
303        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
304            '_,
305            ::aws_smithy_runtime_api::client::interceptors::context::Input,
306            ::aws_smithy_runtime_api::client::interceptors::context::Output,
307            ::aws_smithy_runtime_api::client::interceptors::context::Error,
308        >,
309        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
310    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
311        let _input = context
312            .input()
313            .downcast_ref::<CopyDistributionInput>()
314            .ok_or("failed to downcast to CopyDistributionInput")?;
315
316        let params = crate::config::endpoint::Params::builder()
317            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
318            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
319            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
320            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
321            .build()
322            .map_err(|err| {
323                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
324            })?;
325        cfg.interceptor_state()
326            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
327        ::std::result::Result::Ok(())
328    }
329}
330
331// The get_* functions below are generated from JMESPath expressions in the
332// operationContextParams trait. They target the operation's input shape.
333
334/// Error type for the `CopyDistributionError` operation.
335#[non_exhaustive]
336#[derive(::std::fmt::Debug)]
337pub enum CopyDistributionError {
338    /// <p>Access denied.</p>
339    AccessDenied(crate::types::error::AccessDenied),
340    /// <p>The CNAME specified is already defined for CloudFront.</p>
341    CnameAlreadyExists(crate::types::error::CnameAlreadyExists),
342    /// <p>The caller reference you attempted to create the distribution with is associated with another distribution.</p>
343    DistributionAlreadyExists(crate::types::error::DistributionAlreadyExists),
344    /// <p>The specified configuration for field-level encryption can't be associated with the specified cache behavior.</p>
345    IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(crate::types::error::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior),
346    /// <p>The value of <code>Quantity</code> and the size of <code>Items</code> don't match.</p>
347    InconsistentQuantities(crate::types::error::InconsistentQuantities),
348    /// <p>An argument is invalid.</p>
349    InvalidArgument(crate::types::error::InvalidArgument),
350    /// <p>The default root object file name is too big or contains an invalid character.</p>
351    InvalidDefaultRootObject(crate::types::error::InvalidDefaultRootObject),
352    /// <p>An invalid error code was specified.</p>
353    InvalidErrorCode(crate::types::error::InvalidErrorCode),
354    /// <p>Your request contains forward cookies option which doesn't match with the expectation for the <code>whitelisted</code> list of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected.</p>
355    InvalidForwardCookies(crate::types::error::InvalidForwardCookies),
356    /// <p>A CloudFront function association is invalid.</p>
357    InvalidFunctionAssociation(crate::types::error::InvalidFunctionAssociation),
358    /// <p>The specified geo restriction parameter is not valid.</p>
359    InvalidGeoRestrictionParameter(crate::types::error::InvalidGeoRestrictionParameter),
360    /// <p>The headers specified are not valid for an Amazon S3 origin.</p>
361    InvalidHeadersForS3Origin(crate::types::error::InvalidHeadersForS3Origin),
362    /// <p>The <code>If-Match</code> version is missing or not valid.</p>
363    InvalidIfMatchVersion(crate::types::error::InvalidIfMatchVersion),
364    /// <p>The specified Lambda@Edge function association is invalid.</p>
365    InvalidLambdaFunctionAssociation(crate::types::error::InvalidLambdaFunctionAssociation),
366    /// <p>The location code specified is not valid.</p>
367    InvalidLocationCode(crate::types::error::InvalidLocationCode),
368    /// <p>The minimum protocol version specified is not valid.</p>
369    InvalidMinimumProtocolVersion(crate::types::error::InvalidMinimumProtocolVersion),
370    /// <p>The Amazon S3 origin server specified does not refer to a valid Amazon S3 bucket.</p>
371    InvalidOrigin(crate::types::error::InvalidOrigin),
372    /// <p>The origin access control is not valid.</p>
373    InvalidOriginAccessControl(crate::types::error::InvalidOriginAccessControl),
374    /// <p>The origin access identity is not valid or doesn't exist.</p>
375    InvalidOriginAccessIdentity(crate::types::error::InvalidOriginAccessIdentity),
376    /// <p>The keep alive timeout specified for the origin is not valid.</p>
377    InvalidOriginKeepaliveTimeout(crate::types::error::InvalidOriginKeepaliveTimeout),
378    /// <p>The read timeout specified for the origin is not valid.</p>
379    InvalidOriginReadTimeout(crate::types::error::InvalidOriginReadTimeout),
380    /// <p>You cannot specify SSLv3 as the minimum protocol version if you only want to support only clients that support Server Name Indication (SNI).</p>
381    InvalidProtocolSettings(crate::types::error::InvalidProtocolSettings),
382    /// <p>The query string parameters specified are not valid.</p>
383    InvalidQueryStringParameters(crate::types::error::InvalidQueryStringParameters),
384    /// <p>The relative path is too big, is not URL-encoded, or does not begin with a slash (/).</p>
385    InvalidRelativePath(crate::types::error::InvalidRelativePath),
386    /// <p>This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the <code>RequiredProtocols</code> element from your distribution configuration.</p>
387    InvalidRequiredProtocol(crate::types::error::InvalidRequiredProtocol),
388    /// <p>A response code is not valid.</p>
389    InvalidResponseCode(crate::types::error::InvalidResponseCode),
390    /// <p>The TTL order specified is not valid.</p>
391    InvalidTtlOrder(crate::types::error::InvalidTtlOrder),
392    /// <p>A viewer certificate specified is not valid.</p>
393    InvalidViewerCertificate(crate::types::error::InvalidViewerCertificate),
394    /// <p>A web ACL ID specified is not valid. To specify a web ACL created using the latest version of WAF, use the ACL ARN, for example <code>arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a</code>. To specify a web ACL created using WAF Classic, use the ACL ID, for example <code>473e64fd-f30b-4765-81a0-62ad96dd167a</code>.</p>
395    InvalidWebAclId(crate::types::error::InvalidWebAclId),
396    /// <p>This operation requires a body. Ensure that the body is present and the <code>Content-Type</code> header is set.</p>
397    MissingBody(crate::types::error::MissingBody),
398    /// <p>The cache policy does not exist.</p>
399    NoSuchCachePolicy(crate::types::error::NoSuchCachePolicy),
400    /// <p>The specified distribution does not exist.</p>
401    NoSuchDistribution(crate::types::error::NoSuchDistribution),
402    /// <p>The specified configuration for field-level encryption doesn't exist.</p>
403    NoSuchFieldLevelEncryptionConfig(crate::types::error::NoSuchFieldLevelEncryptionConfig),
404    /// <p>No origin exists with the specified <code>Origin Id</code>.</p>
405    NoSuchOrigin(crate::types::error::NoSuchOrigin),
406    /// <p>The origin request policy does not exist.</p>
407    NoSuchOriginRequestPolicy(crate::types::error::NoSuchOriginRequestPolicy),
408    /// <p>The real-time log configuration does not exist.</p>
409    NoSuchRealtimeLogConfig(crate::types::error::NoSuchRealtimeLogConfig),
410    /// <p>The response headers policy does not exist.</p>
411    NoSuchResponseHeadersPolicy(crate::types::error::NoSuchResponseHeadersPolicy),
412    /// <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</p>
413    PreconditionFailed(crate::types::error::PreconditionFailed),
414    /// <p>The specified real-time log configuration belongs to a different Amazon Web Services account.</p>
415    RealtimeLogConfigOwnerMismatch(crate::types::error::RealtimeLogConfigOwnerMismatch),
416    /// <p>You cannot create more cache behaviors for the distribution.</p>
417    TooManyCacheBehaviors(crate::types::error::TooManyCacheBehaviors),
418    /// <p>You cannot create anymore custom SSL/TLS certificates.</p>
419    TooManyCertificates(crate::types::error::TooManyCertificates),
420    /// <p>Your request contains more cookie names in the whitelist than are allowed per cache behavior.</p>
421    TooManyCookieNamesInWhiteList(crate::types::error::TooManyCookieNamesInWhiteList),
422    /// <p>Your request contains more CNAMEs than are allowed per distribution.</p>
423    TooManyDistributionCnamEs(crate::types::error::TooManyDistributionCnamEs),
424    /// <p>Processing your request would cause you to exceed the maximum number of distributions allowed.</p>
425    TooManyDistributions(crate::types::error::TooManyDistributions),
426    /// <p>The maximum number of distributions have been associated with the specified cache policy. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
427    TooManyDistributionsAssociatedToCachePolicy(crate::types::error::TooManyDistributionsAssociatedToCachePolicy),
428    /// <p>The maximum number of distributions have been associated with the specified configuration for field-level encryption.</p>
429    TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(crate::types::error::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig),
430    /// <p>The number of distributions that reference this key group is more than the maximum allowed. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
431    TooManyDistributionsAssociatedToKeyGroup(crate::types::error::TooManyDistributionsAssociatedToKeyGroup),
432    /// <p>The maximum number of distributions have been associated with the specified origin access control.</p>
433    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
434    TooManyDistributionsAssociatedToOriginAccessControl(crate::types::error::TooManyDistributionsAssociatedToOriginAccessControl),
435    /// <p>The maximum number of distributions have been associated with the specified origin request policy. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
436    TooManyDistributionsAssociatedToOriginRequestPolicy(crate::types::error::TooManyDistributionsAssociatedToOriginRequestPolicy),
437    /// <p>The maximum number of distributions have been associated with the specified response headers policy.</p>
438    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
439    TooManyDistributionsAssociatedToResponseHeadersPolicy(crate::types::error::TooManyDistributionsAssociatedToResponseHeadersPolicy),
440    /// <p>You have reached the maximum number of distributions that are associated with a CloudFront function. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
441    TooManyDistributionsWithFunctionAssociations(crate::types::error::TooManyDistributionsWithFunctionAssociations),
442    /// <p>Processing your request would cause the maximum number of distributions with Lambda@Edge function associations per owner to be exceeded.</p>
443    TooManyDistributionsWithLambdaAssociations(crate::types::error::TooManyDistributionsWithLambdaAssociations),
444    /// <p>The maximum number of distributions have been associated with the specified Lambda@Edge function.</p>
445    TooManyDistributionsWithSingleFunctionArn(crate::types::error::TooManyDistributionsWithSingleFunctionArn),
446    /// <p>You have reached the maximum number of CloudFront function associations for this distribution. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
447    TooManyFunctionAssociations(crate::types::error::TooManyFunctionAssociations),
448    /// <p>Your request contains too many headers in forwarded values.</p>
449    TooManyHeadersInForwardedValues(crate::types::error::TooManyHeadersInForwardedValues),
450    /// <p>The number of key groups referenced by this distribution is more than the maximum allowed. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
451    TooManyKeyGroupsAssociatedToDistribution(crate::types::error::TooManyKeyGroupsAssociatedToDistribution),
452    /// <p>Your request contains more Lambda@Edge function associations than are allowed per distribution.</p>
453    TooManyLambdaFunctionAssociations(crate::types::error::TooManyLambdaFunctionAssociations),
454    /// <p>Your request contains too many origin custom headers.</p>
455    TooManyOriginCustomHeaders(crate::types::error::TooManyOriginCustomHeaders),
456    /// <p>Processing your request would cause you to exceed the maximum number of origin groups allowed.</p>
457    TooManyOriginGroupsPerDistribution(crate::types::error::TooManyOriginGroupsPerDistribution),
458    /// <p>You cannot create more origins for the distribution.</p>
459    TooManyOrigins(crate::types::error::TooManyOrigins),
460    /// <p>Your request contains too many query string parameters.</p>
461    TooManyQueryStringParameters(crate::types::error::TooManyQueryStringParameters),
462    /// <p>Your request contains more trusted signers than are allowed per distribution.</p>
463    TooManyTrustedSigners(crate::types::error::TooManyTrustedSigners),
464    /// <p>The specified key group does not exist.</p>
465    TrustedKeyGroupDoesNotExist(crate::types::error::TrustedKeyGroupDoesNotExist),
466    /// <p>One or more of your trusted signers don't exist.</p>
467    TrustedSignerDoesNotExist(crate::types::error::TrustedSignerDoesNotExist),
468    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
469    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
470    variable wildcard pattern and check `.code()`:
471     \
472    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
473     \
474    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CopyDistributionError) for what information is available for the error.")]
475    Unhandled(crate::error::sealed_unhandled::Unhandled),
476}
477impl CopyDistributionError {
478    /// Creates the `CopyDistributionError::Unhandled` variant from any error type.
479    pub fn unhandled(
480        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
481    ) -> Self {
482        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
483            source: err.into(),
484            meta: ::std::default::Default::default(),
485        })
486    }
487
488    /// Creates the `CopyDistributionError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
489    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
490        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
491            source: err.clone().into(),
492            meta: err,
493        })
494    }
495    ///
496    /// Returns error metadata, which includes the error code, message,
497    /// request ID, and potentially additional information.
498    ///
499    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
500        match self {
501            Self::AccessDenied(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
502            Self::CnameAlreadyExists(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
503            Self::DistributionAlreadyExists(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
504            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(e) => {
505                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e)
506            }
507            Self::InconsistentQuantities(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
508            Self::InvalidArgument(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
509            Self::InvalidDefaultRootObject(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
510            Self::InvalidErrorCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
511            Self::InvalidForwardCookies(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
512            Self::InvalidFunctionAssociation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
513            Self::InvalidGeoRestrictionParameter(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
514            Self::InvalidHeadersForS3Origin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
515            Self::InvalidIfMatchVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
516            Self::InvalidLambdaFunctionAssociation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
517            Self::InvalidLocationCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
518            Self::InvalidMinimumProtocolVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
519            Self::InvalidOrigin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
520            Self::InvalidOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
521            Self::InvalidOriginAccessIdentity(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
522            Self::InvalidOriginKeepaliveTimeout(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
523            Self::InvalidOriginReadTimeout(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
524            Self::InvalidProtocolSettings(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
525            Self::InvalidQueryStringParameters(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
526            Self::InvalidRelativePath(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
527            Self::InvalidRequiredProtocol(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
528            Self::InvalidResponseCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
529            Self::InvalidTtlOrder(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
530            Self::InvalidViewerCertificate(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
531            Self::InvalidWebAclId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
532            Self::MissingBody(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
533            Self::NoSuchCachePolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
534            Self::NoSuchDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
535            Self::NoSuchFieldLevelEncryptionConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
536            Self::NoSuchOrigin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
537            Self::NoSuchOriginRequestPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
538            Self::NoSuchRealtimeLogConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
539            Self::NoSuchResponseHeadersPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
540            Self::PreconditionFailed(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
541            Self::RealtimeLogConfigOwnerMismatch(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
542            Self::TooManyCacheBehaviors(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
543            Self::TooManyCertificates(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
544            Self::TooManyCookieNamesInWhiteList(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
545            Self::TooManyDistributionCnamEs(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
546            Self::TooManyDistributions(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
547            Self::TooManyDistributionsAssociatedToCachePolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
548            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
549            Self::TooManyDistributionsAssociatedToKeyGroup(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
550            Self::TooManyDistributionsAssociatedToOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
551            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
552            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
553            Self::TooManyDistributionsWithFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
554            Self::TooManyDistributionsWithLambdaAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
555            Self::TooManyDistributionsWithSingleFunctionArn(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
556            Self::TooManyFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
557            Self::TooManyHeadersInForwardedValues(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
558            Self::TooManyKeyGroupsAssociatedToDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
559            Self::TooManyLambdaFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
560            Self::TooManyOriginCustomHeaders(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
561            Self::TooManyOriginGroupsPerDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
562            Self::TooManyOrigins(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
563            Self::TooManyQueryStringParameters(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
564            Self::TooManyTrustedSigners(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
565            Self::TrustedKeyGroupDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
566            Self::TrustedSignerDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
567            Self::Unhandled(e) => &e.meta,
568        }
569    }
570    /// Returns `true` if the error kind is `CopyDistributionError::AccessDenied`.
571    pub fn is_access_denied(&self) -> bool {
572        matches!(self, Self::AccessDenied(_))
573    }
574    /// Returns `true` if the error kind is `CopyDistributionError::CnameAlreadyExists`.
575    pub fn is_cname_already_exists(&self) -> bool {
576        matches!(self, Self::CnameAlreadyExists(_))
577    }
578    /// Returns `true` if the error kind is `CopyDistributionError::DistributionAlreadyExists`.
579    pub fn is_distribution_already_exists(&self) -> bool {
580        matches!(self, Self::DistributionAlreadyExists(_))
581    }
582    /// Returns `true` if the error kind is `CopyDistributionError::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior`.
583    pub fn is_illegal_field_level_encryption_config_association_with_cache_behavior(&self) -> bool {
584        matches!(self, Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_))
585    }
586    /// Returns `true` if the error kind is `CopyDistributionError::InconsistentQuantities`.
587    pub fn is_inconsistent_quantities(&self) -> bool {
588        matches!(self, Self::InconsistentQuantities(_))
589    }
590    /// Returns `true` if the error kind is `CopyDistributionError::InvalidArgument`.
591    pub fn is_invalid_argument(&self) -> bool {
592        matches!(self, Self::InvalidArgument(_))
593    }
594    /// Returns `true` if the error kind is `CopyDistributionError::InvalidDefaultRootObject`.
595    pub fn is_invalid_default_root_object(&self) -> bool {
596        matches!(self, Self::InvalidDefaultRootObject(_))
597    }
598    /// Returns `true` if the error kind is `CopyDistributionError::InvalidErrorCode`.
599    pub fn is_invalid_error_code(&self) -> bool {
600        matches!(self, Self::InvalidErrorCode(_))
601    }
602    /// Returns `true` if the error kind is `CopyDistributionError::InvalidForwardCookies`.
603    pub fn is_invalid_forward_cookies(&self) -> bool {
604        matches!(self, Self::InvalidForwardCookies(_))
605    }
606    /// Returns `true` if the error kind is `CopyDistributionError::InvalidFunctionAssociation`.
607    pub fn is_invalid_function_association(&self) -> bool {
608        matches!(self, Self::InvalidFunctionAssociation(_))
609    }
610    /// Returns `true` if the error kind is `CopyDistributionError::InvalidGeoRestrictionParameter`.
611    pub fn is_invalid_geo_restriction_parameter(&self) -> bool {
612        matches!(self, Self::InvalidGeoRestrictionParameter(_))
613    }
614    /// Returns `true` if the error kind is `CopyDistributionError::InvalidHeadersForS3Origin`.
615    pub fn is_invalid_headers_for_s3_origin(&self) -> bool {
616        matches!(self, Self::InvalidHeadersForS3Origin(_))
617    }
618    /// Returns `true` if the error kind is `CopyDistributionError::InvalidIfMatchVersion`.
619    pub fn is_invalid_if_match_version(&self) -> bool {
620        matches!(self, Self::InvalidIfMatchVersion(_))
621    }
622    /// Returns `true` if the error kind is `CopyDistributionError::InvalidLambdaFunctionAssociation`.
623    pub fn is_invalid_lambda_function_association(&self) -> bool {
624        matches!(self, Self::InvalidLambdaFunctionAssociation(_))
625    }
626    /// Returns `true` if the error kind is `CopyDistributionError::InvalidLocationCode`.
627    pub fn is_invalid_location_code(&self) -> bool {
628        matches!(self, Self::InvalidLocationCode(_))
629    }
630    /// Returns `true` if the error kind is `CopyDistributionError::InvalidMinimumProtocolVersion`.
631    pub fn is_invalid_minimum_protocol_version(&self) -> bool {
632        matches!(self, Self::InvalidMinimumProtocolVersion(_))
633    }
634    /// Returns `true` if the error kind is `CopyDistributionError::InvalidOrigin`.
635    pub fn is_invalid_origin(&self) -> bool {
636        matches!(self, Self::InvalidOrigin(_))
637    }
638    /// Returns `true` if the error kind is `CopyDistributionError::InvalidOriginAccessControl`.
639    pub fn is_invalid_origin_access_control(&self) -> bool {
640        matches!(self, Self::InvalidOriginAccessControl(_))
641    }
642    /// Returns `true` if the error kind is `CopyDistributionError::InvalidOriginAccessIdentity`.
643    pub fn is_invalid_origin_access_identity(&self) -> bool {
644        matches!(self, Self::InvalidOriginAccessIdentity(_))
645    }
646    /// Returns `true` if the error kind is `CopyDistributionError::InvalidOriginKeepaliveTimeout`.
647    pub fn is_invalid_origin_keepalive_timeout(&self) -> bool {
648        matches!(self, Self::InvalidOriginKeepaliveTimeout(_))
649    }
650    /// Returns `true` if the error kind is `CopyDistributionError::InvalidOriginReadTimeout`.
651    pub fn is_invalid_origin_read_timeout(&self) -> bool {
652        matches!(self, Self::InvalidOriginReadTimeout(_))
653    }
654    /// Returns `true` if the error kind is `CopyDistributionError::InvalidProtocolSettings`.
655    pub fn is_invalid_protocol_settings(&self) -> bool {
656        matches!(self, Self::InvalidProtocolSettings(_))
657    }
658    /// Returns `true` if the error kind is `CopyDistributionError::InvalidQueryStringParameters`.
659    pub fn is_invalid_query_string_parameters(&self) -> bool {
660        matches!(self, Self::InvalidQueryStringParameters(_))
661    }
662    /// Returns `true` if the error kind is `CopyDistributionError::InvalidRelativePath`.
663    pub fn is_invalid_relative_path(&self) -> bool {
664        matches!(self, Self::InvalidRelativePath(_))
665    }
666    /// Returns `true` if the error kind is `CopyDistributionError::InvalidRequiredProtocol`.
667    pub fn is_invalid_required_protocol(&self) -> bool {
668        matches!(self, Self::InvalidRequiredProtocol(_))
669    }
670    /// Returns `true` if the error kind is `CopyDistributionError::InvalidResponseCode`.
671    pub fn is_invalid_response_code(&self) -> bool {
672        matches!(self, Self::InvalidResponseCode(_))
673    }
674    /// Returns `true` if the error kind is `CopyDistributionError::InvalidTtlOrder`.
675    pub fn is_invalid_ttl_order(&self) -> bool {
676        matches!(self, Self::InvalidTtlOrder(_))
677    }
678    /// Returns `true` if the error kind is `CopyDistributionError::InvalidViewerCertificate`.
679    pub fn is_invalid_viewer_certificate(&self) -> bool {
680        matches!(self, Self::InvalidViewerCertificate(_))
681    }
682    /// Returns `true` if the error kind is `CopyDistributionError::InvalidWebAclId`.
683    pub fn is_invalid_web_acl_id(&self) -> bool {
684        matches!(self, Self::InvalidWebAclId(_))
685    }
686    /// Returns `true` if the error kind is `CopyDistributionError::MissingBody`.
687    pub fn is_missing_body(&self) -> bool {
688        matches!(self, Self::MissingBody(_))
689    }
690    /// Returns `true` if the error kind is `CopyDistributionError::NoSuchCachePolicy`.
691    pub fn is_no_such_cache_policy(&self) -> bool {
692        matches!(self, Self::NoSuchCachePolicy(_))
693    }
694    /// Returns `true` if the error kind is `CopyDistributionError::NoSuchDistribution`.
695    pub fn is_no_such_distribution(&self) -> bool {
696        matches!(self, Self::NoSuchDistribution(_))
697    }
698    /// Returns `true` if the error kind is `CopyDistributionError::NoSuchFieldLevelEncryptionConfig`.
699    pub fn is_no_such_field_level_encryption_config(&self) -> bool {
700        matches!(self, Self::NoSuchFieldLevelEncryptionConfig(_))
701    }
702    /// Returns `true` if the error kind is `CopyDistributionError::NoSuchOrigin`.
703    pub fn is_no_such_origin(&self) -> bool {
704        matches!(self, Self::NoSuchOrigin(_))
705    }
706    /// Returns `true` if the error kind is `CopyDistributionError::NoSuchOriginRequestPolicy`.
707    pub fn is_no_such_origin_request_policy(&self) -> bool {
708        matches!(self, Self::NoSuchOriginRequestPolicy(_))
709    }
710    /// Returns `true` if the error kind is `CopyDistributionError::NoSuchRealtimeLogConfig`.
711    pub fn is_no_such_realtime_log_config(&self) -> bool {
712        matches!(self, Self::NoSuchRealtimeLogConfig(_))
713    }
714    /// Returns `true` if the error kind is `CopyDistributionError::NoSuchResponseHeadersPolicy`.
715    pub fn is_no_such_response_headers_policy(&self) -> bool {
716        matches!(self, Self::NoSuchResponseHeadersPolicy(_))
717    }
718    /// Returns `true` if the error kind is `CopyDistributionError::PreconditionFailed`.
719    pub fn is_precondition_failed(&self) -> bool {
720        matches!(self, Self::PreconditionFailed(_))
721    }
722    /// Returns `true` if the error kind is `CopyDistributionError::RealtimeLogConfigOwnerMismatch`.
723    pub fn is_realtime_log_config_owner_mismatch(&self) -> bool {
724        matches!(self, Self::RealtimeLogConfigOwnerMismatch(_))
725    }
726    /// Returns `true` if the error kind is `CopyDistributionError::TooManyCacheBehaviors`.
727    pub fn is_too_many_cache_behaviors(&self) -> bool {
728        matches!(self, Self::TooManyCacheBehaviors(_))
729    }
730    /// Returns `true` if the error kind is `CopyDistributionError::TooManyCertificates`.
731    pub fn is_too_many_certificates(&self) -> bool {
732        matches!(self, Self::TooManyCertificates(_))
733    }
734    /// Returns `true` if the error kind is `CopyDistributionError::TooManyCookieNamesInWhiteList`.
735    pub fn is_too_many_cookie_names_in_white_list(&self) -> bool {
736        matches!(self, Self::TooManyCookieNamesInWhiteList(_))
737    }
738    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionCnamEs`.
739    pub fn is_too_many_distribution_cnam_es(&self) -> bool {
740        matches!(self, Self::TooManyDistributionCnamEs(_))
741    }
742    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributions`.
743    pub fn is_too_many_distributions(&self) -> bool {
744        matches!(self, Self::TooManyDistributions(_))
745    }
746    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionsAssociatedToCachePolicy`.
747    pub fn is_too_many_distributions_associated_to_cache_policy(&self) -> bool {
748        matches!(self, Self::TooManyDistributionsAssociatedToCachePolicy(_))
749    }
750    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig`.
751    pub fn is_too_many_distributions_associated_to_field_level_encryption_config(&self) -> bool {
752        matches!(self, Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_))
753    }
754    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionsAssociatedToKeyGroup`.
755    pub fn is_too_many_distributions_associated_to_key_group(&self) -> bool {
756        matches!(self, Self::TooManyDistributionsAssociatedToKeyGroup(_))
757    }
758    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionsAssociatedToOriginAccessControl`.
759    pub fn is_too_many_distributions_associated_to_origin_access_control(&self) -> bool {
760        matches!(self, Self::TooManyDistributionsAssociatedToOriginAccessControl(_))
761    }
762    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionsAssociatedToOriginRequestPolicy`.
763    pub fn is_too_many_distributions_associated_to_origin_request_policy(&self) -> bool {
764        matches!(self, Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_))
765    }
766    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionsAssociatedToResponseHeadersPolicy`.
767    pub fn is_too_many_distributions_associated_to_response_headers_policy(&self) -> bool {
768        matches!(self, Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_))
769    }
770    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionsWithFunctionAssociations`.
771    pub fn is_too_many_distributions_with_function_associations(&self) -> bool {
772        matches!(self, Self::TooManyDistributionsWithFunctionAssociations(_))
773    }
774    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionsWithLambdaAssociations`.
775    pub fn is_too_many_distributions_with_lambda_associations(&self) -> bool {
776        matches!(self, Self::TooManyDistributionsWithLambdaAssociations(_))
777    }
778    /// Returns `true` if the error kind is `CopyDistributionError::TooManyDistributionsWithSingleFunctionArn`.
779    pub fn is_too_many_distributions_with_single_function_arn(&self) -> bool {
780        matches!(self, Self::TooManyDistributionsWithSingleFunctionArn(_))
781    }
782    /// Returns `true` if the error kind is `CopyDistributionError::TooManyFunctionAssociations`.
783    pub fn is_too_many_function_associations(&self) -> bool {
784        matches!(self, Self::TooManyFunctionAssociations(_))
785    }
786    /// Returns `true` if the error kind is `CopyDistributionError::TooManyHeadersInForwardedValues`.
787    pub fn is_too_many_headers_in_forwarded_values(&self) -> bool {
788        matches!(self, Self::TooManyHeadersInForwardedValues(_))
789    }
790    /// Returns `true` if the error kind is `CopyDistributionError::TooManyKeyGroupsAssociatedToDistribution`.
791    pub fn is_too_many_key_groups_associated_to_distribution(&self) -> bool {
792        matches!(self, Self::TooManyKeyGroupsAssociatedToDistribution(_))
793    }
794    /// Returns `true` if the error kind is `CopyDistributionError::TooManyLambdaFunctionAssociations`.
795    pub fn is_too_many_lambda_function_associations(&self) -> bool {
796        matches!(self, Self::TooManyLambdaFunctionAssociations(_))
797    }
798    /// Returns `true` if the error kind is `CopyDistributionError::TooManyOriginCustomHeaders`.
799    pub fn is_too_many_origin_custom_headers(&self) -> bool {
800        matches!(self, Self::TooManyOriginCustomHeaders(_))
801    }
802    /// Returns `true` if the error kind is `CopyDistributionError::TooManyOriginGroupsPerDistribution`.
803    pub fn is_too_many_origin_groups_per_distribution(&self) -> bool {
804        matches!(self, Self::TooManyOriginGroupsPerDistribution(_))
805    }
806    /// Returns `true` if the error kind is `CopyDistributionError::TooManyOrigins`.
807    pub fn is_too_many_origins(&self) -> bool {
808        matches!(self, Self::TooManyOrigins(_))
809    }
810    /// Returns `true` if the error kind is `CopyDistributionError::TooManyQueryStringParameters`.
811    pub fn is_too_many_query_string_parameters(&self) -> bool {
812        matches!(self, Self::TooManyQueryStringParameters(_))
813    }
814    /// Returns `true` if the error kind is `CopyDistributionError::TooManyTrustedSigners`.
815    pub fn is_too_many_trusted_signers(&self) -> bool {
816        matches!(self, Self::TooManyTrustedSigners(_))
817    }
818    /// Returns `true` if the error kind is `CopyDistributionError::TrustedKeyGroupDoesNotExist`.
819    pub fn is_trusted_key_group_does_not_exist(&self) -> bool {
820        matches!(self, Self::TrustedKeyGroupDoesNotExist(_))
821    }
822    /// Returns `true` if the error kind is `CopyDistributionError::TrustedSignerDoesNotExist`.
823    pub fn is_trusted_signer_does_not_exist(&self) -> bool {
824        matches!(self, Self::TrustedSignerDoesNotExist(_))
825    }
826}
827impl ::std::error::Error for CopyDistributionError {
828    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
829        match self {
830            Self::AccessDenied(_inner) => ::std::option::Option::Some(_inner),
831            Self::CnameAlreadyExists(_inner) => ::std::option::Option::Some(_inner),
832            Self::DistributionAlreadyExists(_inner) => ::std::option::Option::Some(_inner),
833            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_inner) => ::std::option::Option::Some(_inner),
834            Self::InconsistentQuantities(_inner) => ::std::option::Option::Some(_inner),
835            Self::InvalidArgument(_inner) => ::std::option::Option::Some(_inner),
836            Self::InvalidDefaultRootObject(_inner) => ::std::option::Option::Some(_inner),
837            Self::InvalidErrorCode(_inner) => ::std::option::Option::Some(_inner),
838            Self::InvalidForwardCookies(_inner) => ::std::option::Option::Some(_inner),
839            Self::InvalidFunctionAssociation(_inner) => ::std::option::Option::Some(_inner),
840            Self::InvalidGeoRestrictionParameter(_inner) => ::std::option::Option::Some(_inner),
841            Self::InvalidHeadersForS3Origin(_inner) => ::std::option::Option::Some(_inner),
842            Self::InvalidIfMatchVersion(_inner) => ::std::option::Option::Some(_inner),
843            Self::InvalidLambdaFunctionAssociation(_inner) => ::std::option::Option::Some(_inner),
844            Self::InvalidLocationCode(_inner) => ::std::option::Option::Some(_inner),
845            Self::InvalidMinimumProtocolVersion(_inner) => ::std::option::Option::Some(_inner),
846            Self::InvalidOrigin(_inner) => ::std::option::Option::Some(_inner),
847            Self::InvalidOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
848            Self::InvalidOriginAccessIdentity(_inner) => ::std::option::Option::Some(_inner),
849            Self::InvalidOriginKeepaliveTimeout(_inner) => ::std::option::Option::Some(_inner),
850            Self::InvalidOriginReadTimeout(_inner) => ::std::option::Option::Some(_inner),
851            Self::InvalidProtocolSettings(_inner) => ::std::option::Option::Some(_inner),
852            Self::InvalidQueryStringParameters(_inner) => ::std::option::Option::Some(_inner),
853            Self::InvalidRelativePath(_inner) => ::std::option::Option::Some(_inner),
854            Self::InvalidRequiredProtocol(_inner) => ::std::option::Option::Some(_inner),
855            Self::InvalidResponseCode(_inner) => ::std::option::Option::Some(_inner),
856            Self::InvalidTtlOrder(_inner) => ::std::option::Option::Some(_inner),
857            Self::InvalidViewerCertificate(_inner) => ::std::option::Option::Some(_inner),
858            Self::InvalidWebAclId(_inner) => ::std::option::Option::Some(_inner),
859            Self::MissingBody(_inner) => ::std::option::Option::Some(_inner),
860            Self::NoSuchCachePolicy(_inner) => ::std::option::Option::Some(_inner),
861            Self::NoSuchDistribution(_inner) => ::std::option::Option::Some(_inner),
862            Self::NoSuchFieldLevelEncryptionConfig(_inner) => ::std::option::Option::Some(_inner),
863            Self::NoSuchOrigin(_inner) => ::std::option::Option::Some(_inner),
864            Self::NoSuchOriginRequestPolicy(_inner) => ::std::option::Option::Some(_inner),
865            Self::NoSuchRealtimeLogConfig(_inner) => ::std::option::Option::Some(_inner),
866            Self::NoSuchResponseHeadersPolicy(_inner) => ::std::option::Option::Some(_inner),
867            Self::PreconditionFailed(_inner) => ::std::option::Option::Some(_inner),
868            Self::RealtimeLogConfigOwnerMismatch(_inner) => ::std::option::Option::Some(_inner),
869            Self::TooManyCacheBehaviors(_inner) => ::std::option::Option::Some(_inner),
870            Self::TooManyCertificates(_inner) => ::std::option::Option::Some(_inner),
871            Self::TooManyCookieNamesInWhiteList(_inner) => ::std::option::Option::Some(_inner),
872            Self::TooManyDistributionCnamEs(_inner) => ::std::option::Option::Some(_inner),
873            Self::TooManyDistributions(_inner) => ::std::option::Option::Some(_inner),
874            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => ::std::option::Option::Some(_inner),
875            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => ::std::option::Option::Some(_inner),
876            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => ::std::option::Option::Some(_inner),
877            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
878            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => ::std::option::Option::Some(_inner),
879            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => ::std::option::Option::Some(_inner),
880            Self::TooManyDistributionsWithFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
881            Self::TooManyDistributionsWithLambdaAssociations(_inner) => ::std::option::Option::Some(_inner),
882            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => ::std::option::Option::Some(_inner),
883            Self::TooManyFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
884            Self::TooManyHeadersInForwardedValues(_inner) => ::std::option::Option::Some(_inner),
885            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => ::std::option::Option::Some(_inner),
886            Self::TooManyLambdaFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
887            Self::TooManyOriginCustomHeaders(_inner) => ::std::option::Option::Some(_inner),
888            Self::TooManyOriginGroupsPerDistribution(_inner) => ::std::option::Option::Some(_inner),
889            Self::TooManyOrigins(_inner) => ::std::option::Option::Some(_inner),
890            Self::TooManyQueryStringParameters(_inner) => ::std::option::Option::Some(_inner),
891            Self::TooManyTrustedSigners(_inner) => ::std::option::Option::Some(_inner),
892            Self::TrustedKeyGroupDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
893            Self::TrustedSignerDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
894            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
895        }
896    }
897}
898impl ::std::fmt::Display for CopyDistributionError {
899    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
900        match self {
901            Self::AccessDenied(_inner) => _inner.fmt(f),
902            Self::CnameAlreadyExists(_inner) => _inner.fmt(f),
903            Self::DistributionAlreadyExists(_inner) => _inner.fmt(f),
904            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_inner) => _inner.fmt(f),
905            Self::InconsistentQuantities(_inner) => _inner.fmt(f),
906            Self::InvalidArgument(_inner) => _inner.fmt(f),
907            Self::InvalidDefaultRootObject(_inner) => _inner.fmt(f),
908            Self::InvalidErrorCode(_inner) => _inner.fmt(f),
909            Self::InvalidForwardCookies(_inner) => _inner.fmt(f),
910            Self::InvalidFunctionAssociation(_inner) => _inner.fmt(f),
911            Self::InvalidGeoRestrictionParameter(_inner) => _inner.fmt(f),
912            Self::InvalidHeadersForS3Origin(_inner) => _inner.fmt(f),
913            Self::InvalidIfMatchVersion(_inner) => _inner.fmt(f),
914            Self::InvalidLambdaFunctionAssociation(_inner) => _inner.fmt(f),
915            Self::InvalidLocationCode(_inner) => _inner.fmt(f),
916            Self::InvalidMinimumProtocolVersion(_inner) => _inner.fmt(f),
917            Self::InvalidOrigin(_inner) => _inner.fmt(f),
918            Self::InvalidOriginAccessControl(_inner) => _inner.fmt(f),
919            Self::InvalidOriginAccessIdentity(_inner) => _inner.fmt(f),
920            Self::InvalidOriginKeepaliveTimeout(_inner) => _inner.fmt(f),
921            Self::InvalidOriginReadTimeout(_inner) => _inner.fmt(f),
922            Self::InvalidProtocolSettings(_inner) => _inner.fmt(f),
923            Self::InvalidQueryStringParameters(_inner) => _inner.fmt(f),
924            Self::InvalidRelativePath(_inner) => _inner.fmt(f),
925            Self::InvalidRequiredProtocol(_inner) => _inner.fmt(f),
926            Self::InvalidResponseCode(_inner) => _inner.fmt(f),
927            Self::InvalidTtlOrder(_inner) => _inner.fmt(f),
928            Self::InvalidViewerCertificate(_inner) => _inner.fmt(f),
929            Self::InvalidWebAclId(_inner) => _inner.fmt(f),
930            Self::MissingBody(_inner) => _inner.fmt(f),
931            Self::NoSuchCachePolicy(_inner) => _inner.fmt(f),
932            Self::NoSuchDistribution(_inner) => _inner.fmt(f),
933            Self::NoSuchFieldLevelEncryptionConfig(_inner) => _inner.fmt(f),
934            Self::NoSuchOrigin(_inner) => _inner.fmt(f),
935            Self::NoSuchOriginRequestPolicy(_inner) => _inner.fmt(f),
936            Self::NoSuchRealtimeLogConfig(_inner) => _inner.fmt(f),
937            Self::NoSuchResponseHeadersPolicy(_inner) => _inner.fmt(f),
938            Self::PreconditionFailed(_inner) => _inner.fmt(f),
939            Self::RealtimeLogConfigOwnerMismatch(_inner) => _inner.fmt(f),
940            Self::TooManyCacheBehaviors(_inner) => _inner.fmt(f),
941            Self::TooManyCertificates(_inner) => _inner.fmt(f),
942            Self::TooManyCookieNamesInWhiteList(_inner) => _inner.fmt(f),
943            Self::TooManyDistributionCnamEs(_inner) => _inner.fmt(f),
944            Self::TooManyDistributions(_inner) => _inner.fmt(f),
945            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => _inner.fmt(f),
946            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => _inner.fmt(f),
947            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => _inner.fmt(f),
948            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => _inner.fmt(f),
949            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => _inner.fmt(f),
950            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => _inner.fmt(f),
951            Self::TooManyDistributionsWithFunctionAssociations(_inner) => _inner.fmt(f),
952            Self::TooManyDistributionsWithLambdaAssociations(_inner) => _inner.fmt(f),
953            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => _inner.fmt(f),
954            Self::TooManyFunctionAssociations(_inner) => _inner.fmt(f),
955            Self::TooManyHeadersInForwardedValues(_inner) => _inner.fmt(f),
956            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => _inner.fmt(f),
957            Self::TooManyLambdaFunctionAssociations(_inner) => _inner.fmt(f),
958            Self::TooManyOriginCustomHeaders(_inner) => _inner.fmt(f),
959            Self::TooManyOriginGroupsPerDistribution(_inner) => _inner.fmt(f),
960            Self::TooManyOrigins(_inner) => _inner.fmt(f),
961            Self::TooManyQueryStringParameters(_inner) => _inner.fmt(f),
962            Self::TooManyTrustedSigners(_inner) => _inner.fmt(f),
963            Self::TrustedKeyGroupDoesNotExist(_inner) => _inner.fmt(f),
964            Self::TrustedSignerDoesNotExist(_inner) => _inner.fmt(f),
965            Self::Unhandled(_inner) => {
966                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
967                    write!(f, "unhandled error ({code})")
968                } else {
969                    f.write_str("unhandled error")
970                }
971            }
972        }
973    }
974}
975impl ::aws_smithy_types::retry::ProvideErrorKind for CopyDistributionError {
976    fn code(&self) -> ::std::option::Option<&str> {
977        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
978    }
979    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
980        ::std::option::Option::None
981    }
982}
983impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CopyDistributionError {
984    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
985        match self {
986            Self::AccessDenied(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
987            Self::CnameAlreadyExists(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
988            Self::DistributionAlreadyExists(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
989            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_inner) => {
990                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
991            }
992            Self::InconsistentQuantities(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
993            Self::InvalidArgument(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
994            Self::InvalidDefaultRootObject(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
995            Self::InvalidErrorCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
996            Self::InvalidForwardCookies(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
997            Self::InvalidFunctionAssociation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
998            Self::InvalidGeoRestrictionParameter(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
999            Self::InvalidHeadersForS3Origin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1000            Self::InvalidIfMatchVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1001            Self::InvalidLambdaFunctionAssociation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1002            Self::InvalidLocationCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1003            Self::InvalidMinimumProtocolVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1004            Self::InvalidOrigin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1005            Self::InvalidOriginAccessControl(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1006            Self::InvalidOriginAccessIdentity(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1007            Self::InvalidOriginKeepaliveTimeout(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1008            Self::InvalidOriginReadTimeout(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1009            Self::InvalidProtocolSettings(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1010            Self::InvalidQueryStringParameters(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1011            Self::InvalidRelativePath(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1012            Self::InvalidRequiredProtocol(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1013            Self::InvalidResponseCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1014            Self::InvalidTtlOrder(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1015            Self::InvalidViewerCertificate(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1016            Self::InvalidWebAclId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1017            Self::MissingBody(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1018            Self::NoSuchCachePolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1019            Self::NoSuchDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1020            Self::NoSuchFieldLevelEncryptionConfig(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1021            Self::NoSuchOrigin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1022            Self::NoSuchOriginRequestPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1023            Self::NoSuchRealtimeLogConfig(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1024            Self::NoSuchResponseHeadersPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1025            Self::PreconditionFailed(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1026            Self::RealtimeLogConfigOwnerMismatch(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1027            Self::TooManyCacheBehaviors(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1028            Self::TooManyCertificates(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1029            Self::TooManyCookieNamesInWhiteList(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1030            Self::TooManyDistributionCnamEs(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1031            Self::TooManyDistributions(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1032            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1033            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => {
1034                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1035            }
1036            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1037            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => {
1038                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1039            }
1040            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => {
1041                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1042            }
1043            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => {
1044                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1045            }
1046            Self::TooManyDistributionsWithFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1047            Self::TooManyDistributionsWithLambdaAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1048            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1049            Self::TooManyFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1050            Self::TooManyHeadersInForwardedValues(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1051            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1052            Self::TooManyLambdaFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1053            Self::TooManyOriginCustomHeaders(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1054            Self::TooManyOriginGroupsPerDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1055            Self::TooManyOrigins(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1056            Self::TooManyQueryStringParameters(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1057            Self::TooManyTrustedSigners(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1058            Self::TrustedKeyGroupDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1059            Self::TrustedSignerDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1060            Self::Unhandled(_inner) => &_inner.meta,
1061        }
1062    }
1063}
1064impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CopyDistributionError {
1065    fn create_unhandled_error(
1066        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
1067        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
1068    ) -> Self {
1069        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
1070            source,
1071            meta: meta.unwrap_or_default(),
1072        })
1073    }
1074}
1075impl ::aws_types::request_id::RequestId for crate::operation::copy_distribution::CopyDistributionError {
1076    fn request_id(&self) -> Option<&str> {
1077        self.meta().request_id()
1078    }
1079}
1080
1081pub use crate::operation::copy_distribution::_copy_distribution_input::CopyDistributionInput;
1082
1083pub use crate::operation::copy_distribution::_copy_distribution_output::CopyDistributionOutput;
1084
1085mod _copy_distribution_input;
1086
1087mod _copy_distribution_output;
1088
1089/// Builders
1090pub mod builders;