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