aws_sdk_cloudfront/operation/
update_distribution.rs

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