1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Orchestration and serialization glue logic for `UpdateDistribution`.
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDistribution;
impl UpdateDistribution {
    /// Creates a new `UpdateDistribution`
    pub fn new() -> Self {
        Self
    }
    pub(crate) async fn orchestrate(
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
        input: crate::operation::update_distribution::UpdateDistributionInput,
    ) -> ::std::result::Result<
        crate::operation::update_distribution::UpdateDistributionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_distribution::UpdateDistributionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >| {
            err.map_service_error(|err| {
                err.downcast::<crate::operation::update_distribution::UpdateDistributionError>()
                    .expect("correct error type")
            })
        };
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
            .await
            .map_err(map_err)?;
        let output = context.finalize().map_err(map_err)?;
        ::std::result::Result::Ok(
            output
                .downcast::<crate::operation::update_distribution::UpdateDistributionOutput>()
                .expect("correct output type"),
        )
    }

    pub(crate) async fn orchestrate_with_stop_point(
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
        input: crate::operation::update_distribution::UpdateDistributionInput,
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
    ) -> ::std::result::Result<
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
        ::aws_smithy_runtime_api::client::result::SdkError<
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("cloudfront", "UpdateDistribution", input, runtime_plugins, stop_point)
            .await
    }

    pub(crate) fn operation_runtime_plugins(
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
        client_config: &crate::config::Config,
        config_override: ::std::option::Option<crate::config::Builder>,
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
        runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![
            ::aws_runtime::auth::sigv4::SCHEME_ID,
        ]));
        if let ::std::option::Option::Some(config_override) = config_override {
            for plugin in config_override.runtime_plugins.iter().cloned() {
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
            }
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
                config_override,
                client_config.config.clone(),
                &client_config.runtime_components,
            ));
        }
        runtime_plugins
    }
}
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateDistribution {
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateDistribution");

        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
            UpdateDistributionRequestSerializer,
        ));
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
            UpdateDistributionResponseDeserializer,
        ));

        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
        ));

        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
            "UpdateDistribution",
            "cloudfront",
        ));
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
        signing_options.double_uri_encode = true;
        signing_options.content_sha256_header = false;
        signing_options.normalize_uri_path = true;
        signing_options.payload_override = None;

        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
            signing_options,
            ..::std::default::Default::default()
        });

        ::std::option::Option::Some(cfg.freeze())
    }

    fn runtime_components(
        &self,
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
        #[allow(unused_mut)]
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateDistribution")
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
            .with_interceptor(UpdateDistributionEndpointParamsInterceptor)
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
                crate::operation::update_distribution::UpdateDistributionError,
            >::new())
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
                crate::operation::update_distribution::UpdateDistributionError,
            >::new())
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
                crate::operation::update_distribution::UpdateDistributionError,
            >::new());

        ::std::borrow::Cow::Owned(rcb)
    }
}

#[derive(Debug)]
struct UpdateDistributionResponseDeserializer;
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateDistributionResponseDeserializer {
    fn deserialize_nonstreaming(
        &self,
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
        let (success, status) = (response.status().is_success(), response.status().as_u16());
        let headers = response.headers();
        let body = response.body().bytes().expect("body loaded");
        #[allow(unused_mut)]
        let mut force_error = false;
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
        let parse_result = if !success && status != 200 || force_error {
            crate::protocol_serde::shape_update_distribution::de_update_distribution_http_error(status, headers, body)
        } else {
            crate::protocol_serde::shape_update_distribution::de_update_distribution_http_response(status, headers, body)
        };
        crate::protocol_serde::type_erase_result(parse_result)
    }
}
#[derive(Debug)]
struct UpdateDistributionRequestSerializer;
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateDistributionRequestSerializer {
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
    fn serialize_input(
        &self,
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
        let input = input
            .downcast::<crate::operation::update_distribution::UpdateDistributionInput>()
            .expect("correct type");
        let _header_serialization_settings = _cfg
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
            .cloned()
            .unwrap_or_default();
        let mut request_builder = {
            fn uri_base(
                _input: &crate::operation::update_distribution::UpdateDistributionInput,
                output: &mut ::std::string::String,
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
                use ::std::fmt::Write as _;
                let input_1 = &_input.id;
                let input_1 = input_1
                    .as_ref()
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("id", "cannot be empty or unset"))?;
                let id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
                if id.is_empty() {
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
                        "id",
                        "cannot be empty or unset",
                    ));
                }
                ::std::write!(output, "/2020-05-31/distribution/{Id}/config", Id = id).expect("formatting should succeed");
                ::std::result::Result::Ok(())
            }
            #[allow(clippy::unnecessary_wraps)]
            fn update_http_builder(
                input: &crate::operation::update_distribution::UpdateDistributionInput,
                builder: ::http::request::Builder,
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
                let mut uri = ::std::string::String::new();
                uri_base(input, &mut uri)?;
                let builder = crate::protocol_serde::shape_update_distribution::ser_update_distribution_headers(input, builder)?;
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
            }
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
            builder
        };
        let body = ::aws_smithy_types::body::SdkBody::from(
            crate::protocol_serde::shape_update_distribution_input::ser_distribution_config_http_payload(&input.distribution_config)?,
        );
        if let Some(content_length) = body.content_length() {
            let content_length = content_length.to_string();
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
        }
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
    }
}
#[derive(Debug)]
struct UpdateDistributionEndpointParamsInterceptor;

impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateDistributionEndpointParamsInterceptor {
    fn name(&self) -> &'static str {
        "UpdateDistributionEndpointParamsInterceptor"
    }

    fn read_before_execution(
        &self,
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
            '_,
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
        >,
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
        let _input = context
            .input()
            .downcast_ref::<UpdateDistributionInput>()
            .ok_or("failed to downcast to UpdateDistributionInput")?;

        let params = crate::config::endpoint::Params::builder()
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
            .build()
            .map_err(|err| {
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
            })?;
        cfg.interceptor_state()
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
        ::std::result::Result::Ok(())
    }
}

/// Error type for the `UpdateDistributionError` operation.
#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum UpdateDistributionError {
    /// <p>Access denied.</p>
    AccessDenied(crate::types::error::AccessDenied),
    /// <p>The CNAME specified is already defined for CloudFront.</p>
    CnameAlreadyExists(crate::types::error::CnameAlreadyExists),
    /// <p>You cannot delete a continuous deployment policy that is associated with a primary distribution.</p>
    ContinuousDeploymentPolicyInUse(crate::types::error::ContinuousDeploymentPolicyInUse),
    /// <p>The specified configuration for field-level encryption can't be associated with the specified cache behavior.</p>
    IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(crate::types::error::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior),
    /// <p>An origin cannot contain both an origin access control (OAC) and an origin access identity (OAI).</p>
    IllegalOriginAccessConfiguration(crate::types::error::IllegalOriginAccessConfiguration),
    /// <p>The update contains modifications that are not allowed.</p>
    IllegalUpdate(crate::types::error::IllegalUpdate),
    /// <p>The value of <code>Quantity</code> and the size of <code>Items</code> don't match.</p>
    InconsistentQuantities(crate::types::error::InconsistentQuantities),
    /// <p>An argument is invalid.</p>
    InvalidArgument(crate::types::error::InvalidArgument),
    /// <p>The default root object file name is too big or contains an invalid character.</p>
    InvalidDefaultRootObject(crate::types::error::InvalidDefaultRootObject),
    /// <p>An origin access control is associated with an origin whose domain name is not supported.</p>
    InvalidDomainNameForOriginAccessControl(crate::types::error::InvalidDomainNameForOriginAccessControl),
    /// <p>An invalid error code was specified.</p>
    InvalidErrorCode(crate::types::error::InvalidErrorCode),
    /// <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>
    InvalidForwardCookies(crate::types::error::InvalidForwardCookies),
    /// <p>A CloudFront function association is invalid.</p>
    InvalidFunctionAssociation(crate::types::error::InvalidFunctionAssociation),
    /// <p>The specified geo restriction parameter is not valid.</p>
    InvalidGeoRestrictionParameter(crate::types::error::InvalidGeoRestrictionParameter),
    /// <p>The headers specified are not valid for an Amazon S3 origin.</p>
    InvalidHeadersForS3Origin(crate::types::error::InvalidHeadersForS3Origin),
    /// <p>The <code>If-Match</code> version is missing or not valid.</p>
    InvalidIfMatchVersion(crate::types::error::InvalidIfMatchVersion),
    /// <p>The specified Lambda@Edge function association is invalid.</p>
    InvalidLambdaFunctionAssociation(crate::types::error::InvalidLambdaFunctionAssociation),
    /// <p>The location code specified is not valid.</p>
    InvalidLocationCode(crate::types::error::InvalidLocationCode),
    /// <p>The minimum protocol version specified is not valid.</p>
    InvalidMinimumProtocolVersion(crate::types::error::InvalidMinimumProtocolVersion),
    /// <p>The origin access control is not valid.</p>
    InvalidOriginAccessControl(crate::types::error::InvalidOriginAccessControl),
    /// <p>The origin access identity is not valid or doesn't exist.</p>
    InvalidOriginAccessIdentity(crate::types::error::InvalidOriginAccessIdentity),
    /// <p>The keep alive timeout specified for the origin is not valid.</p>
    InvalidOriginKeepaliveTimeout(crate::types::error::InvalidOriginKeepaliveTimeout),
    /// <p>The read timeout specified for the origin is not valid.</p>
    InvalidOriginReadTimeout(crate::types::error::InvalidOriginReadTimeout),
    /// <p>The query string parameters specified are not valid.</p>
    InvalidQueryStringParameters(crate::types::error::InvalidQueryStringParameters),
    /// <p>The relative path is too big, is not URL-encoded, or does not begin with a slash (/).</p>
    InvalidRelativePath(crate::types::error::InvalidRelativePath),
    /// <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>
    InvalidRequiredProtocol(crate::types::error::InvalidRequiredProtocol),
    /// <p>A response code is not valid.</p>
    InvalidResponseCode(crate::types::error::InvalidResponseCode),
    /// <p>The TTL order specified is not valid.</p>
    InvalidTtlOrder(crate::types::error::InvalidTtlOrder),
    /// <p>A viewer certificate specified is not valid.</p>
    InvalidViewerCertificate(crate::types::error::InvalidViewerCertificate),
    /// <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>
    InvalidWebAclId(crate::types::error::InvalidWebAclId),
    /// <p>This operation requires a body. Ensure that the body is present and the <code>Content-Type</code> header is set.</p>
    MissingBody(crate::types::error::MissingBody),
    /// <p>The cache policy does not exist.</p>
    NoSuchCachePolicy(crate::types::error::NoSuchCachePolicy),
    /// <p>The continuous deployment policy doesn't exist.</p>
    NoSuchContinuousDeploymentPolicy(crate::types::error::NoSuchContinuousDeploymentPolicy),
    /// <p>The specified distribution does not exist.</p>
    NoSuchDistribution(crate::types::error::NoSuchDistribution),
    /// <p>The specified configuration for field-level encryption doesn't exist.</p>
    NoSuchFieldLevelEncryptionConfig(crate::types::error::NoSuchFieldLevelEncryptionConfig),
    /// <p>No origin exists with the specified <code>Origin Id</code>.</p>
    NoSuchOrigin(crate::types::error::NoSuchOrigin),
    /// <p>The origin request policy does not exist.</p>
    NoSuchOriginRequestPolicy(crate::types::error::NoSuchOriginRequestPolicy),
    /// <p>The real-time log configuration does not exist.</p>
    NoSuchRealtimeLogConfig(crate::types::error::NoSuchRealtimeLogConfig),
    /// <p>The response headers policy does not exist.</p>
    NoSuchResponseHeadersPolicy(crate::types::error::NoSuchResponseHeadersPolicy),
    /// <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</p>
    PreconditionFailed(crate::types::error::PreconditionFailed),
    /// <p>The specified real-time log configuration belongs to a different Amazon Web Services account.</p>
    RealtimeLogConfigOwnerMismatch(crate::types::error::RealtimeLogConfigOwnerMismatch),
    /// <p>A continuous deployment policy for this staging distribution already exists.</p>
    StagingDistributionInUse(crate::types::error::StagingDistributionInUse),
    /// <p>You cannot create more cache behaviors for the distribution.</p>
    TooManyCacheBehaviors(crate::types::error::TooManyCacheBehaviors),
    /// <p>You cannot create anymore custom SSL/TLS certificates.</p>
    TooManyCertificates(crate::types::error::TooManyCertificates),
    /// <p>Your request contains more cookie names in the whitelist than are allowed per cache behavior.</p>
    TooManyCookieNamesInWhiteList(crate::types::error::TooManyCookieNamesInWhiteList),
    /// <p>Your request contains more CNAMEs than are allowed per distribution.</p>
    TooManyDistributionCnamEs(crate::types::error::TooManyDistributionCnamEs),
    /// <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>
    TooManyDistributionsAssociatedToCachePolicy(crate::types::error::TooManyDistributionsAssociatedToCachePolicy),
    /// <p>The maximum number of distributions have been associated with the specified configuration for field-level encryption.</p>
    TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(crate::types::error::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig),
    /// <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>
    TooManyDistributionsAssociatedToKeyGroup(crate::types::error::TooManyDistributionsAssociatedToKeyGroup),
    /// <p>The maximum number of distributions have been associated with the specified origin access control.</p>
    /// <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>
    TooManyDistributionsAssociatedToOriginAccessControl(crate::types::error::TooManyDistributionsAssociatedToOriginAccessControl),
    /// <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>
    TooManyDistributionsAssociatedToOriginRequestPolicy(crate::types::error::TooManyDistributionsAssociatedToOriginRequestPolicy),
    /// <p>The maximum number of distributions have been associated with the specified response headers policy.</p>
    /// <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>
    TooManyDistributionsAssociatedToResponseHeadersPolicy(crate::types::error::TooManyDistributionsAssociatedToResponseHeadersPolicy),
    /// <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>
    TooManyDistributionsWithFunctionAssociations(crate::types::error::TooManyDistributionsWithFunctionAssociations),
    /// <p>Processing your request would cause the maximum number of distributions with Lambda@Edge function associations per owner to be exceeded.</p>
    TooManyDistributionsWithLambdaAssociations(crate::types::error::TooManyDistributionsWithLambdaAssociations),
    /// <p>The maximum number of distributions have been associated with the specified Lambda@Edge function.</p>
    TooManyDistributionsWithSingleFunctionArn(crate::types::error::TooManyDistributionsWithSingleFunctionArn),
    /// <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>
    TooManyFunctionAssociations(crate::types::error::TooManyFunctionAssociations),
    /// <p>Your request contains too many headers in forwarded values.</p>
    TooManyHeadersInForwardedValues(crate::types::error::TooManyHeadersInForwardedValues),
    /// <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>
    TooManyKeyGroupsAssociatedToDistribution(crate::types::error::TooManyKeyGroupsAssociatedToDistribution),
    /// <p>Your request contains more Lambda@Edge function associations than are allowed per distribution.</p>
    TooManyLambdaFunctionAssociations(crate::types::error::TooManyLambdaFunctionAssociations),
    /// <p>Your request contains too many origin custom headers.</p>
    TooManyOriginCustomHeaders(crate::types::error::TooManyOriginCustomHeaders),
    /// <p>Processing your request would cause you to exceed the maximum number of origin groups allowed.</p>
    TooManyOriginGroupsPerDistribution(crate::types::error::TooManyOriginGroupsPerDistribution),
    /// <p>You cannot create more origins for the distribution.</p>
    TooManyOrigins(crate::types::error::TooManyOrigins),
    /// <p>Your request contains too many query string parameters.</p>
    TooManyQueryStringParameters(crate::types::error::TooManyQueryStringParameters),
    /// <p>Your request contains more trusted signers than are allowed per distribution.</p>
    TooManyTrustedSigners(crate::types::error::TooManyTrustedSigners),
    /// <p>The specified key group does not exist.</p>
    TrustedKeyGroupDoesNotExist(crate::types::error::TrustedKeyGroupDoesNotExist),
    /// <p>One or more of your trusted signers don't exist.</p>
    TrustedSignerDoesNotExist(crate::types::error::TrustedSignerDoesNotExist),
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
    variable wildcard pattern and check `.code()`:
     \
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
     \
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateDistributionError) for what information is available for the error.")]
    Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl UpdateDistributionError {
    /// Creates the `UpdateDistributionError::Unhandled` variant from any error type.
    pub fn unhandled(
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
    ) -> Self {
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
            source: err.into(),
            meta: ::std::default::Default::default(),
        })
    }

    /// Creates the `UpdateDistributionError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
            source: err.clone().into(),
            meta: err,
        })
    }
    ///
    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    ///
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
        match self {
            Self::AccessDenied(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::CnameAlreadyExists(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::ContinuousDeploymentPolicyInUse(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(e) => {
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e)
            }
            Self::IllegalOriginAccessConfiguration(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::IllegalUpdate(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InconsistentQuantities(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidArgument(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidDefaultRootObject(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidDomainNameForOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidErrorCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidForwardCookies(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidFunctionAssociation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidGeoRestrictionParameter(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidHeadersForS3Origin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidIfMatchVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidLambdaFunctionAssociation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidLocationCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidMinimumProtocolVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidOriginAccessIdentity(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidOriginKeepaliveTimeout(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidOriginReadTimeout(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidQueryStringParameters(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidRelativePath(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidRequiredProtocol(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidResponseCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidTtlOrder(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidViewerCertificate(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::InvalidWebAclId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::MissingBody(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::NoSuchCachePolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::NoSuchContinuousDeploymentPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::NoSuchDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::NoSuchFieldLevelEncryptionConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::NoSuchOrigin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::NoSuchOriginRequestPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::NoSuchRealtimeLogConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::NoSuchResponseHeadersPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::PreconditionFailed(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::RealtimeLogConfigOwnerMismatch(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::StagingDistributionInUse(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyCacheBehaviors(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyCertificates(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyCookieNamesInWhiteList(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionCnamEs(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionsAssociatedToCachePolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionsAssociatedToKeyGroup(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionsAssociatedToOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionsWithFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionsWithLambdaAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyDistributionsWithSingleFunctionArn(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyHeadersInForwardedValues(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyKeyGroupsAssociatedToDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyLambdaFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyOriginCustomHeaders(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyOriginGroupsPerDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyOrigins(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyQueryStringParameters(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TooManyTrustedSigners(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TrustedKeyGroupDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::TrustedSignerDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
            Self::Unhandled(e) => &e.meta,
        }
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::AccessDenied`.
    pub fn is_access_denied(&self) -> bool {
        matches!(self, Self::AccessDenied(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::CnameAlreadyExists`.
    pub fn is_cname_already_exists(&self) -> bool {
        matches!(self, Self::CnameAlreadyExists(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::ContinuousDeploymentPolicyInUse`.
    pub fn is_continuous_deployment_policy_in_use(&self) -> bool {
        matches!(self, Self::ContinuousDeploymentPolicyInUse(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior`.
    pub fn is_illegal_field_level_encryption_config_association_with_cache_behavior(&self) -> bool {
        matches!(self, Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::IllegalOriginAccessConfiguration`.
    pub fn is_illegal_origin_access_configuration(&self) -> bool {
        matches!(self, Self::IllegalOriginAccessConfiguration(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::IllegalUpdate`.
    pub fn is_illegal_update(&self) -> bool {
        matches!(self, Self::IllegalUpdate(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InconsistentQuantities`.
    pub fn is_inconsistent_quantities(&self) -> bool {
        matches!(self, Self::InconsistentQuantities(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidArgument`.
    pub fn is_invalid_argument(&self) -> bool {
        matches!(self, Self::InvalidArgument(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidDefaultRootObject`.
    pub fn is_invalid_default_root_object(&self) -> bool {
        matches!(self, Self::InvalidDefaultRootObject(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidDomainNameForOriginAccessControl`.
    pub fn is_invalid_domain_name_for_origin_access_control(&self) -> bool {
        matches!(self, Self::InvalidDomainNameForOriginAccessControl(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidErrorCode`.
    pub fn is_invalid_error_code(&self) -> bool {
        matches!(self, Self::InvalidErrorCode(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidForwardCookies`.
    pub fn is_invalid_forward_cookies(&self) -> bool {
        matches!(self, Self::InvalidForwardCookies(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidFunctionAssociation`.
    pub fn is_invalid_function_association(&self) -> bool {
        matches!(self, Self::InvalidFunctionAssociation(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidGeoRestrictionParameter`.
    pub fn is_invalid_geo_restriction_parameter(&self) -> bool {
        matches!(self, Self::InvalidGeoRestrictionParameter(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidHeadersForS3Origin`.
    pub fn is_invalid_headers_for_s3_origin(&self) -> bool {
        matches!(self, Self::InvalidHeadersForS3Origin(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidIfMatchVersion`.
    pub fn is_invalid_if_match_version(&self) -> bool {
        matches!(self, Self::InvalidIfMatchVersion(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidLambdaFunctionAssociation`.
    pub fn is_invalid_lambda_function_association(&self) -> bool {
        matches!(self, Self::InvalidLambdaFunctionAssociation(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidLocationCode`.
    pub fn is_invalid_location_code(&self) -> bool {
        matches!(self, Self::InvalidLocationCode(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidMinimumProtocolVersion`.
    pub fn is_invalid_minimum_protocol_version(&self) -> bool {
        matches!(self, Self::InvalidMinimumProtocolVersion(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidOriginAccessControl`.
    pub fn is_invalid_origin_access_control(&self) -> bool {
        matches!(self, Self::InvalidOriginAccessControl(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidOriginAccessIdentity`.
    pub fn is_invalid_origin_access_identity(&self) -> bool {
        matches!(self, Self::InvalidOriginAccessIdentity(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidOriginKeepaliveTimeout`.
    pub fn is_invalid_origin_keepalive_timeout(&self) -> bool {
        matches!(self, Self::InvalidOriginKeepaliveTimeout(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidOriginReadTimeout`.
    pub fn is_invalid_origin_read_timeout(&self) -> bool {
        matches!(self, Self::InvalidOriginReadTimeout(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidQueryStringParameters`.
    pub fn is_invalid_query_string_parameters(&self) -> bool {
        matches!(self, Self::InvalidQueryStringParameters(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidRelativePath`.
    pub fn is_invalid_relative_path(&self) -> bool {
        matches!(self, Self::InvalidRelativePath(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidRequiredProtocol`.
    pub fn is_invalid_required_protocol(&self) -> bool {
        matches!(self, Self::InvalidRequiredProtocol(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidResponseCode`.
    pub fn is_invalid_response_code(&self) -> bool {
        matches!(self, Self::InvalidResponseCode(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidTtlOrder`.
    pub fn is_invalid_ttl_order(&self) -> bool {
        matches!(self, Self::InvalidTtlOrder(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidViewerCertificate`.
    pub fn is_invalid_viewer_certificate(&self) -> bool {
        matches!(self, Self::InvalidViewerCertificate(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidWebAclId`.
    pub fn is_invalid_web_acl_id(&self) -> bool {
        matches!(self, Self::InvalidWebAclId(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::MissingBody`.
    pub fn is_missing_body(&self) -> bool {
        matches!(self, Self::MissingBody(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchCachePolicy`.
    pub fn is_no_such_cache_policy(&self) -> bool {
        matches!(self, Self::NoSuchCachePolicy(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchContinuousDeploymentPolicy`.
    pub fn is_no_such_continuous_deployment_policy(&self) -> bool {
        matches!(self, Self::NoSuchContinuousDeploymentPolicy(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchDistribution`.
    pub fn is_no_such_distribution(&self) -> bool {
        matches!(self, Self::NoSuchDistribution(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchFieldLevelEncryptionConfig`.
    pub fn is_no_such_field_level_encryption_config(&self) -> bool {
        matches!(self, Self::NoSuchFieldLevelEncryptionConfig(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchOrigin`.
    pub fn is_no_such_origin(&self) -> bool {
        matches!(self, Self::NoSuchOrigin(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchOriginRequestPolicy`.
    pub fn is_no_such_origin_request_policy(&self) -> bool {
        matches!(self, Self::NoSuchOriginRequestPolicy(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchRealtimeLogConfig`.
    pub fn is_no_such_realtime_log_config(&self) -> bool {
        matches!(self, Self::NoSuchRealtimeLogConfig(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchResponseHeadersPolicy`.
    pub fn is_no_such_response_headers_policy(&self) -> bool {
        matches!(self, Self::NoSuchResponseHeadersPolicy(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::PreconditionFailed`.
    pub fn is_precondition_failed(&self) -> bool {
        matches!(self, Self::PreconditionFailed(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::RealtimeLogConfigOwnerMismatch`.
    pub fn is_realtime_log_config_owner_mismatch(&self) -> bool {
        matches!(self, Self::RealtimeLogConfigOwnerMismatch(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::StagingDistributionInUse`.
    pub fn is_staging_distribution_in_use(&self) -> bool {
        matches!(self, Self::StagingDistributionInUse(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyCacheBehaviors`.
    pub fn is_too_many_cache_behaviors(&self) -> bool {
        matches!(self, Self::TooManyCacheBehaviors(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyCertificates`.
    pub fn is_too_many_certificates(&self) -> bool {
        matches!(self, Self::TooManyCertificates(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyCookieNamesInWhiteList`.
    pub fn is_too_many_cookie_names_in_white_list(&self) -> bool {
        matches!(self, Self::TooManyCookieNamesInWhiteList(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionCnamEs`.
    pub fn is_too_many_distribution_cnam_es(&self) -> bool {
        matches!(self, Self::TooManyDistributionCnamEs(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToCachePolicy`.
    pub fn is_too_many_distributions_associated_to_cache_policy(&self) -> bool {
        matches!(self, Self::TooManyDistributionsAssociatedToCachePolicy(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig`.
    pub fn is_too_many_distributions_associated_to_field_level_encryption_config(&self) -> bool {
        matches!(self, Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToKeyGroup`.
    pub fn is_too_many_distributions_associated_to_key_group(&self) -> bool {
        matches!(self, Self::TooManyDistributionsAssociatedToKeyGroup(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToOriginAccessControl`.
    pub fn is_too_many_distributions_associated_to_origin_access_control(&self) -> bool {
        matches!(self, Self::TooManyDistributionsAssociatedToOriginAccessControl(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToOriginRequestPolicy`.
    pub fn is_too_many_distributions_associated_to_origin_request_policy(&self) -> bool {
        matches!(self, Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToResponseHeadersPolicy`.
    pub fn is_too_many_distributions_associated_to_response_headers_policy(&self) -> bool {
        matches!(self, Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsWithFunctionAssociations`.
    pub fn is_too_many_distributions_with_function_associations(&self) -> bool {
        matches!(self, Self::TooManyDistributionsWithFunctionAssociations(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsWithLambdaAssociations`.
    pub fn is_too_many_distributions_with_lambda_associations(&self) -> bool {
        matches!(self, Self::TooManyDistributionsWithLambdaAssociations(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsWithSingleFunctionArn`.
    pub fn is_too_many_distributions_with_single_function_arn(&self) -> bool {
        matches!(self, Self::TooManyDistributionsWithSingleFunctionArn(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyFunctionAssociations`.
    pub fn is_too_many_function_associations(&self) -> bool {
        matches!(self, Self::TooManyFunctionAssociations(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyHeadersInForwardedValues`.
    pub fn is_too_many_headers_in_forwarded_values(&self) -> bool {
        matches!(self, Self::TooManyHeadersInForwardedValues(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyKeyGroupsAssociatedToDistribution`.
    pub fn is_too_many_key_groups_associated_to_distribution(&self) -> bool {
        matches!(self, Self::TooManyKeyGroupsAssociatedToDistribution(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyLambdaFunctionAssociations`.
    pub fn is_too_many_lambda_function_associations(&self) -> bool {
        matches!(self, Self::TooManyLambdaFunctionAssociations(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyOriginCustomHeaders`.
    pub fn is_too_many_origin_custom_headers(&self) -> bool {
        matches!(self, Self::TooManyOriginCustomHeaders(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyOriginGroupsPerDistribution`.
    pub fn is_too_many_origin_groups_per_distribution(&self) -> bool {
        matches!(self, Self::TooManyOriginGroupsPerDistribution(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyOrigins`.
    pub fn is_too_many_origins(&self) -> bool {
        matches!(self, Self::TooManyOrigins(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyQueryStringParameters`.
    pub fn is_too_many_query_string_parameters(&self) -> bool {
        matches!(self, Self::TooManyQueryStringParameters(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyTrustedSigners`.
    pub fn is_too_many_trusted_signers(&self) -> bool {
        matches!(self, Self::TooManyTrustedSigners(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TrustedKeyGroupDoesNotExist`.
    pub fn is_trusted_key_group_does_not_exist(&self) -> bool {
        matches!(self, Self::TrustedKeyGroupDoesNotExist(_))
    }
    /// Returns `true` if the error kind is `UpdateDistributionError::TrustedSignerDoesNotExist`.
    pub fn is_trusted_signer_does_not_exist(&self) -> bool {
        matches!(self, Self::TrustedSignerDoesNotExist(_))
    }
}
impl ::std::error::Error for UpdateDistributionError {
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
        match self {
            Self::AccessDenied(_inner) => ::std::option::Option::Some(_inner),
            Self::CnameAlreadyExists(_inner) => ::std::option::Option::Some(_inner),
            Self::ContinuousDeploymentPolicyInUse(_inner) => ::std::option::Option::Some(_inner),
            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_inner) => ::std::option::Option::Some(_inner),
            Self::IllegalOriginAccessConfiguration(_inner) => ::std::option::Option::Some(_inner),
            Self::IllegalUpdate(_inner) => ::std::option::Option::Some(_inner),
            Self::InconsistentQuantities(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidArgument(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidDefaultRootObject(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidDomainNameForOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidErrorCode(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidForwardCookies(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidFunctionAssociation(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidGeoRestrictionParameter(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidHeadersForS3Origin(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidIfMatchVersion(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidLambdaFunctionAssociation(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidLocationCode(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidMinimumProtocolVersion(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidOriginAccessIdentity(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidOriginKeepaliveTimeout(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidOriginReadTimeout(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidQueryStringParameters(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidRelativePath(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidRequiredProtocol(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidResponseCode(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidTtlOrder(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidViewerCertificate(_inner) => ::std::option::Option::Some(_inner),
            Self::InvalidWebAclId(_inner) => ::std::option::Option::Some(_inner),
            Self::MissingBody(_inner) => ::std::option::Option::Some(_inner),
            Self::NoSuchCachePolicy(_inner) => ::std::option::Option::Some(_inner),
            Self::NoSuchContinuousDeploymentPolicy(_inner) => ::std::option::Option::Some(_inner),
            Self::NoSuchDistribution(_inner) => ::std::option::Option::Some(_inner),
            Self::NoSuchFieldLevelEncryptionConfig(_inner) => ::std::option::Option::Some(_inner),
            Self::NoSuchOrigin(_inner) => ::std::option::Option::Some(_inner),
            Self::NoSuchOriginRequestPolicy(_inner) => ::std::option::Option::Some(_inner),
            Self::NoSuchRealtimeLogConfig(_inner) => ::std::option::Option::Some(_inner),
            Self::NoSuchResponseHeadersPolicy(_inner) => ::std::option::Option::Some(_inner),
            Self::PreconditionFailed(_inner) => ::std::option::Option::Some(_inner),
            Self::RealtimeLogConfigOwnerMismatch(_inner) => ::std::option::Option::Some(_inner),
            Self::StagingDistributionInUse(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyCacheBehaviors(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyCertificates(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyCookieNamesInWhiteList(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionCnamEs(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionsWithFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionsWithLambdaAssociations(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyHeadersInForwardedValues(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyLambdaFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyOriginCustomHeaders(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyOriginGroupsPerDistribution(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyOrigins(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyQueryStringParameters(_inner) => ::std::option::Option::Some(_inner),
            Self::TooManyTrustedSigners(_inner) => ::std::option::Option::Some(_inner),
            Self::TrustedKeyGroupDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
            Self::TrustedSignerDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
        }
    }
}
impl ::std::fmt::Display for UpdateDistributionError {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        match self {
            Self::AccessDenied(_inner) => _inner.fmt(f),
            Self::CnameAlreadyExists(_inner) => _inner.fmt(f),
            Self::ContinuousDeploymentPolicyInUse(_inner) => _inner.fmt(f),
            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_inner) => _inner.fmt(f),
            Self::IllegalOriginAccessConfiguration(_inner) => _inner.fmt(f),
            Self::IllegalUpdate(_inner) => _inner.fmt(f),
            Self::InconsistentQuantities(_inner) => _inner.fmt(f),
            Self::InvalidArgument(_inner) => _inner.fmt(f),
            Self::InvalidDefaultRootObject(_inner) => _inner.fmt(f),
            Self::InvalidDomainNameForOriginAccessControl(_inner) => _inner.fmt(f),
            Self::InvalidErrorCode(_inner) => _inner.fmt(f),
            Self::InvalidForwardCookies(_inner) => _inner.fmt(f),
            Self::InvalidFunctionAssociation(_inner) => _inner.fmt(f),
            Self::InvalidGeoRestrictionParameter(_inner) => _inner.fmt(f),
            Self::InvalidHeadersForS3Origin(_inner) => _inner.fmt(f),
            Self::InvalidIfMatchVersion(_inner) => _inner.fmt(f),
            Self::InvalidLambdaFunctionAssociation(_inner) => _inner.fmt(f),
            Self::InvalidLocationCode(_inner) => _inner.fmt(f),
            Self::InvalidMinimumProtocolVersion(_inner) => _inner.fmt(f),
            Self::InvalidOriginAccessControl(_inner) => _inner.fmt(f),
            Self::InvalidOriginAccessIdentity(_inner) => _inner.fmt(f),
            Self::InvalidOriginKeepaliveTimeout(_inner) => _inner.fmt(f),
            Self::InvalidOriginReadTimeout(_inner) => _inner.fmt(f),
            Self::InvalidQueryStringParameters(_inner) => _inner.fmt(f),
            Self::InvalidRelativePath(_inner) => _inner.fmt(f),
            Self::InvalidRequiredProtocol(_inner) => _inner.fmt(f),
            Self::InvalidResponseCode(_inner) => _inner.fmt(f),
            Self::InvalidTtlOrder(_inner) => _inner.fmt(f),
            Self::InvalidViewerCertificate(_inner) => _inner.fmt(f),
            Self::InvalidWebAclId(_inner) => _inner.fmt(f),
            Self::MissingBody(_inner) => _inner.fmt(f),
            Self::NoSuchCachePolicy(_inner) => _inner.fmt(f),
            Self::NoSuchContinuousDeploymentPolicy(_inner) => _inner.fmt(f),
            Self::NoSuchDistribution(_inner) => _inner.fmt(f),
            Self::NoSuchFieldLevelEncryptionConfig(_inner) => _inner.fmt(f),
            Self::NoSuchOrigin(_inner) => _inner.fmt(f),
            Self::NoSuchOriginRequestPolicy(_inner) => _inner.fmt(f),
            Self::NoSuchRealtimeLogConfig(_inner) => _inner.fmt(f),
            Self::NoSuchResponseHeadersPolicy(_inner) => _inner.fmt(f),
            Self::PreconditionFailed(_inner) => _inner.fmt(f),
            Self::RealtimeLogConfigOwnerMismatch(_inner) => _inner.fmt(f),
            Self::StagingDistributionInUse(_inner) => _inner.fmt(f),
            Self::TooManyCacheBehaviors(_inner) => _inner.fmt(f),
            Self::TooManyCertificates(_inner) => _inner.fmt(f),
            Self::TooManyCookieNamesInWhiteList(_inner) => _inner.fmt(f),
            Self::TooManyDistributionCnamEs(_inner) => _inner.fmt(f),
            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => _inner.fmt(f),
            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => _inner.fmt(f),
            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => _inner.fmt(f),
            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => _inner.fmt(f),
            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => _inner.fmt(f),
            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => _inner.fmt(f),
            Self::TooManyDistributionsWithFunctionAssociations(_inner) => _inner.fmt(f),
            Self::TooManyDistributionsWithLambdaAssociations(_inner) => _inner.fmt(f),
            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => _inner.fmt(f),
            Self::TooManyFunctionAssociations(_inner) => _inner.fmt(f),
            Self::TooManyHeadersInForwardedValues(_inner) => _inner.fmt(f),
            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => _inner.fmt(f),
            Self::TooManyLambdaFunctionAssociations(_inner) => _inner.fmt(f),
            Self::TooManyOriginCustomHeaders(_inner) => _inner.fmt(f),
            Self::TooManyOriginGroupsPerDistribution(_inner) => _inner.fmt(f),
            Self::TooManyOrigins(_inner) => _inner.fmt(f),
            Self::TooManyQueryStringParameters(_inner) => _inner.fmt(f),
            Self::TooManyTrustedSigners(_inner) => _inner.fmt(f),
            Self::TrustedKeyGroupDoesNotExist(_inner) => _inner.fmt(f),
            Self::TrustedSignerDoesNotExist(_inner) => _inner.fmt(f),
            Self::Unhandled(_inner) => {
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
                    write!(f, "unhandled error ({code})")
                } else {
                    f.write_str("unhandled error")
                }
            }
        }
    }
}
impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateDistributionError {
    fn code(&self) -> ::std::option::Option<&str> {
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
    }
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
        ::std::option::Option::None
    }
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateDistributionError {
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
        match self {
            Self::AccessDenied(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::CnameAlreadyExists(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::ContinuousDeploymentPolicyInUse(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_inner) => {
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
            }
            Self::IllegalOriginAccessConfiguration(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::IllegalUpdate(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InconsistentQuantities(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidArgument(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidDefaultRootObject(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidDomainNameForOriginAccessControl(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidErrorCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidForwardCookies(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidFunctionAssociation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidGeoRestrictionParameter(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidHeadersForS3Origin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidIfMatchVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidLambdaFunctionAssociation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidLocationCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidMinimumProtocolVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidOriginAccessControl(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidOriginAccessIdentity(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidOriginKeepaliveTimeout(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidOriginReadTimeout(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidQueryStringParameters(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidRelativePath(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidRequiredProtocol(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidResponseCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidTtlOrder(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidViewerCertificate(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::InvalidWebAclId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::MissingBody(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::NoSuchCachePolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::NoSuchContinuousDeploymentPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::NoSuchDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::NoSuchFieldLevelEncryptionConfig(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::NoSuchOrigin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::NoSuchOriginRequestPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::NoSuchRealtimeLogConfig(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::NoSuchResponseHeadersPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::PreconditionFailed(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::RealtimeLogConfigOwnerMismatch(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::StagingDistributionInUse(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyCacheBehaviors(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyCertificates(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyCookieNamesInWhiteList(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyDistributionCnamEs(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => {
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
            }
            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => {
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
            }
            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => {
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
            }
            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => {
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
            }
            Self::TooManyDistributionsWithFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyDistributionsWithLambdaAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyHeadersInForwardedValues(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyLambdaFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyOriginCustomHeaders(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyOriginGroupsPerDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyOrigins(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyQueryStringParameters(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TooManyTrustedSigners(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TrustedKeyGroupDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::TrustedSignerDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
            Self::Unhandled(_inner) => &_inner.meta,
        }
    }
}
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateDistributionError {
    fn create_unhandled_error(
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
    ) -> Self {
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
            source,
            meta: meta.unwrap_or_default(),
        })
    }
}
impl ::aws_types::request_id::RequestId for crate::operation::update_distribution::UpdateDistributionError {
    fn request_id(&self) -> Option<&str> {
        self.meta().request_id()
    }
}

pub use crate::operation::update_distribution::_update_distribution_output::UpdateDistributionOutput;

pub use crate::operation::update_distribution::_update_distribution_input::UpdateDistributionInput;

mod _update_distribution_input;

mod _update_distribution_output;

/// Builders
pub mod builders;