aws-sdk-lightsail 1.106.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 AttachDiskInput {
    /// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
    pub disk_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
    pub instance_name: ::std::option::Option<::std::string::String>,
    /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
    pub disk_path: ::std::option::Option<::std::string::String>,
    /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
    /// <p>This value only applies to Lightsail for Research resources.</p>
    /// </important>
    pub auto_mounting: ::std::option::Option<bool>,
}
impl AttachDiskInput {
    /// <p>The unique Lightsail disk name (<code>my-disk</code>).</p>
    pub fn disk_name(&self) -> ::std::option::Option<&str> {
        self.disk_name.as_deref()
    }
    /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
    pub fn instance_name(&self) -> ::std::option::Option<&str> {
        self.instance_name.as_deref()
    }
    /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
    pub fn disk_path(&self) -> ::std::option::Option<&str> {
        self.disk_path.as_deref()
    }
    /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
    /// <p>This value only applies to Lightsail for Research resources.</p>
    /// </important>
    pub fn auto_mounting(&self) -> ::std::option::Option<bool> {
        self.auto_mounting
    }
}
impl AttachDiskInput {
    /// Creates a new builder-style object to manufacture [`AttachDiskInput`](crate::operation::attach_disk::AttachDiskInput).
    pub fn builder() -> crate::operation::attach_disk::builders::AttachDiskInputBuilder {
        crate::operation::attach_disk::builders::AttachDiskInputBuilder::default()
    }
}

/// A builder for [`AttachDiskInput`](crate::operation::attach_disk::AttachDiskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AttachDiskInputBuilder {
    pub(crate) disk_name: ::std::option::Option<::std::string::String>,
    pub(crate) instance_name: ::std::option::Option<::std::string::String>,
    pub(crate) disk_path: ::std::option::Option<::std::string::String>,
    pub(crate) auto_mounting: ::std::option::Option<bool>,
}
impl AttachDiskInputBuilder {
    /// <p>The unique Lightsail disk name (<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 Lightsail disk name (<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 Lightsail disk name (<code>my-disk</code>).</p>
    pub fn get_disk_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.disk_name
    }
    /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
    /// This field is required.
    pub fn instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
    pub fn set_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_name = input;
        self
    }
    /// <p>The name of the Lightsail instance where you want to utilize the storage disk.</p>
    pub fn get_instance_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_name
    }
    /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
    /// This field is required.
    pub fn disk_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.disk_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
    pub fn set_disk_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.disk_path = input;
        self
    }
    /// <p>The disk path to expose to the instance (<code>/dev/xvdf</code>).</p>
    pub fn get_disk_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.disk_path
    }
    /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
    /// <p>This value only applies to Lightsail for Research resources.</p>
    /// </important>
    pub fn auto_mounting(mut self, input: bool) -> Self {
        self.auto_mounting = ::std::option::Option::Some(input);
        self
    }
    /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
    /// <p>This value only applies to Lightsail for Research resources.</p>
    /// </important>
    pub fn set_auto_mounting(mut self, input: ::std::option::Option<bool>) -> Self {
        self.auto_mounting = input;
        self
    }
    /// <p>A Boolean value used to determine the automatic mounting of a storage volume to a virtual computer. The default value is <code>False</code>.</p><important>
    /// <p>This value only applies to Lightsail for Research resources.</p>
    /// </important>
    pub fn get_auto_mounting(&self) -> &::std::option::Option<bool> {
        &self.auto_mounting
    }
    /// Consumes the builder and constructs a [`AttachDiskInput`](crate::operation::attach_disk::AttachDiskInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::attach_disk::AttachDiskInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::attach_disk::AttachDiskInput {
            disk_name: self.disk_name,
            instance_name: self.instance_name,
            disk_path: self.disk_path,
            auto_mounting: self.auto_mounting,
        })
    }
}