aws-sdk-cloudfront 1.116.0

AWS SDK for Amazon CloudFront
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateDomainAssociationInput {
    /// <p>The domain to update.</p>
    pub domain: ::std::option::Option<::std::string::String>,
    /// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
    pub target_resource: ::std::option::Option<crate::types::DistributionResourceId>,
    /// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
    pub if_match: ::std::option::Option<::std::string::String>,
}
impl UpdateDomainAssociationInput {
    /// <p>The domain to update.</p>
    pub fn domain(&self) -> ::std::option::Option<&str> {
        self.domain.as_deref()
    }
    /// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
    pub fn target_resource(&self) -> ::std::option::Option<&crate::types::DistributionResourceId> {
        self.target_resource.as_ref()
    }
    /// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
    pub fn if_match(&self) -> ::std::option::Option<&str> {
        self.if_match.as_deref()
    }
}
impl UpdateDomainAssociationInput {
    /// Creates a new builder-style object to manufacture [`UpdateDomainAssociationInput`](crate::operation::update_domain_association::UpdateDomainAssociationInput).
    pub fn builder() -> crate::operation::update_domain_association::builders::UpdateDomainAssociationInputBuilder {
        crate::operation::update_domain_association::builders::UpdateDomainAssociationInputBuilder::default()
    }
}

/// A builder for [`UpdateDomainAssociationInput`](crate::operation::update_domain_association::UpdateDomainAssociationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDomainAssociationInputBuilder {
    pub(crate) domain: ::std::option::Option<::std::string::String>,
    pub(crate) target_resource: ::std::option::Option<crate::types::DistributionResourceId>,
    pub(crate) if_match: ::std::option::Option<::std::string::String>,
}
impl UpdateDomainAssociationInputBuilder {
    /// <p>The domain to update.</p>
    /// This field is required.
    pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The domain to update.</p>
    pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain = input;
        self
    }
    /// <p>The domain to update.</p>
    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain
    }
    /// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
    /// This field is required.
    pub fn target_resource(mut self, input: crate::types::DistributionResourceId) -> Self {
        self.target_resource = ::std::option::Option::Some(input);
        self
    }
    /// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
    pub fn set_target_resource(mut self, input: ::std::option::Option<crate::types::DistributionResourceId>) -> Self {
        self.target_resource = input;
        self
    }
    /// <p>The target standard distribution or distribution tenant resource for the domain. You can specify either <code>DistributionId</code> or <code>DistributionTenantId</code>, but not both.</p>
    pub fn get_target_resource(&self) -> &::std::option::Option<crate::types::DistributionResourceId> {
        &self.target_resource
    }
    /// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.if_match = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.if_match = input;
        self
    }
    /// <p>The value of the <code>ETag</code> identifier for the standard distribution or distribution tenant that will be associated with the domain.</p>
    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
        &self.if_match
    }
    /// Consumes the builder and constructs a [`UpdateDomainAssociationInput`](crate::operation::update_domain_association::UpdateDomainAssociationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_domain_association::UpdateDomainAssociationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_domain_association::UpdateDomainAssociationInput {
            domain: self.domain,
            target_resource: self.target_resource,
            if_match: self.if_match,
        })
    }
}