aws-sdk-iotwireless 1.108.0

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

/// <p>Beaconing parameters for configuring the wireless gateways.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Beaconing {
    /// <p>The data rate for gateways that are sending the beacons.</p>
    pub data_rate: ::std::option::Option<i32>,
    /// <p>The frequency list for the gateways to send the beacons.</p>
    pub frequencies: ::std::option::Option<::std::vec::Vec<i32>>,
}
impl Beaconing {
    /// <p>The data rate for gateways that are sending the beacons.</p>
    pub fn data_rate(&self) -> ::std::option::Option<i32> {
        self.data_rate
    }
    /// <p>The frequency list for the gateways to send the beacons.</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 `.frequencies.is_none()`.
    pub fn frequencies(&self) -> &[i32] {
        self.frequencies.as_deref().unwrap_or_default()
    }
}
impl Beaconing {
    /// Creates a new builder-style object to manufacture [`Beaconing`](crate::types::Beaconing).
    pub fn builder() -> crate::types::builders::BeaconingBuilder {
        crate::types::builders::BeaconingBuilder::default()
    }
}

/// A builder for [`Beaconing`](crate::types::Beaconing).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BeaconingBuilder {
    pub(crate) data_rate: ::std::option::Option<i32>,
    pub(crate) frequencies: ::std::option::Option<::std::vec::Vec<i32>>,
}
impl BeaconingBuilder {
    /// <p>The data rate for gateways that are sending the beacons.</p>
    pub fn data_rate(mut self, input: i32) -> Self {
        self.data_rate = ::std::option::Option::Some(input);
        self
    }
    /// <p>The data rate for gateways that are sending the beacons.</p>
    pub fn set_data_rate(mut self, input: ::std::option::Option<i32>) -> Self {
        self.data_rate = input;
        self
    }
    /// <p>The data rate for gateways that are sending the beacons.</p>
    pub fn get_data_rate(&self) -> &::std::option::Option<i32> {
        &self.data_rate
    }
    /// Appends an item to `frequencies`.
    ///
    /// To override the contents of this collection use [`set_frequencies`](Self::set_frequencies).
    ///
    /// <p>The frequency list for the gateways to send the beacons.</p>
    pub fn frequencies(mut self, input: i32) -> Self {
        let mut v = self.frequencies.unwrap_or_default();
        v.push(input);
        self.frequencies = ::std::option::Option::Some(v);
        self
    }
    /// <p>The frequency list for the gateways to send the beacons.</p>
    pub fn set_frequencies(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
        self.frequencies = input;
        self
    }
    /// <p>The frequency list for the gateways to send the beacons.</p>
    pub fn get_frequencies(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
        &self.frequencies
    }
    /// Consumes the builder and constructs a [`Beaconing`](crate::types::Beaconing).
    pub fn build(self) -> crate::types::Beaconing {
        crate::types::Beaconing {
            data_rate: self.data_rate,
            frequencies: self.frequencies,
        }
    }
}