aws-sdk-interconnect 1.1.0

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

/// <p>Contains the details about the available and supported bandwidths.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Bandwidths {
    /// <p>The list of currently available bandwidths.</p>
    pub available: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The list of all bandwidths that this environment plans to support</p>
    pub supported: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Bandwidths {
    /// <p>The list of currently available bandwidths.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.available.is_none()`.
    pub fn available(&self) -> &[::std::string::String] {
        self.available.as_deref().unwrap_or_default()
    }
    /// <p>The list of all bandwidths that this environment plans to support</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported.is_none()`.
    pub fn supported(&self) -> &[::std::string::String] {
        self.supported.as_deref().unwrap_or_default()
    }
}
impl Bandwidths {
    /// Creates a new builder-style object to manufacture [`Bandwidths`](crate::types::Bandwidths).
    pub fn builder() -> crate::types::builders::BandwidthsBuilder {
        crate::types::builders::BandwidthsBuilder::default()
    }
}

/// A builder for [`Bandwidths`](crate::types::Bandwidths).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BandwidthsBuilder {
    pub(crate) available: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) supported: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BandwidthsBuilder {
    /// Appends an item to `available`.
    ///
    /// To override the contents of this collection use [`set_available`](Self::set_available).
    ///
    /// <p>The list of currently available bandwidths.</p>
    pub fn available(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.available.unwrap_or_default();
        v.push(input.into());
        self.available = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of currently available bandwidths.</p>
    pub fn set_available(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.available = input;
        self
    }
    /// <p>The list of currently available bandwidths.</p>
    pub fn get_available(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.available
    }
    /// Appends an item to `supported`.
    ///
    /// To override the contents of this collection use [`set_supported`](Self::set_supported).
    ///
    /// <p>The list of all bandwidths that this environment plans to support</p>
    pub fn supported(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.supported.unwrap_or_default();
        v.push(input.into());
        self.supported = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of all bandwidths that this environment plans to support</p>
    pub fn set_supported(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.supported = input;
        self
    }
    /// <p>The list of all bandwidths that this environment plans to support</p>
    pub fn get_supported(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.supported
    }
    /// Consumes the builder and constructs a [`Bandwidths`](crate::types::Bandwidths).
    pub fn build(self) -> crate::types::Bandwidths {
        crate::types::Bandwidths {
            available: self.available,
            supported: self.supported,
        }
    }
}