aws-sdk-mgn 1.101.0

AWS SDK for Application Migration Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The disk identifier.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Disk {
    /// <p>The disk or device name.</p>
    pub device_name: ::std::option::Option<::std::string::String>,
    /// <p>The amount of storage on the disk in bytes.</p>
    pub bytes: i64,
}
impl Disk {
    /// <p>The disk or device name.</p>
    pub fn device_name(&self) -> ::std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>The amount of storage on the disk in bytes.</p>
    pub fn bytes(&self) -> i64 {
        self.bytes
    }
}
impl Disk {
    /// Creates a new builder-style object to manufacture [`Disk`](crate::types::Disk).
    pub fn builder() -> crate::types::builders::DiskBuilder {
        crate::types::builders::DiskBuilder::default()
    }
}

/// A builder for [`Disk`](crate::types::Disk).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DiskBuilder {
    pub(crate) device_name: ::std::option::Option<::std::string::String>,
    pub(crate) bytes: ::std::option::Option<i64>,
}
impl DiskBuilder {
    /// <p>The disk or device name.</p>
    pub fn device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The disk or device name.</p>
    pub fn set_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_name = input;
        self
    }
    /// <p>The disk or device name.</p>
    pub fn get_device_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_name
    }
    /// <p>The amount of storage on the disk in bytes.</p>
    pub fn bytes(mut self, input: i64) -> Self {
        self.bytes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The amount of storage on the disk in bytes.</p>
    pub fn set_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
        self.bytes = input;
        self
    }
    /// <p>The amount of storage on the disk in bytes.</p>
    pub fn get_bytes(&self) -> &::std::option::Option<i64> {
        &self.bytes
    }
    /// Consumes the builder and constructs a [`Disk`](crate::types::Disk).
    pub fn build(self) -> crate::types::Disk {
        crate::types::Disk {
            device_name: self.device_name,
            bytes: self.bytes.unwrap_or_default(),
        }
    }
}