aws-sdk-datasync 1.58.0

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

/// <p>The IOPS peaks for an on-premises storage system resource. Each data point represents the 95th percentile peak value during a 1-hour interval.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Iops {
    /// <p>Peak IOPS related to read operations.</p>
    pub read: ::std::option::Option<f64>,
    /// <p>Peak IOPS related to write operations.</p>
    pub write: ::std::option::Option<f64>,
    /// <p>Peak IOPS unrelated to read and write operations.</p>
    pub other: ::std::option::Option<f64>,
    /// <p>Peak total IOPS on your on-premises storage system resource.</p>
    pub total: ::std::option::Option<f64>,
}
impl Iops {
    /// <p>Peak IOPS related to read operations.</p>
    pub fn read(&self) -> ::std::option::Option<f64> {
        self.read
    }
    /// <p>Peak IOPS related to write operations.</p>
    pub fn write(&self) -> ::std::option::Option<f64> {
        self.write
    }
    /// <p>Peak IOPS unrelated to read and write operations.</p>
    pub fn other(&self) -> ::std::option::Option<f64> {
        self.other
    }
    /// <p>Peak total IOPS on your on-premises storage system resource.</p>
    pub fn total(&self) -> ::std::option::Option<f64> {
        self.total
    }
}
impl Iops {
    /// Creates a new builder-style object to manufacture [`Iops`](crate::types::Iops).
    pub fn builder() -> crate::types::builders::IopsBuilder {
        crate::types::builders::IopsBuilder::default()
    }
}

/// A builder for [`Iops`](crate::types::Iops).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct IopsBuilder {
    pub(crate) read: ::std::option::Option<f64>,
    pub(crate) write: ::std::option::Option<f64>,
    pub(crate) other: ::std::option::Option<f64>,
    pub(crate) total: ::std::option::Option<f64>,
}
impl IopsBuilder {
    /// <p>Peak IOPS related to read operations.</p>
    pub fn read(mut self, input: f64) -> Self {
        self.read = ::std::option::Option::Some(input);
        self
    }
    /// <p>Peak IOPS related to read operations.</p>
    pub fn set_read(mut self, input: ::std::option::Option<f64>) -> Self {
        self.read = input;
        self
    }
    /// <p>Peak IOPS related to read operations.</p>
    pub fn get_read(&self) -> &::std::option::Option<f64> {
        &self.read
    }
    /// <p>Peak IOPS related to write operations.</p>
    pub fn write(mut self, input: f64) -> Self {
        self.write = ::std::option::Option::Some(input);
        self
    }
    /// <p>Peak IOPS related to write operations.</p>
    pub fn set_write(mut self, input: ::std::option::Option<f64>) -> Self {
        self.write = input;
        self
    }
    /// <p>Peak IOPS related to write operations.</p>
    pub fn get_write(&self) -> &::std::option::Option<f64> {
        &self.write
    }
    /// <p>Peak IOPS unrelated to read and write operations.</p>
    pub fn other(mut self, input: f64) -> Self {
        self.other = ::std::option::Option::Some(input);
        self
    }
    /// <p>Peak IOPS unrelated to read and write operations.</p>
    pub fn set_other(mut self, input: ::std::option::Option<f64>) -> Self {
        self.other = input;
        self
    }
    /// <p>Peak IOPS unrelated to read and write operations.</p>
    pub fn get_other(&self) -> &::std::option::Option<f64> {
        &self.other
    }
    /// <p>Peak total IOPS on your on-premises storage system resource.</p>
    pub fn total(mut self, input: f64) -> Self {
        self.total = ::std::option::Option::Some(input);
        self
    }
    /// <p>Peak total IOPS on your on-premises storage system resource.</p>
    pub fn set_total(mut self, input: ::std::option::Option<f64>) -> Self {
        self.total = input;
        self
    }
    /// <p>Peak total IOPS on your on-premises storage system resource.</p>
    pub fn get_total(&self) -> &::std::option::Option<f64> {
        &self.total
    }
    /// Consumes the builder and constructs a [`Iops`](crate::types::Iops).
    pub fn build(self) -> crate::types::Iops {
        crate::types::Iops {
            read: self.read,
            write: self.write,
            other: self.other,
            total: self.total,
        }
    }
}