aws-sdk-lightsail 1.108.0

AWS SDK for Amazon Lightsail
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 DeleteDistributionInput {
    /// <p>The name of the distribution to delete.</p>
    /// <p>Use the <code>GetDistributions</code> action to get a list of distribution names that you can specify.</p>
    pub distribution_name: ::std::option::Option<::std::string::String>,
}
impl DeleteDistributionInput {
    /// <p>The name of the distribution to delete.</p>
    /// <p>Use the <code>GetDistributions</code> action to get a list of distribution names that you can specify.</p>
    pub fn distribution_name(&self) -> ::std::option::Option<&str> {
        self.distribution_name.as_deref()
    }
}
impl DeleteDistributionInput {
    /// Creates a new builder-style object to manufacture [`DeleteDistributionInput`](crate::operation::delete_distribution::DeleteDistributionInput).
    pub fn builder() -> crate::operation::delete_distribution::builders::DeleteDistributionInputBuilder {
        crate::operation::delete_distribution::builders::DeleteDistributionInputBuilder::default()
    }
}

/// A builder for [`DeleteDistributionInput`](crate::operation::delete_distribution::DeleteDistributionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteDistributionInputBuilder {
    pub(crate) distribution_name: ::std::option::Option<::std::string::String>,
}
impl DeleteDistributionInputBuilder {
    /// <p>The name of the distribution to delete.</p>
    /// <p>Use the <code>GetDistributions</code> action to get a list of distribution names that you can specify.</p>
    pub fn distribution_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.distribution_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the distribution to delete.</p>
    /// <p>Use the <code>GetDistributions</code> action to get a list of distribution names that you can specify.</p>
    pub fn set_distribution_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.distribution_name = input;
        self
    }
    /// <p>The name of the distribution to delete.</p>
    /// <p>Use the <code>GetDistributions</code> action to get a list of distribution names that you can specify.</p>
    pub fn get_distribution_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.distribution_name
    }
    /// Consumes the builder and constructs a [`DeleteDistributionInput`](crate::operation::delete_distribution::DeleteDistributionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_distribution::DeleteDistributionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_distribution::DeleteDistributionInput {
            distribution_name: self.distribution_name,
        })
    }
}