Skip to main content

aws_sdk_iotwireless/types/
_f_ports.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>List of FPort assigned for different LoRaWAN application packages to use</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct FPorts {
7    /// <p>The Fport value.</p>
8    pub fuota: ::std::option::Option<i32>,
9    /// <p>The Fport value.</p>
10    pub multicast: ::std::option::Option<i32>,
11    /// <p>The Fport value.</p>
12    pub clock_sync: ::std::option::Option<i32>,
13    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
14    pub positioning: ::std::option::Option<crate::types::Positioning>,
15    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</p>
16    pub applications: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationConfig>>,
17}
18impl FPorts {
19    /// <p>The Fport value.</p>
20    pub fn fuota(&self) -> ::std::option::Option<i32> {
21        self.fuota
22    }
23    /// <p>The Fport value.</p>
24    pub fn multicast(&self) -> ::std::option::Option<i32> {
25        self.multicast
26    }
27    /// <p>The Fport value.</p>
28    pub fn clock_sync(&self) -> ::std::option::Option<i32> {
29        self.clock_sync
30    }
31    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
32    pub fn positioning(&self) -> ::std::option::Option<&crate::types::Positioning> {
33        self.positioning.as_ref()
34    }
35    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</p>
36    ///
37    /// 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()`.
38    pub fn applications(&self) -> &[crate::types::ApplicationConfig] {
39        self.applications.as_deref().unwrap_or_default()
40    }
41}
42impl FPorts {
43    /// Creates a new builder-style object to manufacture [`FPorts`](crate::types::FPorts).
44    pub fn builder() -> crate::types::builders::FPortsBuilder {
45        crate::types::builders::FPortsBuilder::default()
46    }
47}
48
49/// A builder for [`FPorts`](crate::types::FPorts).
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
51#[non_exhaustive]
52pub struct FPortsBuilder {
53    pub(crate) fuota: ::std::option::Option<i32>,
54    pub(crate) multicast: ::std::option::Option<i32>,
55    pub(crate) clock_sync: ::std::option::Option<i32>,
56    pub(crate) positioning: ::std::option::Option<crate::types::Positioning>,
57    pub(crate) applications: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationConfig>>,
58}
59impl FPortsBuilder {
60    /// <p>The Fport value.</p>
61    pub fn fuota(mut self, input: i32) -> Self {
62        self.fuota = ::std::option::Option::Some(input);
63        self
64    }
65    /// <p>The Fport value.</p>
66    pub fn set_fuota(mut self, input: ::std::option::Option<i32>) -> Self {
67        self.fuota = input;
68        self
69    }
70    /// <p>The Fport value.</p>
71    pub fn get_fuota(&self) -> &::std::option::Option<i32> {
72        &self.fuota
73    }
74    /// <p>The Fport value.</p>
75    pub fn multicast(mut self, input: i32) -> Self {
76        self.multicast = ::std::option::Option::Some(input);
77        self
78    }
79    /// <p>The Fport value.</p>
80    pub fn set_multicast(mut self, input: ::std::option::Option<i32>) -> Self {
81        self.multicast = input;
82        self
83    }
84    /// <p>The Fport value.</p>
85    pub fn get_multicast(&self) -> &::std::option::Option<i32> {
86        &self.multicast
87    }
88    /// <p>The Fport value.</p>
89    pub fn clock_sync(mut self, input: i32) -> Self {
90        self.clock_sync = ::std::option::Option::Some(input);
91        self
92    }
93    /// <p>The Fport value.</p>
94    pub fn set_clock_sync(mut self, input: ::std::option::Option<i32>) -> Self {
95        self.clock_sync = input;
96        self
97    }
98    /// <p>The Fport value.</p>
99    pub fn get_clock_sync(&self) -> &::std::option::Option<i32> {
100        &self.clock_sync
101    }
102    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
103    pub fn positioning(mut self, input: crate::types::Positioning) -> Self {
104        self.positioning = ::std::option::Option::Some(input);
105        self
106    }
107    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
108    pub fn set_positioning(mut self, input: ::std::option::Option<crate::types::Positioning>) -> Self {
109        self.positioning = input;
110        self
111    }
112    /// <p>FPort values for the GNSS, stream, and ClockSync functions of the positioning information.</p>
113    pub fn get_positioning(&self) -> &::std::option::Option<crate::types::Positioning> {
114        &self.positioning
115    }
116    /// Appends an item to `applications`.
117    ///
118    /// To override the contents of this collection use [`set_applications`](Self::set_applications).
119    ///
120    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</p>
121    pub fn applications(mut self, input: crate::types::ApplicationConfig) -> Self {
122        let mut v = self.applications.unwrap_or_default();
123        v.push(input);
124        self.applications = ::std::option::Option::Some(v);
125        self
126    }
127    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</p>
128    pub fn set_applications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ApplicationConfig>>) -> Self {
129        self.applications = input;
130        self
131    }
132    /// <p>Optional LoRaWAN application information, which can be used for geolocation.</p>
133    pub fn get_applications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ApplicationConfig>> {
134        &self.applications
135    }
136    /// Consumes the builder and constructs a [`FPorts`](crate::types::FPorts).
137    pub fn build(self) -> crate::types::FPorts {
138        crate::types::FPorts {
139            fuota: self.fuota,
140            multicast: self.multicast,
141            clock_sync: self.clock_sync,
142            positioning: self.positioning,
143            applications: self.applications,
144        }
145    }
146}