1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// 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,
}
}
}