aws_sdk_iotwireless/types/
_cdma_local_id.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CdmaLocalId {
7 pub pn_offset: i32,
9 pub cdma_channel: i32,
11}
12impl CdmaLocalId {
13 pub fn pn_offset(&self) -> i32 {
15 self.pn_offset
16 }
17 pub fn cdma_channel(&self) -> i32 {
19 self.cdma_channel
20 }
21}
22impl CdmaLocalId {
23 pub fn builder() -> crate::types::builders::CdmaLocalIdBuilder {
25 crate::types::builders::CdmaLocalIdBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct CdmaLocalIdBuilder {
33 pub(crate) pn_offset: ::std::option::Option<i32>,
34 pub(crate) cdma_channel: ::std::option::Option<i32>,
35}
36impl CdmaLocalIdBuilder {
37 pub fn pn_offset(mut self, input: i32) -> Self {
40 self.pn_offset = ::std::option::Option::Some(input);
41 self
42 }
43 pub fn set_pn_offset(mut self, input: ::std::option::Option<i32>) -> Self {
45 self.pn_offset = input;
46 self
47 }
48 pub fn get_pn_offset(&self) -> &::std::option::Option<i32> {
50 &self.pn_offset
51 }
52 pub fn cdma_channel(mut self, input: i32) -> Self {
55 self.cdma_channel = ::std::option::Option::Some(input);
56 self
57 }
58 pub fn set_cdma_channel(mut self, input: ::std::option::Option<i32>) -> Self {
60 self.cdma_channel = input;
61 self
62 }
63 pub fn get_cdma_channel(&self) -> &::std::option::Option<i32> {
65 &self.cdma_channel
66 }
67 pub fn build(self) -> ::std::result::Result<crate::types::CdmaLocalId, ::aws_smithy_types::error::operation::BuildError> {
72 ::std::result::Result::Ok(crate::types::CdmaLocalId {
73 pn_offset: self.pn_offset.ok_or_else(|| {
74 ::aws_smithy_types::error::operation::BuildError::missing_field(
75 "pn_offset",
76 "pn_offset was not specified but it is required when building CdmaLocalId",
77 )
78 })?,
79 cdma_channel: self.cdma_channel.ok_or_else(|| {
80 ::aws_smithy_types::error::operation::BuildError::missing_field(
81 "cdma_channel",
82 "cdma_channel was not specified but it is required when building CdmaLocalId",
83 )
84 })?,
85 })
86 }
87}