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 throughput peaks for an on-premises storage system volume. 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 Throughput {
    /// <p>Peak throughput related to read operations.</p>
    pub read: ::std::option::Option<f64>,
    /// <p>Peak throughput related to write operations.</p>
    pub write: ::std::option::Option<f64>,
    /// <p>Peak throughput unrelated to read and write operations.</p>
    pub other: ::std::option::Option<f64>,
    /// <p>Peak total throughput on your on-premises storage system resource.</p>
    pub total: ::std::option::Option<f64>,
}
impl Throughput {
    /// <p>Peak throughput related to read operations.</p>
    pub fn read(&self) -> ::std::option::Option<f64> {
        self.read
    }
    /// <p>Peak throughput related to write operations.</p>
    pub fn write(&self) -> ::std::option::Option<f64> {
        self.write
    }
    /// <p>Peak throughput unrelated to read and write operations.</p>
    pub fn other(&self) -> ::std::option::Option<f64> {
        self.other
    }
    /// <p>Peak total throughput on your on-premises storage system resource.</p>
    pub fn total(&self) -> ::std::option::Option<f64> {
        self.total
    }
}
impl Throughput {
    /// Creates a new builder-style object to manufacture [`Throughput`](crate::types::Throughput).
    pub fn builder() -> crate::types::builders::ThroughputBuilder {
        crate::types::builders::ThroughputBuilder::default()
    }
}

/// A builder for [`Throughput`](crate::types::Throughput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ThroughputBuilder {
    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 ThroughputBuilder {
    /// <p>Peak throughput related to read operations.</p>
    pub fn read(mut self, input: f64) -> Self {
        self.read = ::std::option::Option::Some(input);
        self
    }
    /// <p>Peak throughput related to read operations.</p>
    pub fn set_read(mut self, input: ::std::option::Option<f64>) -> Self {
        self.read = input;
        self
    }
    /// <p>Peak throughput related to read operations.</p>
    pub fn get_read(&self) -> &::std::option::Option<f64> {
        &self.read
    }
    /// <p>Peak throughput related to write operations.</p>
    pub fn write(mut self, input: f64) -> Self {
        self.write = ::std::option::Option::Some(input);
        self
    }
    /// <p>Peak throughput related to write operations.</p>
    pub fn set_write(mut self, input: ::std::option::Option<f64>) -> Self {
        self.write = input;
        self
    }
    /// <p>Peak throughput related to write operations.</p>
    pub fn get_write(&self) -> &::std::option::Option<f64> {
        &self.write
    }
    /// <p>Peak throughput 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 throughput 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 throughput unrelated to read and write operations.</p>
    pub fn get_other(&self) -> &::std::option::Option<f64> {
        &self.other
    }
    /// <p>Peak total throughput 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 throughput 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 throughput 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 [`Throughput`](crate::types::Throughput).
    pub fn build(self) -> crate::types::Throughput {
        crate::types::Throughput {
            read: self.read,
            write: self.write,
            other: self.other,
            total: self.total,
        }
    }
}