1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CreateDistribution;
6impl CreateDistribution {
7    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::create_distribution::CreateDistributionInput,
14    ) -> ::std::result::Result<
15        crate::operation::create_distribution::CreateDistributionOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::create_distribution::CreateDistributionError,
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::create_distribution::CreateDistributionError>()
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::create_distribution::CreateDistributionOutput>()
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::create_distribution::CreateDistributionInput,
44        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45    ) -> ::std::result::Result<
46        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47        ::aws_smithy_runtime_api::client::result::SdkError<
48            ::aws_smithy_runtime_api::client::interceptors::context::Error,
49            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50        >,
51    > {
52        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53        use ::tracing::Instrument;
54        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("CloudFront", "CreateDistribution", input, runtime_plugins, stop_point)
55            .instrument(::tracing::debug_span!(
58                "CloudFront.CreateDistribution",
59                "rpc.service" = "CloudFront",
60                "rpc.method" = "CreateDistribution",
61                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62                "rpc.system" = "aws-api",
63            ))
64            .await
65    }
66
67    pub(crate) fn operation_runtime_plugins(
68        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69        client_config: &crate::config::Config,
70        config_override: ::std::option::Option<crate::config::Builder>,
71    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73        runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![
74            ::aws_runtime::auth::sigv4::SCHEME_ID,
75        ]));
76        if let ::std::option::Option::Some(config_override) = config_override {
77            for plugin in config_override.runtime_plugins.iter().cloned() {
78                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
79            }
80            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
81                config_override,
82                client_config.config.clone(),
83                &client_config.runtime_components,
84            ));
85        }
86        runtime_plugins
87    }
88}
89impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateDistribution {
90    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
91        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateDistribution");
92
93        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
94            CreateDistributionRequestSerializer,
95        ));
96        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
97            CreateDistributionResponseDeserializer,
98        ));
99
100        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
101            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
102        ));
103
104        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
105        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
106            "CreateDistribution",
107            "CloudFront",
108        ));
109        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
110        signing_options.double_uri_encode = true;
111        signing_options.content_sha256_header = false;
112        signing_options.normalize_uri_path = true;
113        signing_options.payload_override = None;
114
115        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
116            signing_options,
117            ..::std::default::Default::default()
118        });
119
120        ::std::option::Option::Some(cfg.freeze())
121    }
122
123    fn runtime_components(
124        &self,
125        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
126    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
127        #[allow(unused_mut)]
128        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateDistribution")
129            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
130            .with_interceptor(CreateDistributionEndpointParamsInterceptor)
131            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
132                crate::operation::create_distribution::CreateDistributionError,
133            >::new())
134            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
135                crate::operation::create_distribution::CreateDistributionError,
136            >::new())
137            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
138                crate::operation::create_distribution::CreateDistributionError,
139            >::new());
140
141        ::std::borrow::Cow::Owned(rcb)
142    }
143}
144
145#[derive(Debug)]
146struct CreateDistributionResponseDeserializer;
147impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateDistributionResponseDeserializer {
148    fn deserialize_nonstreaming(
149        &self,
150        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
151    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
152        let (success, status) = (response.status().is_success(), response.status().as_u16());
153        let headers = response.headers();
154        let body = response.body().bytes().expect("body loaded");
155        #[allow(unused_mut)]
156        let mut force_error = false;
157        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
158        let parse_result = if !success && status != 201 || force_error {
159            crate::protocol_serde::shape_create_distribution::de_create_distribution_http_error(status, headers, body)
160        } else {
161            crate::protocol_serde::shape_create_distribution::de_create_distribution_http_response(status, headers, body)
162        };
163        crate::protocol_serde::type_erase_result(parse_result)
164    }
165}
166#[derive(Debug)]
167struct CreateDistributionRequestSerializer;
168impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateDistributionRequestSerializer {
169    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
170    fn serialize_input(
171        &self,
172        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
173        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
174    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
175        let input = input
176            .downcast::<crate::operation::create_distribution::CreateDistributionInput>()
177            .expect("correct type");
178        let _header_serialization_settings = _cfg
179            .load::<crate::serialization_settings::HeaderSerializationSettings>()
180            .cloned()
181            .unwrap_or_default();
182        let mut request_builder = {
183            fn uri_base(
184                _input: &crate::operation::create_distribution::CreateDistributionInput,
185                output: &mut ::std::string::String,
186            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
187                use ::std::fmt::Write as _;
188                ::std::write!(output, "/2020-05-31/distribution").expect("formatting should succeed");
189                ::std::result::Result::Ok(())
190            }
191            #[allow(clippy::unnecessary_wraps)]
192            fn update_http_builder(
193                input: &crate::operation::create_distribution::CreateDistributionInput,
194                builder: ::http::request::Builder,
195            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
196                let mut uri = ::std::string::String::new();
197                uri_base(input, &mut uri)?;
198                ::std::result::Result::Ok(builder.method("POST").uri(uri))
199            }
200            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
201            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
202            builder
203        };
204        let body = ::aws_smithy_types::body::SdkBody::from(
205            crate::protocol_serde::shape_create_distribution_input::ser_distribution_config_http_payload(&input.distribution_config)?,
206        );
207        if let Some(content_length) = body.content_length() {
208            let content_length = content_length.to_string();
209            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
210        }
211        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
212    }
213}
214#[derive(Debug)]
215struct CreateDistributionEndpointParamsInterceptor;
216
217impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDistributionEndpointParamsInterceptor {
218    fn name(&self) -> &'static str {
219        "CreateDistributionEndpointParamsInterceptor"
220    }
221
222    fn read_before_execution(
223        &self,
224        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
225            '_,
226            ::aws_smithy_runtime_api::client::interceptors::context::Input,
227            ::aws_smithy_runtime_api::client::interceptors::context::Output,
228            ::aws_smithy_runtime_api::client::interceptors::context::Error,
229        >,
230        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
231    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
232        let _input = context
233            .input()
234            .downcast_ref::<CreateDistributionInput>()
235            .ok_or("failed to downcast to CreateDistributionInput")?;
236
237        let params = crate::config::endpoint::Params::builder()
238            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
239            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
240            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
241            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
242            .build()
243            .map_err(|err| {
244                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
245            })?;
246        cfg.interceptor_state()
247            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
248        ::std::result::Result::Ok(())
249    }
250}
251
252#[non_exhaustive]
257#[derive(::std::fmt::Debug)]
258pub enum CreateDistributionError {
259    AccessDenied(crate::types::error::AccessDenied),
261    CnameAlreadyExists(crate::types::error::CnameAlreadyExists),
263    ContinuousDeploymentPolicyInUse(crate::types::error::ContinuousDeploymentPolicyInUse),
265    DistributionAlreadyExists(crate::types::error::DistributionAlreadyExists),
267    EntityLimitExceeded(crate::types::error::EntityLimitExceeded),
269    EntityNotFound(crate::types::error::EntityNotFound),
271    IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(crate::types::error::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior),
273    IllegalOriginAccessConfiguration(crate::types::error::IllegalOriginAccessConfiguration),
275    InconsistentQuantities(crate::types::error::InconsistentQuantities),
277    InvalidArgument(crate::types::error::InvalidArgument),
279    InvalidDefaultRootObject(crate::types::error::InvalidDefaultRootObject),
281    InvalidDomainNameForOriginAccessControl(crate::types::error::InvalidDomainNameForOriginAccessControl),
283    InvalidErrorCode(crate::types::error::InvalidErrorCode),
285    InvalidForwardCookies(crate::types::error::InvalidForwardCookies),
287    InvalidFunctionAssociation(crate::types::error::InvalidFunctionAssociation),
289    InvalidGeoRestrictionParameter(crate::types::error::InvalidGeoRestrictionParameter),
291    InvalidHeadersForS3Origin(crate::types::error::InvalidHeadersForS3Origin),
293    InvalidLambdaFunctionAssociation(crate::types::error::InvalidLambdaFunctionAssociation),
295    InvalidLocationCode(crate::types::error::InvalidLocationCode),
297    InvalidMinimumProtocolVersion(crate::types::error::InvalidMinimumProtocolVersion),
299    InvalidOrigin(crate::types::error::InvalidOrigin),
301    InvalidOriginAccessControl(crate::types::error::InvalidOriginAccessControl),
303    InvalidOriginAccessIdentity(crate::types::error::InvalidOriginAccessIdentity),
305    InvalidOriginKeepaliveTimeout(crate::types::error::InvalidOriginKeepaliveTimeout),
307    InvalidOriginReadTimeout(crate::types::error::InvalidOriginReadTimeout),
309    InvalidProtocolSettings(crate::types::error::InvalidProtocolSettings),
311    InvalidQueryStringParameters(crate::types::error::InvalidQueryStringParameters),
313    InvalidRelativePath(crate::types::error::InvalidRelativePath),
315    InvalidRequiredProtocol(crate::types::error::InvalidRequiredProtocol),
317    InvalidResponseCode(crate::types::error::InvalidResponseCode),
319    InvalidTtlOrder(crate::types::error::InvalidTtlOrder),
321    InvalidViewerCertificate(crate::types::error::InvalidViewerCertificate),
323    InvalidWebAclId(crate::types::error::InvalidWebAclId),
325    MissingBody(crate::types::error::MissingBody),
327    NoSuchCachePolicy(crate::types::error::NoSuchCachePolicy),
329    NoSuchContinuousDeploymentPolicy(crate::types::error::NoSuchContinuousDeploymentPolicy),
331    NoSuchFieldLevelEncryptionConfig(crate::types::error::NoSuchFieldLevelEncryptionConfig),
333    NoSuchOrigin(crate::types::error::NoSuchOrigin),
335    NoSuchOriginRequestPolicy(crate::types::error::NoSuchOriginRequestPolicy),
337    NoSuchRealtimeLogConfig(crate::types::error::NoSuchRealtimeLogConfig),
339    NoSuchResponseHeadersPolicy(crate::types::error::NoSuchResponseHeadersPolicy),
341    RealtimeLogConfigOwnerMismatch(crate::types::error::RealtimeLogConfigOwnerMismatch),
343    TooManyCacheBehaviors(crate::types::error::TooManyCacheBehaviors),
345    TooManyCertificates(crate::types::error::TooManyCertificates),
347    TooManyCookieNamesInWhiteList(crate::types::error::TooManyCookieNamesInWhiteList),
349    TooManyDistributionCnamEs(crate::types::error::TooManyDistributionCnamEs),
351    TooManyDistributions(crate::types::error::TooManyDistributions),
353    TooManyDistributionsAssociatedToCachePolicy(crate::types::error::TooManyDistributionsAssociatedToCachePolicy),
355    TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(crate::types::error::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig),
357    TooManyDistributionsAssociatedToKeyGroup(crate::types::error::TooManyDistributionsAssociatedToKeyGroup),
359    TooManyDistributionsAssociatedToOriginAccessControl(crate::types::error::TooManyDistributionsAssociatedToOriginAccessControl),
362    TooManyDistributionsAssociatedToOriginRequestPolicy(crate::types::error::TooManyDistributionsAssociatedToOriginRequestPolicy),
364    TooManyDistributionsAssociatedToResponseHeadersPolicy(crate::types::error::TooManyDistributionsAssociatedToResponseHeadersPolicy),
367    TooManyDistributionsWithFunctionAssociations(crate::types::error::TooManyDistributionsWithFunctionAssociations),
369    TooManyDistributionsWithLambdaAssociations(crate::types::error::TooManyDistributionsWithLambdaAssociations),
371    TooManyDistributionsWithSingleFunctionArn(crate::types::error::TooManyDistributionsWithSingleFunctionArn),
373    TooManyFunctionAssociations(crate::types::error::TooManyFunctionAssociations),
375    TooManyHeadersInForwardedValues(crate::types::error::TooManyHeadersInForwardedValues),
377    TooManyKeyGroupsAssociatedToDistribution(crate::types::error::TooManyKeyGroupsAssociatedToDistribution),
379    TooManyLambdaFunctionAssociations(crate::types::error::TooManyLambdaFunctionAssociations),
381    TooManyOriginCustomHeaders(crate::types::error::TooManyOriginCustomHeaders),
383    TooManyOriginGroupsPerDistribution(crate::types::error::TooManyOriginGroupsPerDistribution),
385    TooManyOrigins(crate::types::error::TooManyOrigins),
387    TooManyQueryStringParameters(crate::types::error::TooManyQueryStringParameters),
389    TooManyTrustedSigners(crate::types::error::TooManyTrustedSigners),
391    TrustedKeyGroupDoesNotExist(crate::types::error::TrustedKeyGroupDoesNotExist),
393    TrustedSignerDoesNotExist(crate::types::error::TrustedSignerDoesNotExist),
395    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
397    variable wildcard pattern and check `.code()`:
398     \
399       `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
400     \
401    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateDistributionError) for what information is available for the error.")]
402    Unhandled(crate::error::sealed_unhandled::Unhandled),
403}
404impl CreateDistributionError {
405    pub fn unhandled(
407        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
408    ) -> Self {
409        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
410            source: err.into(),
411            meta: ::std::default::Default::default(),
412        })
413    }
414
415    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
417        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
418            source: err.clone().into(),
419            meta: err,
420        })
421    }
422    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
427        match self {
428            Self::AccessDenied(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
429            Self::CnameAlreadyExists(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
430            Self::ContinuousDeploymentPolicyInUse(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
431            Self::DistributionAlreadyExists(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
432            Self::EntityLimitExceeded(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::InconsistentQuantities(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
439            Self::InvalidArgument(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
440            Self::InvalidDefaultRootObject(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
441            Self::InvalidDomainNameForOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
442            Self::InvalidErrorCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
443            Self::InvalidForwardCookies(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
444            Self::InvalidFunctionAssociation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
445            Self::InvalidGeoRestrictionParameter(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
446            Self::InvalidHeadersForS3Origin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
447            Self::InvalidLambdaFunctionAssociation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
448            Self::InvalidLocationCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
449            Self::InvalidMinimumProtocolVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
450            Self::InvalidOrigin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
451            Self::InvalidOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
452            Self::InvalidOriginAccessIdentity(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
453            Self::InvalidOriginKeepaliveTimeout(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
454            Self::InvalidOriginReadTimeout(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
455            Self::InvalidProtocolSettings(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::NoSuchFieldLevelEncryptionConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
467            Self::NoSuchOrigin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
468            Self::NoSuchOriginRequestPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
469            Self::NoSuchRealtimeLogConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
470            Self::NoSuchResponseHeadersPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
471            Self::RealtimeLogConfigOwnerMismatch(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
472            Self::TooManyCacheBehaviors(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
473            Self::TooManyCertificates(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
474            Self::TooManyCookieNamesInWhiteList(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
475            Self::TooManyDistributionCnamEs(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
476            Self::TooManyDistributions(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
477            Self::TooManyDistributionsAssociatedToCachePolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
478            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
479            Self::TooManyDistributionsAssociatedToKeyGroup(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
480            Self::TooManyDistributionsAssociatedToOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
481            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
482            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
483            Self::TooManyDistributionsWithFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
484            Self::TooManyDistributionsWithLambdaAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
485            Self::TooManyDistributionsWithSingleFunctionArn(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
486            Self::TooManyFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
487            Self::TooManyHeadersInForwardedValues(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
488            Self::TooManyKeyGroupsAssociatedToDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
489            Self::TooManyLambdaFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
490            Self::TooManyOriginCustomHeaders(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
491            Self::TooManyOriginGroupsPerDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
492            Self::TooManyOrigins(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
493            Self::TooManyQueryStringParameters(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
494            Self::TooManyTrustedSigners(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
495            Self::TrustedKeyGroupDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
496            Self::TrustedSignerDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
497            Self::Unhandled(e) => &e.meta,
498        }
499    }
500    pub fn is_access_denied(&self) -> bool {
502        matches!(self, Self::AccessDenied(_))
503    }
504    pub fn is_cname_already_exists(&self) -> bool {
506        matches!(self, Self::CnameAlreadyExists(_))
507    }
508    pub fn is_continuous_deployment_policy_in_use(&self) -> bool {
510        matches!(self, Self::ContinuousDeploymentPolicyInUse(_))
511    }
512    pub fn is_distribution_already_exists(&self) -> bool {
514        matches!(self, Self::DistributionAlreadyExists(_))
515    }
516    pub fn is_entity_limit_exceeded(&self) -> bool {
518        matches!(self, Self::EntityLimitExceeded(_))
519    }
520    pub fn is_entity_not_found(&self) -> bool {
522        matches!(self, Self::EntityNotFound(_))
523    }
524    pub fn is_illegal_field_level_encryption_config_association_with_cache_behavior(&self) -> bool {
526        matches!(self, Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_))
527    }
528    pub fn is_illegal_origin_access_configuration(&self) -> bool {
530        matches!(self, Self::IllegalOriginAccessConfiguration(_))
531    }
532    pub fn is_inconsistent_quantities(&self) -> bool {
534        matches!(self, Self::InconsistentQuantities(_))
535    }
536    pub fn is_invalid_argument(&self) -> bool {
538        matches!(self, Self::InvalidArgument(_))
539    }
540    pub fn is_invalid_default_root_object(&self) -> bool {
542        matches!(self, Self::InvalidDefaultRootObject(_))
543    }
544    pub fn is_invalid_domain_name_for_origin_access_control(&self) -> bool {
546        matches!(self, Self::InvalidDomainNameForOriginAccessControl(_))
547    }
548    pub fn is_invalid_error_code(&self) -> bool {
550        matches!(self, Self::InvalidErrorCode(_))
551    }
552    pub fn is_invalid_forward_cookies(&self) -> bool {
554        matches!(self, Self::InvalidForwardCookies(_))
555    }
556    pub fn is_invalid_function_association(&self) -> bool {
558        matches!(self, Self::InvalidFunctionAssociation(_))
559    }
560    pub fn is_invalid_geo_restriction_parameter(&self) -> bool {
562        matches!(self, Self::InvalidGeoRestrictionParameter(_))
563    }
564    pub fn is_invalid_headers_for_s3_origin(&self) -> bool {
566        matches!(self, Self::InvalidHeadersForS3Origin(_))
567    }
568    pub fn is_invalid_lambda_function_association(&self) -> bool {
570        matches!(self, Self::InvalidLambdaFunctionAssociation(_))
571    }
572    pub fn is_invalid_location_code(&self) -> bool {
574        matches!(self, Self::InvalidLocationCode(_))
575    }
576    pub fn is_invalid_minimum_protocol_version(&self) -> bool {
578        matches!(self, Self::InvalidMinimumProtocolVersion(_))
579    }
580    pub fn is_invalid_origin(&self) -> bool {
582        matches!(self, Self::InvalidOrigin(_))
583    }
584    pub fn is_invalid_origin_access_control(&self) -> bool {
586        matches!(self, Self::InvalidOriginAccessControl(_))
587    }
588    pub fn is_invalid_origin_access_identity(&self) -> bool {
590        matches!(self, Self::InvalidOriginAccessIdentity(_))
591    }
592    pub fn is_invalid_origin_keepalive_timeout(&self) -> bool {
594        matches!(self, Self::InvalidOriginKeepaliveTimeout(_))
595    }
596    pub fn is_invalid_origin_read_timeout(&self) -> bool {
598        matches!(self, Self::InvalidOriginReadTimeout(_))
599    }
600    pub fn is_invalid_protocol_settings(&self) -> bool {
602        matches!(self, Self::InvalidProtocolSettings(_))
603    }
604    pub fn is_invalid_query_string_parameters(&self) -> bool {
606        matches!(self, Self::InvalidQueryStringParameters(_))
607    }
608    pub fn is_invalid_relative_path(&self) -> bool {
610        matches!(self, Self::InvalidRelativePath(_))
611    }
612    pub fn is_invalid_required_protocol(&self) -> bool {
614        matches!(self, Self::InvalidRequiredProtocol(_))
615    }
616    pub fn is_invalid_response_code(&self) -> bool {
618        matches!(self, Self::InvalidResponseCode(_))
619    }
620    pub fn is_invalid_ttl_order(&self) -> bool {
622        matches!(self, Self::InvalidTtlOrder(_))
623    }
624    pub fn is_invalid_viewer_certificate(&self) -> bool {
626        matches!(self, Self::InvalidViewerCertificate(_))
627    }
628    pub fn is_invalid_web_acl_id(&self) -> bool {
630        matches!(self, Self::InvalidWebAclId(_))
631    }
632    pub fn is_missing_body(&self) -> bool {
634        matches!(self, Self::MissingBody(_))
635    }
636    pub fn is_no_such_cache_policy(&self) -> bool {
638        matches!(self, Self::NoSuchCachePolicy(_))
639    }
640    pub fn is_no_such_continuous_deployment_policy(&self) -> bool {
642        matches!(self, Self::NoSuchContinuousDeploymentPolicy(_))
643    }
644    pub fn is_no_such_field_level_encryption_config(&self) -> bool {
646        matches!(self, Self::NoSuchFieldLevelEncryptionConfig(_))
647    }
648    pub fn is_no_such_origin(&self) -> bool {
650        matches!(self, Self::NoSuchOrigin(_))
651    }
652    pub fn is_no_such_origin_request_policy(&self) -> bool {
654        matches!(self, Self::NoSuchOriginRequestPolicy(_))
655    }
656    pub fn is_no_such_realtime_log_config(&self) -> bool {
658        matches!(self, Self::NoSuchRealtimeLogConfig(_))
659    }
660    pub fn is_no_such_response_headers_policy(&self) -> bool {
662        matches!(self, Self::NoSuchResponseHeadersPolicy(_))
663    }
664    pub fn is_realtime_log_config_owner_mismatch(&self) -> bool {
666        matches!(self, Self::RealtimeLogConfigOwnerMismatch(_))
667    }
668    pub fn is_too_many_cache_behaviors(&self) -> bool {
670        matches!(self, Self::TooManyCacheBehaviors(_))
671    }
672    pub fn is_too_many_certificates(&self) -> bool {
674        matches!(self, Self::TooManyCertificates(_))
675    }
676    pub fn is_too_many_cookie_names_in_white_list(&self) -> bool {
678        matches!(self, Self::TooManyCookieNamesInWhiteList(_))
679    }
680    pub fn is_too_many_distribution_cnam_es(&self) -> bool {
682        matches!(self, Self::TooManyDistributionCnamEs(_))
683    }
684    pub fn is_too_many_distributions(&self) -> bool {
686        matches!(self, Self::TooManyDistributions(_))
687    }
688    pub fn is_too_many_distributions_associated_to_cache_policy(&self) -> bool {
690        matches!(self, Self::TooManyDistributionsAssociatedToCachePolicy(_))
691    }
692    pub fn is_too_many_distributions_associated_to_field_level_encryption_config(&self) -> bool {
694        matches!(self, Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_))
695    }
696    pub fn is_too_many_distributions_associated_to_key_group(&self) -> bool {
698        matches!(self, Self::TooManyDistributionsAssociatedToKeyGroup(_))
699    }
700    pub fn is_too_many_distributions_associated_to_origin_access_control(&self) -> bool {
702        matches!(self, Self::TooManyDistributionsAssociatedToOriginAccessControl(_))
703    }
704    pub fn is_too_many_distributions_associated_to_origin_request_policy(&self) -> bool {
706        matches!(self, Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_))
707    }
708    pub fn is_too_many_distributions_associated_to_response_headers_policy(&self) -> bool {
710        matches!(self, Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_))
711    }
712    pub fn is_too_many_distributions_with_function_associations(&self) -> bool {
714        matches!(self, Self::TooManyDistributionsWithFunctionAssociations(_))
715    }
716    pub fn is_too_many_distributions_with_lambda_associations(&self) -> bool {
718        matches!(self, Self::TooManyDistributionsWithLambdaAssociations(_))
719    }
720    pub fn is_too_many_distributions_with_single_function_arn(&self) -> bool {
722        matches!(self, Self::TooManyDistributionsWithSingleFunctionArn(_))
723    }
724    pub fn is_too_many_function_associations(&self) -> bool {
726        matches!(self, Self::TooManyFunctionAssociations(_))
727    }
728    pub fn is_too_many_headers_in_forwarded_values(&self) -> bool {
730        matches!(self, Self::TooManyHeadersInForwardedValues(_))
731    }
732    pub fn is_too_many_key_groups_associated_to_distribution(&self) -> bool {
734        matches!(self, Self::TooManyKeyGroupsAssociatedToDistribution(_))
735    }
736    pub fn is_too_many_lambda_function_associations(&self) -> bool {
738        matches!(self, Self::TooManyLambdaFunctionAssociations(_))
739    }
740    pub fn is_too_many_origin_custom_headers(&self) -> bool {
742        matches!(self, Self::TooManyOriginCustomHeaders(_))
743    }
744    pub fn is_too_many_origin_groups_per_distribution(&self) -> bool {
746        matches!(self, Self::TooManyOriginGroupsPerDistribution(_))
747    }
748    pub fn is_too_many_origins(&self) -> bool {
750        matches!(self, Self::TooManyOrigins(_))
751    }
752    pub fn is_too_many_query_string_parameters(&self) -> bool {
754        matches!(self, Self::TooManyQueryStringParameters(_))
755    }
756    pub fn is_too_many_trusted_signers(&self) -> bool {
758        matches!(self, Self::TooManyTrustedSigners(_))
759    }
760    pub fn is_trusted_key_group_does_not_exist(&self) -> bool {
762        matches!(self, Self::TrustedKeyGroupDoesNotExist(_))
763    }
764    pub fn is_trusted_signer_does_not_exist(&self) -> bool {
766        matches!(self, Self::TrustedSignerDoesNotExist(_))
767    }
768}
769impl ::std::error::Error for CreateDistributionError {
770    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
771        match self {
772            Self::AccessDenied(_inner) => ::std::option::Option::Some(_inner),
773            Self::CnameAlreadyExists(_inner) => ::std::option::Option::Some(_inner),
774            Self::ContinuousDeploymentPolicyInUse(_inner) => ::std::option::Option::Some(_inner),
775            Self::DistributionAlreadyExists(_inner) => ::std::option::Option::Some(_inner),
776            Self::EntityLimitExceeded(_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::InconsistentQuantities(_inner) => ::std::option::Option::Some(_inner),
781            Self::InvalidArgument(_inner) => ::std::option::Option::Some(_inner),
782            Self::InvalidDefaultRootObject(_inner) => ::std::option::Option::Some(_inner),
783            Self::InvalidDomainNameForOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
784            Self::InvalidErrorCode(_inner) => ::std::option::Option::Some(_inner),
785            Self::InvalidForwardCookies(_inner) => ::std::option::Option::Some(_inner),
786            Self::InvalidFunctionAssociation(_inner) => ::std::option::Option::Some(_inner),
787            Self::InvalidGeoRestrictionParameter(_inner) => ::std::option::Option::Some(_inner),
788            Self::InvalidHeadersForS3Origin(_inner) => ::std::option::Option::Some(_inner),
789            Self::InvalidLambdaFunctionAssociation(_inner) => ::std::option::Option::Some(_inner),
790            Self::InvalidLocationCode(_inner) => ::std::option::Option::Some(_inner),
791            Self::InvalidMinimumProtocolVersion(_inner) => ::std::option::Option::Some(_inner),
792            Self::InvalidOrigin(_inner) => ::std::option::Option::Some(_inner),
793            Self::InvalidOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
794            Self::InvalidOriginAccessIdentity(_inner) => ::std::option::Option::Some(_inner),
795            Self::InvalidOriginKeepaliveTimeout(_inner) => ::std::option::Option::Some(_inner),
796            Self::InvalidOriginReadTimeout(_inner) => ::std::option::Option::Some(_inner),
797            Self::InvalidProtocolSettings(_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::NoSuchFieldLevelEncryptionConfig(_inner) => ::std::option::Option::Some(_inner),
809            Self::NoSuchOrigin(_inner) => ::std::option::Option::Some(_inner),
810            Self::NoSuchOriginRequestPolicy(_inner) => ::std::option::Option::Some(_inner),
811            Self::NoSuchRealtimeLogConfig(_inner) => ::std::option::Option::Some(_inner),
812            Self::NoSuchResponseHeadersPolicy(_inner) => ::std::option::Option::Some(_inner),
813            Self::RealtimeLogConfigOwnerMismatch(_inner) => ::std::option::Option::Some(_inner),
814            Self::TooManyCacheBehaviors(_inner) => ::std::option::Option::Some(_inner),
815            Self::TooManyCertificates(_inner) => ::std::option::Option::Some(_inner),
816            Self::TooManyCookieNamesInWhiteList(_inner) => ::std::option::Option::Some(_inner),
817            Self::TooManyDistributionCnamEs(_inner) => ::std::option::Option::Some(_inner),
818            Self::TooManyDistributions(_inner) => ::std::option::Option::Some(_inner),
819            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => ::std::option::Option::Some(_inner),
820            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => ::std::option::Option::Some(_inner),
821            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => ::std::option::Option::Some(_inner),
822            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
823            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => ::std::option::Option::Some(_inner),
824            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => ::std::option::Option::Some(_inner),
825            Self::TooManyDistributionsWithFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
826            Self::TooManyDistributionsWithLambdaAssociations(_inner) => ::std::option::Option::Some(_inner),
827            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => ::std::option::Option::Some(_inner),
828            Self::TooManyFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
829            Self::TooManyHeadersInForwardedValues(_inner) => ::std::option::Option::Some(_inner),
830            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => ::std::option::Option::Some(_inner),
831            Self::TooManyLambdaFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
832            Self::TooManyOriginCustomHeaders(_inner) => ::std::option::Option::Some(_inner),
833            Self::TooManyOriginGroupsPerDistribution(_inner) => ::std::option::Option::Some(_inner),
834            Self::TooManyOrigins(_inner) => ::std::option::Option::Some(_inner),
835            Self::TooManyQueryStringParameters(_inner) => ::std::option::Option::Some(_inner),
836            Self::TooManyTrustedSigners(_inner) => ::std::option::Option::Some(_inner),
837            Self::TrustedKeyGroupDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
838            Self::TrustedSignerDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
839            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
840        }
841    }
842}
843impl ::std::fmt::Display for CreateDistributionError {
844    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
845        match self {
846            Self::AccessDenied(_inner) => _inner.fmt(f),
847            Self::CnameAlreadyExists(_inner) => _inner.fmt(f),
848            Self::ContinuousDeploymentPolicyInUse(_inner) => _inner.fmt(f),
849            Self::DistributionAlreadyExists(_inner) => _inner.fmt(f),
850            Self::EntityLimitExceeded(_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::InconsistentQuantities(_inner) => _inner.fmt(f),
855            Self::InvalidArgument(_inner) => _inner.fmt(f),
856            Self::InvalidDefaultRootObject(_inner) => _inner.fmt(f),
857            Self::InvalidDomainNameForOriginAccessControl(_inner) => _inner.fmt(f),
858            Self::InvalidErrorCode(_inner) => _inner.fmt(f),
859            Self::InvalidForwardCookies(_inner) => _inner.fmt(f),
860            Self::InvalidFunctionAssociation(_inner) => _inner.fmt(f),
861            Self::InvalidGeoRestrictionParameter(_inner) => _inner.fmt(f),
862            Self::InvalidHeadersForS3Origin(_inner) => _inner.fmt(f),
863            Self::InvalidLambdaFunctionAssociation(_inner) => _inner.fmt(f),
864            Self::InvalidLocationCode(_inner) => _inner.fmt(f),
865            Self::InvalidMinimumProtocolVersion(_inner) => _inner.fmt(f),
866            Self::InvalidOrigin(_inner) => _inner.fmt(f),
867            Self::InvalidOriginAccessControl(_inner) => _inner.fmt(f),
868            Self::InvalidOriginAccessIdentity(_inner) => _inner.fmt(f),
869            Self::InvalidOriginKeepaliveTimeout(_inner) => _inner.fmt(f),
870            Self::InvalidOriginReadTimeout(_inner) => _inner.fmt(f),
871            Self::InvalidProtocolSettings(_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::NoSuchFieldLevelEncryptionConfig(_inner) => _inner.fmt(f),
883            Self::NoSuchOrigin(_inner) => _inner.fmt(f),
884            Self::NoSuchOriginRequestPolicy(_inner) => _inner.fmt(f),
885            Self::NoSuchRealtimeLogConfig(_inner) => _inner.fmt(f),
886            Self::NoSuchResponseHeadersPolicy(_inner) => _inner.fmt(f),
887            Self::RealtimeLogConfigOwnerMismatch(_inner) => _inner.fmt(f),
888            Self::TooManyCacheBehaviors(_inner) => _inner.fmt(f),
889            Self::TooManyCertificates(_inner) => _inner.fmt(f),
890            Self::TooManyCookieNamesInWhiteList(_inner) => _inner.fmt(f),
891            Self::TooManyDistributionCnamEs(_inner) => _inner.fmt(f),
892            Self::TooManyDistributions(_inner) => _inner.fmt(f),
893            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => _inner.fmt(f),
894            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => _inner.fmt(f),
895            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => _inner.fmt(f),
896            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => _inner.fmt(f),
897            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => _inner.fmt(f),
898            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => _inner.fmt(f),
899            Self::TooManyDistributionsWithFunctionAssociations(_inner) => _inner.fmt(f),
900            Self::TooManyDistributionsWithLambdaAssociations(_inner) => _inner.fmt(f),
901            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => _inner.fmt(f),
902            Self::TooManyFunctionAssociations(_inner) => _inner.fmt(f),
903            Self::TooManyHeadersInForwardedValues(_inner) => _inner.fmt(f),
904            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => _inner.fmt(f),
905            Self::TooManyLambdaFunctionAssociations(_inner) => _inner.fmt(f),
906            Self::TooManyOriginCustomHeaders(_inner) => _inner.fmt(f),
907            Self::TooManyOriginGroupsPerDistribution(_inner) => _inner.fmt(f),
908            Self::TooManyOrigins(_inner) => _inner.fmt(f),
909            Self::TooManyQueryStringParameters(_inner) => _inner.fmt(f),
910            Self::TooManyTrustedSigners(_inner) => _inner.fmt(f),
911            Self::TrustedKeyGroupDoesNotExist(_inner) => _inner.fmt(f),
912            Self::TrustedSignerDoesNotExist(_inner) => _inner.fmt(f),
913            Self::Unhandled(_inner) => {
914                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
915                    write!(f, "unhandled error ({code})")
916                } else {
917                    f.write_str("unhandled error")
918                }
919            }
920        }
921    }
922}
923impl ::aws_smithy_types::retry::ProvideErrorKind for CreateDistributionError {
924    fn code(&self) -> ::std::option::Option<&str> {
925        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
926    }
927    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
928        ::std::option::Option::None
929    }
930}
931impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateDistributionError {
932    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
933        match self {
934            Self::AccessDenied(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
935            Self::CnameAlreadyExists(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
936            Self::ContinuousDeploymentPolicyInUse(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
937            Self::DistributionAlreadyExists(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
938            Self::EntityLimitExceeded(_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::InconsistentQuantities(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
945            Self::InvalidArgument(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
946            Self::InvalidDefaultRootObject(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
947            Self::InvalidDomainNameForOriginAccessControl(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
948            Self::InvalidErrorCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
949            Self::InvalidForwardCookies(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
950            Self::InvalidFunctionAssociation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
951            Self::InvalidGeoRestrictionParameter(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
952            Self::InvalidHeadersForS3Origin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
953            Self::InvalidLambdaFunctionAssociation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
954            Self::InvalidLocationCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
955            Self::InvalidMinimumProtocolVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
956            Self::InvalidOrigin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
957            Self::InvalidOriginAccessControl(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
958            Self::InvalidOriginAccessIdentity(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
959            Self::InvalidOriginKeepaliveTimeout(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
960            Self::InvalidOriginReadTimeout(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
961            Self::InvalidProtocolSettings(_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::NoSuchFieldLevelEncryptionConfig(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
973            Self::NoSuchOrigin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
974            Self::NoSuchOriginRequestPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
975            Self::NoSuchRealtimeLogConfig(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
976            Self::NoSuchResponseHeadersPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
977            Self::RealtimeLogConfigOwnerMismatch(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
978            Self::TooManyCacheBehaviors(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
979            Self::TooManyCertificates(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
980            Self::TooManyCookieNamesInWhiteList(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
981            Self::TooManyDistributionCnamEs(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
982            Self::TooManyDistributions(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
983            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
984            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => {
985                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
986            }
987            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
988            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => {
989                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
990            }
991            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => {
992                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
993            }
994            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => {
995                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
996            }
997            Self::TooManyDistributionsWithFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
998            Self::TooManyDistributionsWithLambdaAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
999            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1000            Self::TooManyFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1001            Self::TooManyHeadersInForwardedValues(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1002            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1003            Self::TooManyLambdaFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1004            Self::TooManyOriginCustomHeaders(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1005            Self::TooManyOriginGroupsPerDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1006            Self::TooManyOrigins(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1007            Self::TooManyQueryStringParameters(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1008            Self::TooManyTrustedSigners(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1009            Self::TrustedKeyGroupDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1010            Self::TrustedSignerDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1011            Self::Unhandled(_inner) => &_inner.meta,
1012        }
1013    }
1014}
1015impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateDistributionError {
1016    fn create_unhandled_error(
1017        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
1018        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
1019    ) -> Self {
1020        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
1021            source,
1022            meta: meta.unwrap_or_default(),
1023        })
1024    }
1025}
1026impl ::aws_types::request_id::RequestId for crate::operation::create_distribution::CreateDistributionError {
1027    fn request_id(&self) -> Option<&str> {
1028        self.meta().request_id()
1029    }
1030}
1031
1032pub use crate::operation::create_distribution::_create_distribution_output::CreateDistributionOutput;
1033
1034pub use crate::operation::create_distribution::_create_distribution_input::CreateDistributionInput;
1035
1036mod _create_distribution_input;
1037
1038mod _create_distribution_output;
1039
1040pub mod builders;