aws-sdk-lightsail 1.107.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 DeleteDiskInput {
    /// <p>The unique name of the disk you want to delete (<code>my-disk</code>).</p>
    pub disk_name: ::std::option::Option<::std::string::String>,
    /// <p>A Boolean value to indicate whether to delete all add-ons for the disk.</p>
    pub force_delete_add_ons: ::std::option::Option<bool>,
}
impl DeleteDiskInput {
    /// <p>The unique name of the disk you want to delete (<code>my-disk</code>).</p>
    pub fn disk_name(&self) -> ::std::option::Option<&str> {
        self.disk_name.as_deref()
    }
    /// <p>A Boolean value to indicate whether to delete all add-ons for the disk.</p>
    pub fn force_delete_add_ons(&self) -> ::std::option::Option<bool> {
        self.force_delete_add_ons
    }
}
impl DeleteDiskInput {
    /// Creates a new builder-style object to manufacture [`DeleteDiskInput`](crate::operation::delete_disk::DeleteDiskInput).
    pub fn builder() -> crate::operation::delete_disk::builders::DeleteDiskInputBuilder {
        crate::operation::delete_disk::builders::DeleteDiskInputBuilder::default()
    }
}

/// A builder for [`DeleteDiskInput`](crate::operation::delete_disk::DeleteDiskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteDiskInputBuilder {
    pub(crate) disk_name: ::std::option::Option<::std::string::String>,
    pub(crate) force_delete_add_ons: ::std::option::Option<bool>,
}
impl DeleteDiskInputBuilder {
    /// <p>The unique name of the disk you want to delete (<code>my-disk</code>).</p>
    /// This field is required.
    pub fn disk_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.disk_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name of the disk you want to delete (<code>my-disk</code>).</p>
    pub fn set_disk_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.disk_name = input;
        self
    }
    /// <p>The unique name of the disk you want to delete (<code>my-disk</code>).</p>
    pub fn get_disk_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.disk_name
    }
    /// <p>A Boolean value to indicate whether to delete all add-ons for the disk.</p>
    pub fn force_delete_add_ons(mut self, input: bool) -> Self {
        self.force_delete_add_ons = ::std::option::Option::Some(input);
        self
    }
    /// <p>A Boolean value to indicate whether to delete all add-ons for the disk.</p>
    pub fn set_force_delete_add_ons(mut self, input: ::std::option::Option<bool>) -> Self {
        self.force_delete_add_ons = input;
        self
    }
    /// <p>A Boolean value to indicate whether to delete all add-ons for the disk.</p>
    pub fn get_force_delete_add_ons(&self) -> &::std::option::Option<bool> {
        &self.force_delete_add_ons
    }
    /// Consumes the builder and constructs a [`DeleteDiskInput`](crate::operation::delete_disk::DeleteDiskInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::delete_disk::DeleteDiskInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_disk::DeleteDiskInput {
            disk_name: self.disk_name,
            force_delete_add_ons: self.force_delete_add_ons,
        })
    }
}