aws-sdk-cloudfront 1.115.0

AWS SDK for Amazon CloudFront
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Customizations for the distribution tenant. For each distribution tenant, you can specify the geographic restrictions, and the Amazon Resource Names (ARNs) for the ACM certificate and WAF web ACL. These are specific values that you can override or disable from the multi-tenant distribution that was used to create the distribution tenant.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Customizations {
    /// <p>The WAF web ACL.</p>
    pub web_acl: ::std::option::Option<crate::types::WebAclCustomization>,
    /// <p>The Certificate Manager (ACM) certificate.</p>
    pub certificate: ::std::option::Option<crate::types::Certificate>,
    /// <p>The geographic restrictions.</p>
    pub geo_restrictions: ::std::option::Option<crate::types::GeoRestrictionCustomization>,
}
impl Customizations {
    /// <p>The WAF web ACL.</p>
    pub fn web_acl(&self) -> ::std::option::Option<&crate::types::WebAclCustomization> {
        self.web_acl.as_ref()
    }
    /// <p>The Certificate Manager (ACM) certificate.</p>
    pub fn certificate(&self) -> ::std::option::Option<&crate::types::Certificate> {
        self.certificate.as_ref()
    }
    /// <p>The geographic restrictions.</p>
    pub fn geo_restrictions(&self) -> ::std::option::Option<&crate::types::GeoRestrictionCustomization> {
        self.geo_restrictions.as_ref()
    }
}
impl Customizations {
    /// Creates a new builder-style object to manufacture [`Customizations`](crate::types::Customizations).
    pub fn builder() -> crate::types::builders::CustomizationsBuilder {
        crate::types::builders::CustomizationsBuilder::default()
    }
}

/// A builder for [`Customizations`](crate::types::Customizations).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CustomizationsBuilder {
    pub(crate) web_acl: ::std::option::Option<crate::types::WebAclCustomization>,
    pub(crate) certificate: ::std::option::Option<crate::types::Certificate>,
    pub(crate) geo_restrictions: ::std::option::Option<crate::types::GeoRestrictionCustomization>,
}
impl CustomizationsBuilder {
    /// <p>The WAF web ACL.</p>
    pub fn web_acl(mut self, input: crate::types::WebAclCustomization) -> Self {
        self.web_acl = ::std::option::Option::Some(input);
        self
    }
    /// <p>The WAF web ACL.</p>
    pub fn set_web_acl(mut self, input: ::std::option::Option<crate::types::WebAclCustomization>) -> Self {
        self.web_acl = input;
        self
    }
    /// <p>The WAF web ACL.</p>
    pub fn get_web_acl(&self) -> &::std::option::Option<crate::types::WebAclCustomization> {
        &self.web_acl
    }
    /// <p>The Certificate Manager (ACM) certificate.</p>
    pub fn certificate(mut self, input: crate::types::Certificate) -> Self {
        self.certificate = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Certificate Manager (ACM) certificate.</p>
    pub fn set_certificate(mut self, input: ::std::option::Option<crate::types::Certificate>) -> Self {
        self.certificate = input;
        self
    }
    /// <p>The Certificate Manager (ACM) certificate.</p>
    pub fn get_certificate(&self) -> &::std::option::Option<crate::types::Certificate> {
        &self.certificate
    }
    /// <p>The geographic restrictions.</p>
    pub fn geo_restrictions(mut self, input: crate::types::GeoRestrictionCustomization) -> Self {
        self.geo_restrictions = ::std::option::Option::Some(input);
        self
    }
    /// <p>The geographic restrictions.</p>
    pub fn set_geo_restrictions(mut self, input: ::std::option::Option<crate::types::GeoRestrictionCustomization>) -> Self {
        self.geo_restrictions = input;
        self
    }
    /// <p>The geographic restrictions.</p>
    pub fn get_geo_restrictions(&self) -> &::std::option::Option<crate::types::GeoRestrictionCustomization> {
        &self.geo_restrictions
    }
    /// Consumes the builder and constructs a [`Customizations`](crate::types::Customizations).
    pub fn build(self) -> crate::types::Customizations {
        crate::types::Customizations {
            web_acl: self.web_acl,
            certificate: self.certificate,
            geo_restrictions: self.geo_restrictions,
        }
    }
}