aws_sdk_pinpoint/types/
_number_validate_response.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct NumberValidateResponse {
7 pub carrier: ::std::option::Option<::std::string::String>,
9 pub city: ::std::option::Option<::std::string::String>,
11 pub cleansed_phone_number_e164: ::std::option::Option<::std::string::String>,
13 pub cleansed_phone_number_national: ::std::option::Option<::std::string::String>,
15 pub country: ::std::option::Option<::std::string::String>,
17 pub country_code_iso2: ::std::option::Option<::std::string::String>,
19 pub country_code_numeric: ::std::option::Option<::std::string::String>,
21 pub county: ::std::option::Option<::std::string::String>,
23 pub original_country_code_iso2: ::std::option::Option<::std::string::String>,
25 pub original_phone_number: ::std::option::Option<::std::string::String>,
27 pub phone_type: ::std::option::Option<::std::string::String>,
29 pub phone_type_code: ::std::option::Option<i32>,
31 pub timezone: ::std::option::Option<::std::string::String>,
33 pub zip_code: ::std::option::Option<::std::string::String>,
35}
36impl NumberValidateResponse {
37 pub fn carrier(&self) -> ::std::option::Option<&str> {
39 self.carrier.as_deref()
40 }
41 pub fn city(&self) -> ::std::option::Option<&str> {
43 self.city.as_deref()
44 }
45 pub fn cleansed_phone_number_e164(&self) -> ::std::option::Option<&str> {
47 self.cleansed_phone_number_e164.as_deref()
48 }
49 pub fn cleansed_phone_number_national(&self) -> ::std::option::Option<&str> {
51 self.cleansed_phone_number_national.as_deref()
52 }
53 pub fn country(&self) -> ::std::option::Option<&str> {
55 self.country.as_deref()
56 }
57 pub fn country_code_iso2(&self) -> ::std::option::Option<&str> {
59 self.country_code_iso2.as_deref()
60 }
61 pub fn country_code_numeric(&self) -> ::std::option::Option<&str> {
63 self.country_code_numeric.as_deref()
64 }
65 pub fn county(&self) -> ::std::option::Option<&str> {
67 self.county.as_deref()
68 }
69 pub fn original_country_code_iso2(&self) -> ::std::option::Option<&str> {
71 self.original_country_code_iso2.as_deref()
72 }
73 pub fn original_phone_number(&self) -> ::std::option::Option<&str> {
75 self.original_phone_number.as_deref()
76 }
77 pub fn phone_type(&self) -> ::std::option::Option<&str> {
79 self.phone_type.as_deref()
80 }
81 pub fn phone_type_code(&self) -> ::std::option::Option<i32> {
83 self.phone_type_code
84 }
85 pub fn timezone(&self) -> ::std::option::Option<&str> {
87 self.timezone.as_deref()
88 }
89 pub fn zip_code(&self) -> ::std::option::Option<&str> {
91 self.zip_code.as_deref()
92 }
93}
94impl NumberValidateResponse {
95 pub fn builder() -> crate::types::builders::NumberValidateResponseBuilder {
97 crate::types::builders::NumberValidateResponseBuilder::default()
98 }
99}
100
101#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
103#[non_exhaustive]
104pub struct NumberValidateResponseBuilder {
105 pub(crate) carrier: ::std::option::Option<::std::string::String>,
106 pub(crate) city: ::std::option::Option<::std::string::String>,
107 pub(crate) cleansed_phone_number_e164: ::std::option::Option<::std::string::String>,
108 pub(crate) cleansed_phone_number_national: ::std::option::Option<::std::string::String>,
109 pub(crate) country: ::std::option::Option<::std::string::String>,
110 pub(crate) country_code_iso2: ::std::option::Option<::std::string::String>,
111 pub(crate) country_code_numeric: ::std::option::Option<::std::string::String>,
112 pub(crate) county: ::std::option::Option<::std::string::String>,
113 pub(crate) original_country_code_iso2: ::std::option::Option<::std::string::String>,
114 pub(crate) original_phone_number: ::std::option::Option<::std::string::String>,
115 pub(crate) phone_type: ::std::option::Option<::std::string::String>,
116 pub(crate) phone_type_code: ::std::option::Option<i32>,
117 pub(crate) timezone: ::std::option::Option<::std::string::String>,
118 pub(crate) zip_code: ::std::option::Option<::std::string::String>,
119}
120impl NumberValidateResponseBuilder {
121 pub fn carrier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.carrier = ::std::option::Option::Some(input.into());
124 self
125 }
126 pub fn set_carrier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.carrier = input;
129 self
130 }
131 pub fn get_carrier(&self) -> &::std::option::Option<::std::string::String> {
133 &self.carrier
134 }
135 pub fn city(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.city = ::std::option::Option::Some(input.into());
138 self
139 }
140 pub fn set_city(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.city = input;
143 self
144 }
145 pub fn get_city(&self) -> &::std::option::Option<::std::string::String> {
147 &self.city
148 }
149 pub fn cleansed_phone_number_e164(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.cleansed_phone_number_e164 = ::std::option::Option::Some(input.into());
152 self
153 }
154 pub fn set_cleansed_phone_number_e164(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.cleansed_phone_number_e164 = input;
157 self
158 }
159 pub fn get_cleansed_phone_number_e164(&self) -> &::std::option::Option<::std::string::String> {
161 &self.cleansed_phone_number_e164
162 }
163 pub fn cleansed_phone_number_national(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165 self.cleansed_phone_number_national = ::std::option::Option::Some(input.into());
166 self
167 }
168 pub fn set_cleansed_phone_number_national(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170 self.cleansed_phone_number_national = input;
171 self
172 }
173 pub fn get_cleansed_phone_number_national(&self) -> &::std::option::Option<::std::string::String> {
175 &self.cleansed_phone_number_national
176 }
177 pub fn country(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.country = ::std::option::Option::Some(input.into());
180 self
181 }
182 pub fn set_country(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184 self.country = input;
185 self
186 }
187 pub fn get_country(&self) -> &::std::option::Option<::std::string::String> {
189 &self.country
190 }
191 pub fn country_code_iso2(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 self.country_code_iso2 = ::std::option::Option::Some(input.into());
194 self
195 }
196 pub fn set_country_code_iso2(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198 self.country_code_iso2 = input;
199 self
200 }
201 pub fn get_country_code_iso2(&self) -> &::std::option::Option<::std::string::String> {
203 &self.country_code_iso2
204 }
205 pub fn country_code_numeric(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 self.country_code_numeric = ::std::option::Option::Some(input.into());
208 self
209 }
210 pub fn set_country_code_numeric(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212 self.country_code_numeric = input;
213 self
214 }
215 pub fn get_country_code_numeric(&self) -> &::std::option::Option<::std::string::String> {
217 &self.country_code_numeric
218 }
219 pub fn county(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221 self.county = ::std::option::Option::Some(input.into());
222 self
223 }
224 pub fn set_county(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
226 self.county = input;
227 self
228 }
229 pub fn get_county(&self) -> &::std::option::Option<::std::string::String> {
231 &self.county
232 }
233 pub fn original_country_code_iso2(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235 self.original_country_code_iso2 = ::std::option::Option::Some(input.into());
236 self
237 }
238 pub fn set_original_country_code_iso2(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
240 self.original_country_code_iso2 = input;
241 self
242 }
243 pub fn get_original_country_code_iso2(&self) -> &::std::option::Option<::std::string::String> {
245 &self.original_country_code_iso2
246 }
247 pub fn original_phone_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
249 self.original_phone_number = ::std::option::Option::Some(input.into());
250 self
251 }
252 pub fn set_original_phone_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
254 self.original_phone_number = input;
255 self
256 }
257 pub fn get_original_phone_number(&self) -> &::std::option::Option<::std::string::String> {
259 &self.original_phone_number
260 }
261 pub fn phone_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263 self.phone_type = ::std::option::Option::Some(input.into());
264 self
265 }
266 pub fn set_phone_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268 self.phone_type = input;
269 self
270 }
271 pub fn get_phone_type(&self) -> &::std::option::Option<::std::string::String> {
273 &self.phone_type
274 }
275 pub fn phone_type_code(mut self, input: i32) -> Self {
277 self.phone_type_code = ::std::option::Option::Some(input);
278 self
279 }
280 pub fn set_phone_type_code(mut self, input: ::std::option::Option<i32>) -> Self {
282 self.phone_type_code = input;
283 self
284 }
285 pub fn get_phone_type_code(&self) -> &::std::option::Option<i32> {
287 &self.phone_type_code
288 }
289 pub fn timezone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291 self.timezone = ::std::option::Option::Some(input.into());
292 self
293 }
294 pub fn set_timezone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296 self.timezone = input;
297 self
298 }
299 pub fn get_timezone(&self) -> &::std::option::Option<::std::string::String> {
301 &self.timezone
302 }
303 pub fn zip_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
305 self.zip_code = ::std::option::Option::Some(input.into());
306 self
307 }
308 pub fn set_zip_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
310 self.zip_code = input;
311 self
312 }
313 pub fn get_zip_code(&self) -> &::std::option::Option<::std::string::String> {
315 &self.zip_code
316 }
317 pub fn build(self) -> crate::types::NumberValidateResponse {
319 crate::types::NumberValidateResponse {
320 carrier: self.carrier,
321 city: self.city,
322 cleansed_phone_number_e164: self.cleansed_phone_number_e164,
323 cleansed_phone_number_national: self.cleansed_phone_number_national,
324 country: self.country,
325 country_code_iso2: self.country_code_iso2,
326 country_code_numeric: self.country_code_numeric,
327 county: self.county,
328 original_country_code_iso2: self.original_country_code_iso2,
329 original_phone_number: self.original_phone_number,
330 phone_type: self.phone_type,
331 phone_type_code: self.phone_type_code,
332 timezone: self.timezone,
333 zip_code: self.zip_code,
334 }
335 }
336}