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