aws-sdk-snowdevicemanagement 1.78.0

AWS SDK for AWS Snow Device Management
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The physical capacity of the Amazon Web Services Snow Family device.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Capacity {
    /// <p>The name of the type of capacity, such as memory.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The unit of measure for the type of capacity.</p>
    pub unit: ::std::option::Option<::std::string::String>,
    /// <p>The total capacity on the device.</p>
    pub total: ::std::option::Option<i64>,
    /// <p>The amount of capacity used on the device.</p>
    pub used: ::std::option::Option<i64>,
    /// <p>The amount of capacity available for use on the device.</p>
    pub available: ::std::option::Option<i64>,
}
impl Capacity {
    /// <p>The name of the type of capacity, such as memory.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The unit of measure for the type of capacity.</p>
    pub fn unit(&self) -> ::std::option::Option<&str> {
        self.unit.as_deref()
    }
    /// <p>The total capacity on the device.</p>
    pub fn total(&self) -> ::std::option::Option<i64> {
        self.total
    }
    /// <p>The amount of capacity used on the device.</p>
    pub fn used(&self) -> ::std::option::Option<i64> {
        self.used
    }
    /// <p>The amount of capacity available for use on the device.</p>
    pub fn available(&self) -> ::std::option::Option<i64> {
        self.available
    }
}
impl Capacity {
    /// Creates a new builder-style object to manufacture [`Capacity`](crate::types::Capacity).
    pub fn builder() -> crate::types::builders::CapacityBuilder {
        crate::types::builders::CapacityBuilder::default()
    }
}

/// A builder for [`Capacity`](crate::types::Capacity).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CapacityBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) unit: ::std::option::Option<::std::string::String>,
    pub(crate) total: ::std::option::Option<i64>,
    pub(crate) used: ::std::option::Option<i64>,
    pub(crate) available: ::std::option::Option<i64>,
}
impl CapacityBuilder {
    /// <p>The name of the type of capacity, such as memory.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the type of capacity, such as memory.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the type of capacity, such as memory.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The unit of measure for the type of capacity.</p>
    pub fn unit(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.unit = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unit of measure for the type of capacity.</p>
    pub fn set_unit(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.unit = input;
        self
    }
    /// <p>The unit of measure for the type of capacity.</p>
    pub fn get_unit(&self) -> &::std::option::Option<::std::string::String> {
        &self.unit
    }
    /// <p>The total capacity on the device.</p>
    pub fn total(mut self, input: i64) -> Self {
        self.total = ::std::option::Option::Some(input);
        self
    }
    /// <p>The total capacity on the device.</p>
    pub fn set_total(mut self, input: ::std::option::Option<i64>) -> Self {
        self.total = input;
        self
    }
    /// <p>The total capacity on the device.</p>
    pub fn get_total(&self) -> &::std::option::Option<i64> {
        &self.total
    }
    /// <p>The amount of capacity used on the device.</p>
    pub fn used(mut self, input: i64) -> Self {
        self.used = ::std::option::Option::Some(input);
        self
    }
    /// <p>The amount of capacity used on the device.</p>
    pub fn set_used(mut self, input: ::std::option::Option<i64>) -> Self {
        self.used = input;
        self
    }
    /// <p>The amount of capacity used on the device.</p>
    pub fn get_used(&self) -> &::std::option::Option<i64> {
        &self.used
    }
    /// <p>The amount of capacity available for use on the device.</p>
    pub fn available(mut self, input: i64) -> Self {
        self.available = ::std::option::Option::Some(input);
        self
    }
    /// <p>The amount of capacity available for use on the device.</p>
    pub fn set_available(mut self, input: ::std::option::Option<i64>) -> Self {
        self.available = input;
        self
    }
    /// <p>The amount of capacity available for use on the device.</p>
    pub fn get_available(&self) -> &::std::option::Option<i64> {
        &self.available
    }
    /// Consumes the builder and constructs a [`Capacity`](crate::types::Capacity).
    pub fn build(self) -> crate::types::Capacity {
        crate::types::Capacity {
            name: self.name,
            unit: self.unit,
            total: self.total,
            used: self.used,
            available: self.available,
        }
    }
}