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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>List of FPort assigned for different LoRaWAN application packages to use</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct FPorts {
    /// <p>The Fport value.</p>
    pub fuota: ::std::option::Option<i32>,
    /// <p>The Fport value.</p>
    pub multicast: ::std::option::Option<i32>,
    /// <p>The Fport value.</p>
    pub clock_sync: ::std::option::Option<i32>,
    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
    pub positioning: ::std::option::Option<crate::types::Positioning>,
    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</p>
    pub applications: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationConfig>>,
}
impl FPorts {
    /// <p>The Fport value.</p>
    pub fn fuota(&self) -> ::std::option::Option<i32> {
        self.fuota
    }
    /// <p>The Fport value.</p>
    pub fn multicast(&self) -> ::std::option::Option<i32> {
        self.multicast
    }
    /// <p>The Fport value.</p>
    pub fn clock_sync(&self) -> ::std::option::Option<i32> {
        self.clock_sync
    }
    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
    pub fn positioning(&self) -> ::std::option::Option<&crate::types::Positioning> {
        self.positioning.as_ref()
    }
    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</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 `.applications.is_none()`.
    pub fn applications(&self) -> &[crate::types::ApplicationConfig] {
        self.applications.as_deref().unwrap_or_default()
    }
}
impl FPorts {
    /// Creates a new builder-style object to manufacture [`FPorts`](crate::types::FPorts).
    pub fn builder() -> crate::types::builders::FPortsBuilder {
        crate::types::builders::FPortsBuilder::default()
    }
}

/// A builder for [`FPorts`](crate::types::FPorts).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct FPortsBuilder {
    pub(crate) fuota: ::std::option::Option<i32>,
    pub(crate) multicast: ::std::option::Option<i32>,
    pub(crate) clock_sync: ::std::option::Option<i32>,
    pub(crate) positioning: ::std::option::Option<crate::types::Positioning>,
    pub(crate) applications: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationConfig>>,
}
impl FPortsBuilder {
    /// <p>The Fport value.</p>
    pub fn fuota(mut self, input: i32) -> Self {
        self.fuota = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Fport value.</p>
    pub fn set_fuota(mut self, input: ::std::option::Option<i32>) -> Self {
        self.fuota = input;
        self
    }
    /// <p>The Fport value.</p>
    pub fn get_fuota(&self) -> &::std::option::Option<i32> {
        &self.fuota
    }
    /// <p>The Fport value.</p>
    pub fn multicast(mut self, input: i32) -> Self {
        self.multicast = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Fport value.</p>
    pub fn set_multicast(mut self, input: ::std::option::Option<i32>) -> Self {
        self.multicast = input;
        self
    }
    /// <p>The Fport value.</p>
    pub fn get_multicast(&self) -> &::std::option::Option<i32> {
        &self.multicast
    }
    /// <p>The Fport value.</p>
    pub fn clock_sync(mut self, input: i32) -> Self {
        self.clock_sync = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Fport value.</p>
    pub fn set_clock_sync(mut self, input: ::std::option::Option<i32>) -> Self {
        self.clock_sync = input;
        self
    }
    /// <p>The Fport value.</p>
    pub fn get_clock_sync(&self) -> &::std::option::Option<i32> {
        &self.clock_sync
    }
    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
    pub fn positioning(mut self, input: crate::types::Positioning) -> Self {
        self.positioning = ::std::option::Option::Some(input);
        self
    }
    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
    pub fn set_positioning(mut self, input: ::std::option::Option<crate::types::Positioning>) -> Self {
        self.positioning = input;
        self
    }
    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
    pub fn get_positioning(&self) -> &::std::option::Option<crate::types::Positioning> {
        &self.positioning
    }
    /// Appends an item to `applications`.
    ///
    /// To override the contents of this collection use [`set_applications`](Self::set_applications).
    ///
    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</p>
    pub fn applications(mut self, input: crate::types::ApplicationConfig) -> Self {
        let mut v = self.applications.unwrap_or_default();
        v.push(input);
        self.applications = ::std::option::Option::Some(v);
        self
    }
    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</p>
    pub fn set_applications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationConfig>>) -> Self {
        self.applications = input;
        self
    }
    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</p>
    pub fn get_applications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ApplicationConfig>> {
        &self.applications
    }
    /// Consumes the builder and constructs a [`FPorts`](crate::types::FPorts).
    pub fn build(self) -> crate::types::FPorts {
        crate::types::FPorts {
            fuota: self.fuota,
            multicast: self.multicast,
            clock_sync: self.clock_sync,
            positioning: self.positioning,
            applications: self.applications,
        }
    }
}